Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- src/map/map.h | 2 +-
- src/map/pc.c | 15 +++++++++++++++
- src/map/pc.h | 3 +++
- src/map/skill.c | 9 +++++++++
- 4 files changed, 28 insertions(+), 1 deletion(-)
- diff --git a/src/map/map.h b/src/map/map.h
- index 906202f..9ab5202 100644
- --- a/src/map/map.h
- +++ b/src/map/map.h
- @@ -410,7 +410,7 @@ enum _sp {
- SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049
- SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054
- SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST, //2055-2058
- -
- + SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS, // 2059-2061 [pan]
- /* must be the last, plugins add bonuses from this value onwards */
- SP_LAST_KNOWN,
- diff --git a/src/map/pc.c b/src/map/pc.c
- index fc1d56b..ca4d932 100644
- --- a/src/map/pc.c
- +++ b/src/map/pc.c
- @@ -2493,6 +2493,18 @@ int pc_bonus(struct map_session_data *sd,int type,int val) {
- if(sd->state.lr_flag != 2)
- sd->special_state.no_gemstone = 1;
- break;
- + case SP_NO_CATALYSTSTONES:
- + if(sd->state.lr_flag != 2)
- + sd->special_state.no_catalyststones = 1;
- + break;
- + case SP_NO_ELEMENTALSTONES:
- + if(sd->state.lr_flag != 2)
- + sd->special_state.no_elementalstones = 1;
- + break;
- + case SP_NO_PAINTCANS:
- + if(sd->state.lr_flag != 2)
- + sd->special_state.no_paintcans = 1;
- + break;
- case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
- if(sd->state.lr_flag != 2) {
- sd->special_state.intravision = 1;
- @@ -7225,6 +7237,9 @@ int pc_readparam(struct map_session_data* sd,int type)
- case SP_NO_WEAPON_DAMAGE:val = sd->special_state.no_weapon_damage; break;
- case SP_NO_MISC_DAMAGE: val = sd->special_state.no_misc_damage; break;
- case SP_NO_GEMSTONE: val = sd->special_state.no_gemstone?1:0; break;
- + case SP_NO_CATALYSTSTONES: val = sd->special_state.no_catalyststones?1:0; break;
- + case SP_NO_ELEMENTALSTONES:val = sd->special_state.no_elementalstones?1:0; break;
- + case SP_NO_PAINTCANS: val = sd->special_state.no_paintcans?1:0; break;
- case SP_INTRAVISION: val = sd->special_state.intravision?1:0; break;
- case SP_NO_KNOCKBACK: val = sd->special_state.no_knockback?1:0; break;
- case SP_SPLASH_RANGE: val = sd->bonus.splash_range; break;
- diff --git a/src/map/pc.h b/src/map/pc.h
- index 5264fa5..424a80a 100644
- --- a/src/map/pc.h
- +++ b/src/map/pc.h
- @@ -192,6 +192,9 @@ struct map_session_data {
- unsigned int perfect_hiding : 1; // [Valaris]
- unsigned int no_knockback : 1;
- unsigned int bonus_coma : 1;
- + unsigned int no_catalyststones : 1;
- + unsigned int no_elementalstones : 1;
- + unsigned int no_paintcans : 1;
- } special_state;
- int login_id1, login_id2;
- unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]
- diff --git a/src/map/skill.c b/src/map/skill.c
- index 71e343d..97e05c0 100644
- --- a/src/map/skill.c
- +++ b/src/map/skill.c
- @@ -13721,6 +13721,15 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
- req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
- }
- }
- + // 7521 to 7524 ninja stones
- + if( (req.itemid[i] >= 7521 && req.itemid[i] <= 7524) && sd->special_state.no_catalyststones )
- + req.itemid[i] = req.amount[i] = 0;
- + // 990 to 997 sorcerer stones only works when using summon skills
- + if( (req.itemid[i] >= 990 && req.itemid[i] <= 997) && sd->special_state.no_elementalstones
- + && (skill_id >= SO_SUMMON_AQUA && skill_id <= SO_SUMMON_TERA) )
- + req.itemid[i] = req.amount[i] = 0;
- + if( req.itemid[i] == 6123 && sd->special_state.no_paintcans )
- + req.itemid[i] = req.amount[i] = 0;
- if( skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0){
- int16 itIndex;
- if( (itIndex = pc->search_inventory(sd,req.itemid[i])) < 0 || ( itIndex >= 0 && sd->status.inventory[itIndex].amount < req.amount[i] ) ){
Advertisement
Add Comment
Please, Sign In to add comment