Guest User

No stones[final] by pan

a guest
Dec 30th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.76 KB | None | 0 0
  1. http://hercules.ws/board/topic/3546-expanding-mistress-effect/
  2.  src/map/map.h   |  2 +-
  3.  src/map/pc.c    | 20 ++++++++++++++++++++
  4.  src/map/pc.h    |  4 ++++
  5.  src/map/skill.c | 15 +++++++++++++++
  6.  4 files changed, 40 insertions(+), 1 deletion(-)
  7.  
  8. diff --git a/src/map/map.h b/src/map/map.h
  9. index 906202f..6eae8aa 100644
  10. --- a/src/map/map.h
  11. +++ b/src/map/map.h
  12. @@ -410,7 +410,7 @@ enum _sp {
  13.     SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049
  14.     SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054
  15.     SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST,  //2055-2058
  16. -  
  17. +   SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS,SP_NO_FUEL, // 2059-2062 [pan]
  18.    
  19.     /* must be the last, plugins add bonuses from this value onwards */
  20.     SP_LAST_KNOWN,
  21. diff --git a/src/map/pc.c b/src/map/pc.c
  22. index fc1d56b..4336af5 100644
  23. --- a/src/map/pc.c
  24. +++ b/src/map/pc.c
  25. @@ -2493,6 +2493,22 @@ int pc_bonus(struct map_session_data *sd,int type,int val) {
  26.             if(sd->state.lr_flag != 2)
  27.                 sd->special_state.no_gemstone = 1;
  28.             break;
  29. +       case SP_NO_CATALYSTSTONES:
  30. +           if(sd->state.lr_flag != 2)
  31. +               sd->special_state.no_catalyststones = 1;
  32. +           break;
  33. +       case SP_NO_ELEMENTALSTONES:
  34. +           if(sd->state.lr_flag != 2)
  35. +               sd->special_state.no_elementalstones = 1;
  36. +           break;
  37. +       case SP_NO_PAINTCANS:
  38. +           if(sd->state.lr_flag != 2)
  39. +               sd->special_state.no_paintcans = 1;
  40. +           break;
  41. +       case SP_NO_FUEL:
  42. +           if(sd->state.lr_flag != 2)
  43. +               sd->special_state.no_fuel = 1;
  44. +           break;
  45.         case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
  46.             if(sd->state.lr_flag != 2) {
  47.                 sd->special_state.intravision = 1;
  48. @@ -7225,6 +7241,10 @@ int pc_readparam(struct map_session_data* sd,int type)
  49.         case SP_NO_WEAPON_DAMAGE:val = sd->special_state.no_weapon_damage; break;
  50.         case SP_NO_MISC_DAMAGE:  val = sd->special_state.no_misc_damage; break;
  51.         case SP_NO_GEMSTONE:     val = sd->special_state.no_gemstone?1:0; break;
  52. +       case SP_NO_CATALYSTSTONES: val = sd->special_state.no_catalyststones?1:0; break;
  53. +       case SP_NO_ELEMENTALSTONES:val = sd->special_state.no_elementalstones?1:0; break;
  54. +       case SP_NO_PAINTCANS:    val = sd->special_state.no_paintcans?1:0; break;
  55. +       case SP_NO_FUEL:         val = sd->special_state.no_fuel?1:0; break;
  56.         case SP_INTRAVISION:     val = sd->special_state.intravision?1:0; break;
  57.         case SP_NO_KNOCKBACK:    val = sd->special_state.no_knockback?1:0; break;
  58.         case SP_SPLASH_RANGE:    val = sd->bonus.splash_range; break;
  59. diff --git a/src/map/pc.h b/src/map/pc.h
  60. index 5264fa5..02dc124 100644
  61. --- a/src/map/pc.h
  62. +++ b/src/map/pc.h
  63. @@ -192,6 +192,10 @@ struct map_session_data {
  64.         unsigned int perfect_hiding : 1; // [Valaris]
  65.         unsigned int no_knockback : 1;
  66.         unsigned int bonus_coma : 1;
  67. +       unsigned int no_catalyststones : 1;
  68. +       unsigned int no_elementalstones : 1;
  69. +       unsigned int no_paintcans : 1;
  70. +       unsigned int no_fuel : 1;
  71.     } special_state;
  72.     int login_id1, login_id2;
  73.     unsigned short class_;  //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]
  74. diff --git a/src/map/skill.c b/src/map/skill.c
  75. index 71e343d..58984aa 100644
  76. --- a/src/map/skill.c
  77. +++ b/src/map/skill.c
  78. @@ -13721,6 +13721,17 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
  79.                     req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
  80.             }
  81.         }
  82. +
  83. +       // 7521 to 7524 ninja stones
  84. +       if( (req.itemid[i] >= 7521 && req.itemid[i] <= 7524) && sd->special_state.no_catalyststones )
  85. +           req.itemid[i] = req.amount[i] = 0;
  86. +       // 6120 to 6123 Paint related items
  87. +       if( (req.itemid[i] >= 6120 && req.itemid[i] <= 6123) && sd->special_state.no_paintcans )
  88. +           req.itemid[i] = req.amount[i] = 0;
  89. +       // 6146 Magic fuel
  90. +       if( req.itemid[i] == 6146 && sd->special_state.no_fuel )
  91. +           req.itemid[i] = req.amount[i] = 0;
  92. +
  93.         if( skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0){
  94.             int16 itIndex;
  95.             if( (itIndex = pc->search_inventory(sd,req.itemid[i])) < 0  || ( itIndex >= 0 && sd->status.inventory[itIndex].amount < req.amount[i] ) ){
  96. @@ -13747,6 +13758,10 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
  97.             req.amount[skill_lv-1] = skill->db[idx].amount[skill_lv-1];
  98.             break;
  99.     }
  100. +   // 990 to 997 sorcerer stones only works when using summon skills
  101. +   if( (req.itemid[skill_lv-1] >= 990 && req.itemid[skill_lv-1] <= 997) && sd->special_state.no_elementalstones
  102. +       && (skill_id >= SO_SUMMON_AGNI && skill_id <= SO_SUMMON_TERA) )
  103. +       req.itemid[skill_lv-1] = req.amount[skill_lv-1] = 0;
  104.  
  105.     // Check for cost reductions due to skills & SCs
  106.     switch(skill_id) {
Advertisement
Add Comment
Please, Sign In to add comment