Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup old deprecated code #3170

Merged
merged 6 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 6 additions & 46 deletions db/constants.conf
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ constants_db: {
Job_Monk: 15
Job_Sage: 16
Job_Rogue: 17
Job_Alchem: {
Value: 18
Deprecated: true
}
Job_Alchemist: 18
Job_Bard: 19
Job_Dancer: 20
Expand Down Expand Up @@ -147,10 +143,6 @@ constants_db: {
Job_Baby_Monk: 4038
Job_Baby_Sage: 4039
Job_Baby_Rogue: 4040
Job_Baby_Alchem: {
Value: 4041
Deprecated: true
}
Job_Baby_Alchemist: 4041
Job_Baby_Bard: 4042
Job_Baby_Dancer: 4043
Expand Down Expand Up @@ -3808,44 +3800,6 @@ constants_db: {
FW_EXTRABOLD: 800
FW_HEAVY: 900

comment__: "old setlook (use LOOK_* constants instead)"
VAR_HEAD: {
Value: 1
Deprecated: true // Use LOOK_HAIR
}
VAR_WEAPON: {
Value: 2
Deprecated: true // Use LOOK_WEAPON
}
VAR_HEAD_TOP: {
Value: 3
Deprecated: true // Use LOOK_HEAD_TOP
}
VAR_HEAD_MID: {
Value: 4
Deprecated: true // Use LOOK_HEAD_MID
}
VAR_HEAD_BOTTOM: {
Value: 5
Deprecated: true // Use LOOK_HEAD_BOTTOM
}
VAR_HEADPALETTE: {
Value: 6
Deprecated: true // Use LOOK_HAIR_COLOR
}
VAR_BODYPALETTE: {
Value: 7
Deprecated: true // Use LOOK_CLOTHES_COLOR
}
VAR_SHIELD: {
Value: 8
Deprecated: true // Use LOOK_SHIELD
}
VAR_SHOES: {
Value: 9
Deprecated: true // Use LOOK_SHOES
}

comment__: "Directions"
DIR_NORTH: 0
DIR_NORTHWEST: 1
Expand Down Expand Up @@ -4213,6 +4167,12 @@ constants_db: {
ACH_ACHIEVE: 44
ACH_ACHIEVEMENT_RANK: 45

comment__: "Deprecated skill names"
BA_FROSTJOKER: {
Value: 318
Deprecated: true
}

comment__: "inventory expansion"
INVENTORY_INCREASE_STEP: 10

Expand Down
19 changes: 11 additions & 8 deletions db/pre-re/item_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33223,7 +33223,12 @@ item_db: (
Buy: 20
Weight: 10
Loc: "EQP_ACC"
Script: <" bonus3 bAutoSpell,BA_FROSTJOKER,1+4*(getskilllv(BA_FROSTJOKER)==5),20; ">
Script: <"
if (getskilllv(BA_FROSTJOKE) == 5)
bonus3(bAutoSpell, BA_FROSTJOKE, 5, 20);
else
bonus3(bAutoSpell, BA_FROSTJOKE, 1, 20);
">
},
{
Id: 4210
Expand Down Expand Up @@ -50283,13 +50288,11 @@ item_db: (
bonus2 bSubEle,Ele_Water,7;
bonus2 bAddMonsterDropItem,530,100;
bonus2 bAddMonsterDropItem,12354,300;
if(getrefine()>7) {
bonus5 bAutoSpellWhenHit,BA_FROSTJOKER,5,20,BF_WEAPON|BF_MAGIC,0;
}
else {
bonus5 bAutoSpellWhenHit,BA_FROSTJOKER,1,20,BF_WEAPON|BF_MAGIC,0;
if (getrefine() > 7) {
bonus5(bAutoSpellWhenHit, BA_FROSTJOKE, 5, 20, BF_WEAPON | BF_MAGIC, 0);
} else {
bonus5(bAutoSpellWhenHit, BA_FROSTJOKE, 1, 20, BF_WEAPON | BF_MAGIC, 0);
}

">
},
/*
Expand Down Expand Up @@ -71414,7 +71417,7 @@ item_db: (
else if (.@temp == 2)
itemskill(TF_PICKSTONE, 1);
else if (.@temp == 3)
itemskill(BA_FROSTJOKER, 1);
itemskill(BA_FROSTJOKE, 1);
else if (.@temp == 4)
itemskill(DC_SCREAM, 1);
else if (.@temp == 5)
Expand Down
2 changes: 1 addition & 1 deletion db/pre-re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9578,7 +9578,7 @@ skill_db: (
},
{
Id: 318
Name: "BA_FROSTJOKER"
Name: "BA_FROSTJOKE"
StatusChange: "SC_FREEZE"
Description: "Unbarring Octave"
MaxLevel: 5
Expand Down
2 changes: 1 addition & 1 deletion db/pre-re/skill_tree.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ Bard: {
BA_MUSICALLESSON: 1
BD_ADAPTATION: 1
}
BA_FROSTJOKER: {
BA_FROSTJOKE: {
MaxLevel: 5
BD_ENCORE: 1
}
Expand Down
18 changes: 11 additions & 7 deletions db/re/item_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43871,7 +43871,12 @@ item_db: (
Buy: 20
Weight: 10
Loc: "EQP_ACC"
Script: <" bonus3 bAutoSpell,BA_FROSTJOKER,1+4*(getskilllv(BA_FROSTJOKER)==5),20; ">
Script: <"
if (getskilllv(BA_FROSTJOKE) == 5)
bonus3(bAutoSpell, BA_FROSTJOKE, 1, 20);
else
bonus3(bAutoSpell, BA_FROSTJOKE, 5, 20);
">
},
{
Id: 4210
Expand Down Expand Up @@ -65506,11 +65511,10 @@ item_db: (
bonus2 bSubEle,Ele_Water,7;
bonus2 bAddMonsterDropItem,530,100;
bonus2 bAddMonsterDropItem,12354,300;
if(getrefine()>7) {
bonus5 bAutoSpellWhenHit,BA_FROSTJOKER,5,20,BF_WEAPON|BF_MAGIC,0;
}
else {
bonus5 bAutoSpellWhenHit,BA_FROSTJOKER,1,20,BF_WEAPON|BF_MAGIC,0;
if (getrefine() > 7) {
bonus5(bAutoSpellWhenHit, BA_FROSTJOKE, 5, 20, BF_WEAPON | BF_MAGIC, 0);
} else {
bonus5(bAutoSpellWhenHit, BA_FROSTJOKE, 1, 20, BF_WEAPON | BF_MAGIC, 0);
}
">
},
Expand Down Expand Up @@ -91362,7 +91366,7 @@ item_db: (
else if (.@temp == 2)
itemskill(TF_PICKSTONE, 1);
else if (.@temp == 3)
itemskill(BA_FROSTJOKER, 1);
itemskill(BA_FROSTJOKE, 1);
else if (.@temp == 4)
itemskill(DC_SCREAM, 1);
else if (.@temp == 5)
Expand Down
2 changes: 1 addition & 1 deletion db/re/skill_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9918,7 +9918,7 @@ skill_db: (
},
{
Id: 318
Name: "BA_FROSTJOKER"
Name: "BA_FROSTJOKE"
StatusChange: "SC_FREEZE"
Description: "Unbarring Octave"
MaxLevel: 5
Expand Down
2 changes: 1 addition & 1 deletion db/re/skill_tree.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ Bard: {
BA_MUSICALLESSON: 1
BD_ADAPTATION: 1
}
BA_FROSTJOKER: {
BA_FROSTJOKE: {
MaxLevel: 5
BD_ENCORE: 1
}
Expand Down
6 changes: 5 additions & 1 deletion doc/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -4124,6 +4124,10 @@
- `ACH_ACHIEVE`: 44
- `ACH_ACHIEVEMENT_RANK`: 45

### Deprecated skill names

- `BA_FROSTJOKER`: 318 **(DEPRECATED)**

### inventory expansion

- `INVENTORY_INCREASE_STEP`: 10
Expand Down Expand Up @@ -6089,7 +6093,7 @@
- `BA_POEMBRAGI`: 321
- `BA_ASSASSINCROSS`: 320
- `BA_WHISTLE`: 319
- `BA_FROSTJOKER`: 318
- `BA_FROSTJOKE`: 318
- `BA_DISSONANCE`: 317
- `BA_MUSICALSTRIKE`: 316
- `BA_MUSICALLESSON`: 315
Expand Down
17 changes: 0 additions & 17 deletions doc/script_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8607,23 +8607,6 @@ This command will unbind a NPC event label from an atcommand.

---------------------------------------

*useatcmd("command")

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ /!\ This command is deprecated @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

This command will execute an atcommand binding on the attached RID from a
script. The three .@atcmd_***** variables will NOT be set when invoking
scripts-atcommands this way.

This command is deprecated and it should not be used in new scripts, as it is
likely to be removed at a later time. Instead, you should directly call to the
event label of the binding using timers or doevent(). For built-in commands,
atcommand() should be used instead.

---------------------------------------

*can_use_command("<command>"{, <account id>})

Checks if the attached or specified player can use the specified
Expand Down
1 change: 0 additions & 1 deletion src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -7445,7 +7445,6 @@ static const struct battle_data {
{ "monster_active_enable", &battle_config.monster_active_enable, 1, 0, 1, },
{ "monster_damage_delay_rate", &battle_config.monster_damage_delay_rate, 100, 0, INT_MAX, },
{ "monster_loot_type", &battle_config.monster_loot_type, 0, 0, 1, },
//{ "mob_skill_use", &battle_config.mob_skill_use, 1, 0, 1, }, //Deprecated
{ "mob_skill_rate", &battle_config.mob_skill_rate, 100, 0, INT_MAX, },
{ "mob_skill_delay", &battle_config.mob_skill_delay, 100, 0, INT_MAX, },
{ "mob_count_rate", &battle_config.mob_count_rate, 100, 0, INT_MAX, },
Expand Down
16 changes: 0 additions & 16 deletions src/map/itemdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,6 @@ static int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const
* WeaponLv: Weapon Level
* EquipLv: Equip required level or [min, max]
* Refine: Refineable
* View: View ID
* BindOnEquip: (true or false)
* BuyingStore: (true or false)
* Delay: Delay to use item
Expand Down Expand Up @@ -2219,21 +2218,6 @@ static int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const
if (map->setting_lookup_const(it, "ViewSprite", &i32) && i32 >= 0)
id.view_sprite = i32;

if (map->setting_lookup_const(it, "View", &i32) && i32 >= 0) { // TODO: Remove (Deprecated - 2016-09-04 [Haru])
if ((id.type == IT_WEAPON || id.type == IT_AMMO) && id.subtype == 0) {
ShowWarning("itemdb_readdb_libconfig_sub: The 'View' field is deprecated. Please rename it to 'Subtype' (or 'ViewSprite'). (Item #%d: %s)\n",
id.nameid, id.name);
id.subtype = i32;
} else if ((id.type != IT_WEAPON && id.type != IT_AMMO) && id.view_sprite == 0) {
ShowWarning("itemdb_readdb_libconfig_sub: The 'View' field is deprecated. Please rename it to 'ViewSprite' (or 'Subtype'). (Item #%d: %s)\n",
id.nameid, id.name);
id.view_sprite = i32;
} else {
ShowWarning("itemdb_readdb_libconfig_sub: The 'View' field is deprecated. Please rename it to 'Subtype' or 'ViewSprite'. (Item #%d: %s)\n",
id.nameid, id.name);
}
}

if( (t = libconfig->setting_get_member(it, "BindOnEquip")) )
id.flag.bindonequip = libconfig->setting_get_bool(t) ? 1 : 0;

Expand Down
38 changes: 0 additions & 38 deletions src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -25013,43 +25013,6 @@ static BUILDIN(unbindatcmd)
return true;
}

static BUILDIN(useatcmd)
{
struct map_session_data *sd = NULL;
struct map_session_data *dummy_sd = NULL;
int fd;
const char* cmd;

cmd = script_getstr(st,2);

if (st->rid != 0 && (sd = map->id2sd(st->rid)) != NULL) {
fd = sd->fd;
} else {
// Use a dummy character.
sd = dummy_sd = pc->get_dummy_sd();
fd = 0;

if( st->oid ) {
struct block_list* bl = map->id2bl(st->oid);
memcpy(&sd->bl, bl, sizeof(struct block_list));
if (bl->type == BL_NPC)
safestrncpy(sd->status.name, BL_UCAST(BL_NPC, bl)->name, NAME_LENGTH);
}
}

// compatibility with previous implementation (deprecated!)
if( cmd[0] != atcommand->at_symbol ) {
cmd += strlen(sd->status.name);
while( *cmd != atcommand->at_symbol && *cmd != 0 )
cmd++;
}

atcommand->exec(fd, sd, cmd, true);
if (dummy_sd)
aFree(dummy_sd);
return true;
}

static BUILDIN(has_permission)
{
struct map_session_data *sd;
Expand Down Expand Up @@ -28779,7 +28742,6 @@ static void script_parse_builtin(void)
**/
BUILDIN_DEF(bindatcmd, "ss???"),
BUILDIN_DEF(unbindatcmd, "s"),
BUILDIN_DEF_DEPRECATED(useatcmd, "s"),
BUILDIN_DEF(has_permission, "v?"),
BUILDIN_DEF(can_use_command, "s?"),
BUILDIN_DEF(add_group_command, "siii"),
Expand Down
6 changes: 3 additions & 3 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@ static int skill_additional_effect(struct block_list *src, struct block_list *bl
#endif
break;

case BA_FROSTJOKER:
case BA_FROSTJOKE:
sc_start(src, bl, SC_FREEZE, (15 + 5 * skill_lv), skill_lv, skill->get_time2(skill_id, skill_lv), skill_id);
break;

Expand Down Expand Up @@ -4384,7 +4384,7 @@ static int skill_timerskill(int tid, int64 tick, int id, intptr_t data)
unit->warp(target, -1, x, y, CLR_TELEPORT);
}
break;
case BA_FROSTJOKER:
case BA_FROSTJOKE:
case DC_SCREAM:
range= skill->get_splash(skl->skill_id, skl->skill_lv);
map->foreachinarea(skill->frostjoke_scream,skl->map,skl->x-range,skl->y-range,
Expand Down Expand Up @@ -8043,7 +8043,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
}
break;

case BA_FROSTJOKER:
case BA_FROSTJOKE:
case DC_SCREAM:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
skill->addtimerskill(src,tick+2000,bl->id,src->x,src->y,skill_id,skill_lv,0,flag);
Expand Down
2 changes: 1 addition & 1 deletion src/map/skill.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ enum e_skill {
BA_MUSICALLESSON,
BA_MUSICALSTRIKE,
BA_DISSONANCE,
BA_FROSTJOKER,
BA_FROSTJOKE,
BA_WHISTLE,
BA_ASSASSINCROSS,
BA_POEMBRAGI,
Expand Down