summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-07-30 11:55:45 -0400
committergumi <git@gumi.ca>2018-07-30 13:01:16 -0400
commit87eb2f98518a63a3f640b97ad62c8b18a5d6b946 (patch)
treeb56d31a13d363d1d706caf1d30cb3381b61f057f /src/map/skill.c
parenta28504fce050c8967b092759f1374d22c7a7ec0e (diff)
downloadhercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.gz
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.bz2
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.xz
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.zip
always set the type when doing script->add_str
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a4ebff9f1..914114fde 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3212,8 +3212,8 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li
}
tsd->reproduceskill_id = copy_skill;
- pc_setglobalreg(tsd, script->add_str("REPRODUCE_SKILL"), copy_skill);
- pc_setglobalreg(tsd, script->add_str("REPRODUCE_SKILL_LV"), lv);
+ pc_setglobalreg(tsd, script->add_variable("REPRODUCE_SKILL"), copy_skill);
+ pc_setglobalreg(tsd, script->add_variable("REPRODUCE_SKILL_LV"), lv);
tsd->status.skill[cidx].id = copy_skill;
tsd->status.skill[cidx].lv = lv;
@@ -3236,8 +3236,8 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li
lv = plagiarismlvl;
tsd->cloneskill_id = copy_skill;
- pc_setglobalreg(tsd, script->add_str("CLONE_SKILL"), copy_skill);
- pc_setglobalreg(tsd, script->add_str("CLONE_SKILL_LV"), lv);
+ pc_setglobalreg(tsd, script->add_variable("CLONE_SKILL"), copy_skill);
+ pc_setglobalreg(tsd, script->add_variable("CLONE_SKILL_LV"), lv);
tsd->status.skill[cidx].id = copy_skill;
tsd->status.skill[cidx].lv = lv;
@@ -6752,7 +6752,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
}
sd->mission_mobid = id;
sd->mission_count = 0;
- pc_setglobalreg(sd,script->add_str("TK_MISSION_ID"), id);
+ pc_setglobalreg(sd,script->add_variable("TK_MISSION_ID"), id);
clif->mission_info(sd, id, 0);
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
}
@@ -8531,7 +8531,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
if (skill_id == SL_SUPERNOVICE && dstsd && dstsd->die_counter && !(rnd()%100)) {
//Erase death count 1% of the casts
dstsd->die_counter = 0;
- pc_setglobalreg(dstsd,script->add_str("PC_DIE_COUNTER"), 0);
+ pc_setglobalreg(dstsd,script->add_variable("PC_DIE_COUNTER"), 0);
clif->specialeffect(bl, 0x152, AREA);
//SC_SOULLINK invokes status_calc_pc for us.
}
@@ -18480,7 +18480,7 @@ static int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int n
{ //Cooking items.
clif->specialeffect(&sd->bl, 608, AREA);
if( sd->cook_mastery < 1999 )
- pc_setglobalreg(sd, script->add_str("COOK_MASTERY"),sd->cook_mastery + ( 1 << ( (skill->dbs->produce_db[idx].itemlv - 11) / 2 ) ) * 5);
+ pc_setglobalreg(sd, script->add_variable("COOK_MASTERY"),sd->cook_mastery + ( 1 << ( (skill->dbs->produce_db[idx].itemlv - 11) / 2 ) ) * 5);
}
break;
}
@@ -18591,7 +18591,7 @@ static int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int n
{ //Cooking items.
clif->specialeffect(&sd->bl, 609, AREA);
if( sd->cook_mastery > 0 )
- pc_setglobalreg(sd, script->add_str("COOK_MASTERY"), sd->cook_mastery - ( 1 << ((skill->dbs->produce_db[idx].itemlv - 11) / 2) ) - ( ( ( 1 << ((skill->dbs->produce_db[idx].itemlv - 11) / 2) ) >> 1 ) * 3 ));
+ pc_setglobalreg(sd, script->add_variable("COOK_MASTERY"), sd->cook_mastery - ( 1 << ((skill->dbs->produce_db[idx].itemlv - 11) / 2) ) - ( ( ( 1 << ((skill->dbs->produce_db[idx].itemlv - 11) / 2) ) >> 1 ) * 3 ));
}
}
}