From b864056b8d088660fca9129bddad477732ed8df9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 15 May 2013 17:31:33 -0300 Subject: For #7210 Pending. http://hercules.ws/board/tracker/issue-7210-itemskill-command-does-not-check-for-required-items/ Signed-off-by: shennetsind --- src/map/script.c | 5 +-- src/map/skill.c | 13 +++++-- src/map/status.c | 105 ++++++++++++++++++++++++++++--------------------------- 3 files changed, 66 insertions(+), 57 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 3d5045f02..fba6ef0e9 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8256,12 +8256,13 @@ BUILDIN(itemskill) { id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) ); lv = script_getnum(st,3); - +/* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ +#if 0 if( !script_hasdata(st, 4) ) { if( !skill->check_condition_castbegin(sd,id,lv) || !skill->check_condition_castend(sd,id,lv) ) return true; } - +#endif sd->skillitem=id; sd->skillitemlv=lv; clif->item_skill(sd,id,lv); diff --git a/src/map/skill.c b/src/map/skill.c index d10cdb1a9..a5714ccc5 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13207,10 +13207,13 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, return 0; break; } - + /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ +#if 0 if( sd->state.abra_flag ) // Casting finished (Hocus-Pocus) return 1; - +#endif + if( sd->skillitem == skill_id ) + return 1; if( pc_is90overweight(sd) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_WEIGHTOVER,0); return 0; @@ -13412,8 +13415,12 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 if( !sd ) return req; - + /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ +#if 0 if( sd->state.abra_flag ) +#else + if( sd->skillitem == skill_id ) +#endif return req; // Hocus-Pocus don't have requirements. sc = &sd->sc; diff --git a/src/map/status.c b/src/map/status.c index 7231013b3..fd9ef1d2e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9007,58 +9007,59 @@ int status_change_clear(struct block_list* bl, int type) { if(!sc->data[i]) continue; - if(type == 0) - switch (i) { //Type 0: PC killed -> Place here statuses that do not dispel on death. - case SC_ELEMENTALCHANGE://Only when its Holy or Dark that it doesn't dispell on death - if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK ) - break; - case SC_WEIGHT50: - case SC_WEIGHT90: - case SC_EDP: - case SC_MELTDOWN: - case SC_XMAS: - case SC_SUMMER: - case SC_HANBOK: - case SC_NOCHAT: - case SC_FUSION: - case SC_EARTHSCROLL: - case SC_READYSTORM: - case SC_READYDOWN: - case SC_READYCOUNTER: - case SC_READYTURN: - case SC_DODGE: - case SC_JAILED: - case SC_EXPBOOST: - case SC_ITEMBOOST: - case SC_HELLPOWER: - case SC_JEXPBOOST: - case SC_AUTOTRADE: - case SC_WHISTLE: - case SC_ASSNCROS: - case SC_POEMBRAGI: - case SC_APPLEIDUN: - case SC_HUMMING: - case SC_DONTFORGETME: - case SC_FORTUNE: - case SC_SERVICE4U: - case SC_FOOD_STR_CASH: - case SC_FOOD_AGI_CASH: - case SC_FOOD_VIT_CASH: - case SC_FOOD_DEX_CASH: - case SC_FOOD_INT_CASH: - case SC_FOOD_LUK_CASH: - case SC_DEF_RATE: - case SC_MDEF_RATE: - case SC_INCHEALRATE: - case SC_INCFLEE2: - case SC_INCHIT: - case SC_ATKPOTION: - case SC_MATKPOTION: - case SC_S_LIFEPOTION: - case SC_L_LIFEPOTION: - case SC_PUSH_CART: - case SC_ALL_RIDING: - continue; + if(type == 0) { + switch (i) { //Type 0: PC killed -> Place here statuses that do not dispel on death. + case SC_ELEMENTALCHANGE://Only when its Holy or Dark that it doesn't dispell on death + if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK ) + break; + case SC_WEIGHT50: + case SC_WEIGHT90: + case SC_EDP: + case SC_MELTDOWN: + case SC_XMAS: + case SC_SUMMER: + case SC_HANBOK: + case SC_NOCHAT: + case SC_FUSION: + case SC_EARTHSCROLL: + case SC_READYSTORM: + case SC_READYDOWN: + case SC_READYCOUNTER: + case SC_READYTURN: + case SC_DODGE: + case SC_JAILED: + case SC_EXPBOOST: + case SC_ITEMBOOST: + case SC_HELLPOWER: + case SC_JEXPBOOST: + case SC_AUTOTRADE: + case SC_WHISTLE: + case SC_ASSNCROS: + case SC_POEMBRAGI: + case SC_APPLEIDUN: + case SC_HUMMING: + case SC_DONTFORGETME: + case SC_FORTUNE: + case SC_SERVICE4U: + case SC_FOOD_STR_CASH: + case SC_FOOD_AGI_CASH: + case SC_FOOD_VIT_CASH: + case SC_FOOD_DEX_CASH: + case SC_FOOD_INT_CASH: + case SC_FOOD_LUK_CASH: + case SC_DEF_RATE: + case SC_MDEF_RATE: + case SC_INCHEALRATE: + case SC_INCFLEE2: + case SC_INCHIT: + case SC_ATKPOTION: + case SC_MATKPOTION: + case SC_S_LIFEPOTION: + case SC_L_LIFEPOTION: + case SC_PUSH_CART: + case SC_ALL_RIDING: + continue; + } } if( type == 3 ) { -- cgit v1.2.3-60-g2f50