mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -832,6 +832,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject>
|
||||
GameObject* LookupFishingHoleAround(float range);
|
||||
|
||||
void CastSpell(Unit* target, uint32 spell, bool triggered = true);
|
||||
void CastSpell(Unit* target, uint32 spell, TriggerCastFlags triggered);
|
||||
void SendCustomAnim(uint32 anim);
|
||||
bool IsInRange(float x, float y, float z, float radius) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user