Core/Spells: Change low level bool triggered with bitmask TriggerCastFlags to better manipulate the behaviour of certain triggered spells.

This commit is contained in:
Machiavelli
2011-07-31 21:58:25 +02:00
parent 8753a18263
commit 58f10c74f7
11 changed files with 132 additions and 96 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ void PetAI::UpdateAI(const uint32 diff)
continue;
}
Spell* spell = new Spell(me, spellInfo, false, 0);
Spell* spell = new Spell(me, spellInfo, TRIGGERED_NONE, 0);
// Fix to allow pets on STAY to autocast
if (me->getVictim() && _CanAttack(me->getVictim()) && spell->CanAutoCast(me->getVictim()))
@@ -170,7 +170,7 @@ void ScriptedAI::DoCastSpell(Unit* pTarget, SpellInfo const* pSpellInfo, bool bT
return;
me->StopMoving();
me->CastSpell(pTarget, pSpellInfo, bTriggered);
me->CastSpell(pTarget, pSpellInfo, bTriggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
}
void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId)