mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/ScriptSystem: Add a PlayerScript::OnSpellCast(Player *player, Spell *spell, bool skipCheck) function.
Requested by Zor. --HG-- branch : trunk
This commit is contained in:
@@ -3133,6 +3133,11 @@ void Spell::cast(bool skipCheck)
|
||||
}
|
||||
}
|
||||
|
||||
// now that we've done the basic check, now run the scripts
|
||||
// should be done before the spell is actually executed
|
||||
if (Player *playerCaster = m_caster->ToPlayer())
|
||||
sScriptMgr.OnPlayerSpellCast(playerCaster, this, skipCheck);
|
||||
|
||||
SetExecutedCurrently(true);
|
||||
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER && m_targets.getUnitTarget() && m_targets.getUnitTarget() != m_caster)
|
||||
|
||||
Reference in New Issue
Block a user