mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10607] Handle GAMEOBJECT_TYPE_GENERIC at Use() to trigger despawn of GO
In addition, a check is added to prevent unexpected call to Use() at received opcode. Despawn of this type GO can then only be used with explicit call to Use() Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
df4563e653
commit
c44438a517
3 changed files with 14 additions and 1 deletions
|
|
@ -285,6 +285,13 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
|||
if(!obj)
|
||||
return;
|
||||
|
||||
// Never expect this opcode for some type GO's
|
||||
if (obj->GetGoType() == GAMEOBJECT_TYPE_GENERIC)
|
||||
{
|
||||
sLog.outError("HandleGameObjectUseOpcode: CMSG_GAMEOBJ_USE for not allowed GameObject type %u (Entry %u), didn't expect this to happen.", obj->GetGoType(), obj->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
obj->Use(_player);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue