Manual merge of TargetRing pull request #286.

This commit is contained in:
JJ
2014-11-10 10:00:53 -05:00
parent 384d8c6167
commit d5efa0f23c
11 changed files with 59 additions and 6 deletions
+15
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,12 @@ 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);