[Spells] SPA 299 Wake the Dead updates and crash fixes. SPA 306 Army of Dead implemented. (#1929)

* start

* wtd fix v1

* Update aa.cpp

* rework done, army of dead supported

* debugs

* Update aa.cpp

* Update spdat.h
This commit is contained in:
KayenEQ
2022-01-16 14:55:51 -05:00
committed by GitHub
parent 5f482a9b30
commit 5ebbbf647b
9 changed files with 259 additions and 138 deletions
+27 -2
View File
@@ -2295,10 +2295,35 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
//meh dupe issue with npc casting this
if(caster && caster->IsClient()){
int dur = spells[spell_id].max_value[i];
if (!dur)
if (!dur) {
dur = 60;
}
caster->WakeTheDead(spell_id, caster->GetTarget(), dur);
Mob* m_target = caster->GetTarget();
if (m_target) {
entity_list.TryWakeTheDead(caster, m_target, spell_id, 250, dur, 1);
}
}
break;
}
case SE_ArmyOfTheDead:
{
if (caster && caster->IsClient()) {
int dur = spells[spell_id].max_value[i];
if (!dur) {
dur = 60;
}
int amount = spells[spell_id].base_value[i];
if (!amount) {
amount = 1;
}
Mob* m_target = caster->GetTarget();
if (m_target) {
entity_list.TryWakeTheDead(caster, m_target, spell_id, 250, dur, amount);
}
}
break;
}