Caryatis
07-16-2010, 01:24 AM
Used in the monk 2.0 epic click Peace of the Disciple (http://lucy.allakhazam.com/spell.html?id=6270&source=Live) and everybody's favorite MPG trial Test of Efficiency (http://lucy.allakhazam.com/spell.html?id=5708&source=Live), also used in some player spells like Wake of Atrophy (http://lucy.allakhazam.com/spell.html?id=14644&source=Live).
code...
spell effects
Index: spell_effects.cpp
================================================== =================
--- spell_effects.cpp (revision 1602)
+++ spell_effects.cpp (working copy)
@@ -2812,6 +2812,7 @@
case SE_LimitCastTime:
case SE_NoCombatSkills:
case SE_TriggerOnCast:
+ case SE_MaxHPChange:
{
break;
}
mob.h
Index: mob.h
================================================== =================
--- mob.h (revision 1602)
+++ mob.h (working copy)
@@ -582,7 +582,7 @@
inline sint32 GetHP() const { return cur_hp; }
inline sint32 GetMaxHP() const { return max_hp; }
- virtual inline sint32 CalcMaxHP() { return max_hp = (base_hp + itembonuses.HP + spellbonuses.HP); }
+ virtual sint32 CalcMaxHP();
float GetWalkspeed() const { return(_GetMovementSpeed(-47)); }
float GetRunspeed() const { return(_GetMovementSpeed(0)); }
float GetBaseRunspeed() const { return runspeed; }
mob.cpp
Index: mob.cpp
================================================== =================
--- mob.cpp (revision 1602)
+++ mob.cpp (working copy)
@@ -596,6 +596,25 @@
return max_mana;
}
+sint32 Mob::CalcMaxHP()
+{
+
+ max_hp = (base_hp + itembonuses.HP + spellbonuses.HP);
+
+ int slot = GetBuffSlotFromType(SE_MaxHPChange);
+ if(slot >= 0)
+ {
+ for(int i = 0; i < EFFECT_COUNT; i++)
+ {
+ if (spells[buffs[slot].spellid].effectid[i] == SE_MaxHPChange)
+ {
+ max_hp += max_hp * spells[buffs[slot].spellid].base[i] / 10000;
+ }
+ }
+ }
+ return max_hp;
+}
+
char Mob::GetCasterClass() const {
switch(class_)
{
client mods.cpp
Index: client_mods.cpp
================================================== =================
--- client_mods.cpp (revision 1602)
+++ client_mods.cpp (working copy)
@@ -240,6 +240,18 @@
max_hp += GroupLeadershipAAHealthEnhancement();
+ int slot = GetBuffSlotFromType(SE_MaxHPChange);
+ if(slot >= 0)
+ {
+ for(int i = 0; i < EFFECT_COUNT; i++)
+ {
+ if (spells[buffs[slot].spellid].effectid[i] == SE_MaxHPChange)
+ {
+ max_hp += max_hp * spells[buffs[slot].spellid].base[i] / 10000;
+ }
+ }
+ }
+
if (cur_hp > max_hp)
cur_hp = max_hp;
return max_hp;
code...
spell effects
Index: spell_effects.cpp
================================================== =================
--- spell_effects.cpp (revision 1602)
+++ spell_effects.cpp (working copy)
@@ -2812,6 +2812,7 @@
case SE_LimitCastTime:
case SE_NoCombatSkills:
case SE_TriggerOnCast:
+ case SE_MaxHPChange:
{
break;
}
mob.h
Index: mob.h
================================================== =================
--- mob.h (revision 1602)
+++ mob.h (working copy)
@@ -582,7 +582,7 @@
inline sint32 GetHP() const { return cur_hp; }
inline sint32 GetMaxHP() const { return max_hp; }
- virtual inline sint32 CalcMaxHP() { return max_hp = (base_hp + itembonuses.HP + spellbonuses.HP); }
+ virtual sint32 CalcMaxHP();
float GetWalkspeed() const { return(_GetMovementSpeed(-47)); }
float GetRunspeed() const { return(_GetMovementSpeed(0)); }
float GetBaseRunspeed() const { return runspeed; }
mob.cpp
Index: mob.cpp
================================================== =================
--- mob.cpp (revision 1602)
+++ mob.cpp (working copy)
@@ -596,6 +596,25 @@
return max_mana;
}
+sint32 Mob::CalcMaxHP()
+{
+
+ max_hp = (base_hp + itembonuses.HP + spellbonuses.HP);
+
+ int slot = GetBuffSlotFromType(SE_MaxHPChange);
+ if(slot >= 0)
+ {
+ for(int i = 0; i < EFFECT_COUNT; i++)
+ {
+ if (spells[buffs[slot].spellid].effectid[i] == SE_MaxHPChange)
+ {
+ max_hp += max_hp * spells[buffs[slot].spellid].base[i] / 10000;
+ }
+ }
+ }
+ return max_hp;
+}
+
char Mob::GetCasterClass() const {
switch(class_)
{
client mods.cpp
Index: client_mods.cpp
================================================== =================
--- client_mods.cpp (revision 1602)
+++ client_mods.cpp (working copy)
@@ -240,6 +240,18 @@
max_hp += GroupLeadershipAAHealthEnhancement();
+ int slot = GetBuffSlotFromType(SE_MaxHPChange);
+ if(slot >= 0)
+ {
+ for(int i = 0; i < EFFECT_COUNT; i++)
+ {
+ if (spells[buffs[slot].spellid].effectid[i] == SE_MaxHPChange)
+ {
+ max_hp += max_hp * spells[buffs[slot].spellid].base[i] / 10000;
+ }
+ }
+ }
+
if (cur_hp > max_hp)
cur_hp = max_hp;
return max_hp;