Skip to content

Commit

Permalink
Spell: Safeguard go use which has lockId and should be used by spell
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Feb 7, 2024
1 parent c388849 commit 2ac06f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/Spells/SpellHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recv_data)
if (!obj->IsAtInteractDistance(_player))
return;

if (obj->GetSpellForLock(_player))
{
sLog.outError("HandleGameObjectUseOpcode: CMSG_GAMEOBJ_USE for spell locked object (Entry %u), didn't expect this to happen.", obj->GetEntry());
return;
}

// Additional check preventing exploits (ie loot despawned chests)
if (!obj->IsSpawned())
{
Expand Down

0 comments on commit 2ac06f1

Please sign in to comment.