mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7992] added additionally check for SPELL_EFFECT_OPEN_LOCK
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
This commit is contained in:
parent
ea0f9bcf09
commit
2412e1fc9c
2 changed files with 5 additions and 1 deletions
|
|
@ -4273,7 +4273,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue