mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
*Fix a crash when go is removed but m_ObjectSlot is not cleared.
--HG-- branch : trunk
This commit is contained in:
@@ -4664,6 +4664,15 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
|
||||
|
||||
gameObj->SetOwnerGUID(0);
|
||||
|
||||
for(uint32 i = 0; i < 4; ++i)
|
||||
{
|
||||
if(m_ObjectSlot[i] == gameObj->GetGUID())
|
||||
{
|
||||
m_ObjectSlot[i] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// GO created by some spell
|
||||
if (uint32 spellid = gameObj->GetSpellId())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user