mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
refactor(Core/GameObject): Move the GameObject state save handling to… (#18080)
* refactor(Core/GameObject): Move the GameObject state save handling to instance level * Update GameObject.h * remove leftover * small improvements
This commit is contained in:
@@ -46,17 +46,17 @@ public:
|
||||
case GO_DOOR_LEVER_2:
|
||||
case GO_DOOR_LEVER_3:
|
||||
case GO_CANNON:
|
||||
gameobject->UpdateSaveToDb(true);
|
||||
gameobject->AllowSaveToDB(true);
|
||||
break;
|
||||
case GO_FACTORY_DOOR:
|
||||
gameobject->UpdateSaveToDb(true);
|
||||
gameobject->AllowSaveToDB(true);
|
||||
// GoState (Door opened) is restored during GO creation, but we need to set LootState to prevent Lever from closing it again
|
||||
if (_encounters[TYPE_RHAHK_ZOR] == DONE)
|
||||
gameobject->SetLootState(GO_ACTIVATED);
|
||||
break;
|
||||
case GO_IRON_CLAD_DOOR:
|
||||
gameobject->UpdateSaveToDb(true);
|
||||
if (gameobject->GetStateSavedOnInstance() == GO_STATE_ACTIVE)
|
||||
gameobject->AllowSaveToDB(true);
|
||||
if (GetStoredGameObjectState(gameobject->GetSpawnId()) == GO_STATE_ACTIVE)
|
||||
{
|
||||
gameobject->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user