AI/SmartScripts: Add param3 to SMART_ACTION_CAST and SMART_ACTION_INVOKER_CAST that allows specific triggered flags to be set (rather than all-or-nothing). Ignored if SMARTCAST_TRIGGERED is not set.

This commit is contained in:
treeston
2016-08-19 15:23:19 +02:00
parent 14b44af38d
commit 9072e0221b
5 changed files with 53 additions and 20 deletions

View File

@@ -1780,7 +1780,12 @@ void GameObject::Use(Unit* user)
CastSpell(user, spellId);
}
void GameObject::CastSpell(Unit* target, uint32 spellId, bool triggered /*= true*/)
void GameObject::CastSpell(Unit* target, uint32 spellId, bool triggered /* = true*/)
{
CastSpell(target, spellId, triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
}
void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags triggered)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)