Core/Wintergrasp: fix possible crash when rebuild hits non rebuildable buildings

This commit is contained in:
Kandera
2012-08-22 13:08:57 -04:00
parent ad26178c3b
commit 85ed0e32a9
@@ -1192,11 +1192,14 @@ struct BfWGGameObjectBuilding
}
// Rebuild gameobject
if (m_Build->IsDestructibleBuilding())
{
m_Build->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
// Update worldstate
m_State = BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT - (m_Team * 3);
m_WG->SendUpdateWorldState(m_WorldState, m_State);
}
UpdateCreatureAndGo();
m_Build->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]);
}