Implemented spell Target Type (45) 'Target Rings' on Underfoot.

Thanks to Lecht for figuring out op code side of it.
This commit is contained in:
KayenEQ
2014-11-09 22:37:12 -05:00
parent d8a8b8e6dc
commit d656db843a
11 changed files with 62 additions and 6 deletions
+14
View File
@@ -368,6 +368,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
if((IsGroupSpell(spell_id) ||
spell.targettype == ST_Self ||
spell.targettype == ST_AECaster ||
spell.targettype == ST_Ring ||
spell.targettype == ST_TargetOptional) && target_id == 0)
{
mlog(SPELLS__CASTING, "Spell %d auto-targeted the caster. Group? %d, target type %d", spell_id, IsGroupSpell(spell_id), spell.targettype);
@@ -1802,6 +1803,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
break;
}
case ST_Ring:
{
CastAction = TargetRing;
spell_target = nullptr;
ae_center = nullptr;
break;
}
default:
{
mlog(SPELLS__CASTING_ERR, "I dont know Target Type: %d Spell: (%d) %s", spells[spell_id].targettype, spell_id, spells[spell_id].name);
@@ -2165,6 +2174,11 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
}
break;
}
case TargetRing:{
entity_list.AESpell(this, nullptr, spell_id, false, resist_adjust);
break;
}
}
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);