mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16: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
|
// get the lock entry
|
||||||
uint32 lockId = 0;
|
uint32 lockId = 0;
|
||||||
if (GameObject* go = m_targets.getGOTarget())
|
if (GameObject* go = m_targets.getGOTarget())
|
||||||
|
{
|
||||||
lockId = go->GetLockId();
|
lockId = go->GetLockId();
|
||||||
|
if (!lockId)
|
||||||
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
}
|
||||||
else if(Item* itm = m_targets.getItemTarget())
|
else if(Item* itm = m_targets.getItemTarget())
|
||||||
lockId = itm->GetProto()->LockID;
|
lockId = itm->GetProto()->LockID;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7991"
|
#define REVISION_NR "7992"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue