Might be nice to finally implement these spells..
I am not sure about many details in this code area, hence this rewrite of the patch might be rather bad.
Any input is very welcome!
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f354cff..ad03a17 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7420,7 +7420,7 @@ void Aura::PeriodicTick()
float gain_multiplier = 0;
- if(pCaster->GetMaxPower(power) > 0)
+ if (pCaster->GetMaxPower(power) > 0)
{
gain_multiplier = spellProto->EffectMultipleValue[GetEffIndex()];
@@ -7442,6 +7442,25 @@ void Aura::PeriodicTick()
target->AddThreat(pCaster, float(gain) * 0.5f, pInfo.critical, GetSpellSchoolMask(spellProto), spellProto);
}
+
+ // TODO - Other place for this? send-log, do drain?
+ // All power drained, some spells can trigger an additional spell
+ if (target->GetPower(power) == 0)
+ {
+ switch (GetId())
+ {
+ case 32960: // Mark of Kazzak
+ {
+ if (target && target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() == POWER_MANA)
+ target->CastSpell(target, 32961, true, NULL, this);
+
+ // TODO - how?
+ target->RemoveAura(this);
+ break;
+ }
+ }
+ }
+
break;
}
case SPELL_AURA_PERIODIC_ENERGIZE: