mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
[7992] added additionally check for SPELL_EFFECT_OPEN_LOCK Author: arrai
Every gameobject which may be a target of such a spelleffect
has to have a lockid. Prior to this commit it was possible to
exploit SPELL_EFFECT_OPEN_LOCK spells and despawn abitrary GOs
--HG--
branch : trunk
This commit is contained in:
@@ -4565,7 +4565,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
// get the lock entry
|
||||
uint32 lockId = 0;
|
||||
if (GameObject* go = m_targets.getGOTarget())
|
||||
{
|
||||
lockId = go->GetLockId();
|
||||
if (!lockId)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
}
|
||||
else if(Item* itm = m_targets.getItemTarget())
|
||||
lockId = itm->GetProto()->LockID;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user