mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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
|
|
@ -974,6 +974,12 @@ void GameObject::Use(Unit* user)
|
|||
|
||||
return;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_GENERIC: // 5
|
||||
{
|
||||
// No known way to exclude some - only different approach is to select despawnable GOs by Entry
|
||||
SetLootState(GO_JUST_DEACTIVATED);
|
||||
return;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_CHAIR: //7 Sitting: Wooden bench, chairs
|
||||
{
|
||||
GameObjectInfo const* info = GetGOInfo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue