diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-06-29 16:31:29 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-06-29 16:31:29 +0200 |
commit | a51300f8142d5ef2a7965ec4c5be97c5fc1cf33b (patch) | |
tree | d4be7877c43b5840cca9aeb2940486290b30be6a /src | |
parent | d4deb17a2f94d06b7eab232b90e874fa58675b36 (diff) |
Core/Garrisons: Fixed building gameobject id used for buildings under construction when *ConstructionGameObjectID is empty
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Garrison/Garrison.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/game/Garrison/Garrison.cpp b/src/server/game/Garrison/Garrison.cpp index f4669b2b340..7040ae65b19 100644 --- a/src/server/game/Garrison/Garrison.cpp +++ b/src/server/game/Garrison/Garrison.cpp @@ -691,10 +691,9 @@ GameObject* Garrison::Plot::CreateGameObject(Map* map, GarrisonFactionIndex fact GarrPlotInstanceEntry const* plotInstance = sGarrPlotInstanceStore.AssertEntry(PacketInfo.GarrPlotInstanceID); GarrPlotEntry const* plot = sGarrPlotStore.AssertEntry(plotInstance->GarrPlotID); GarrBuildingEntry const* building = sGarrBuildingStore.AssertEntry(BuildingInfo.PacketInfo->GarrBuildingID); - if (BuildingInfo.PacketInfo->Active) + entry = faction == GARRISON_FACTION_INDEX_HORDE ? plot->HordeConstructionGameObjectID : plot->AllianceConstructionGameObjectID; + if (BuildingInfo.PacketInfo->Active || !entry) entry = faction == GARRISON_FACTION_INDEX_HORDE ? building->HordeGameObjectID : building->AllianceGameObjectID; - else - entry = faction == GARRISON_FACTION_INDEX_HORDE ? plot->HordeConstructionGameObjectID : plot->AllianceConstructionGameObjectID; } if (!sObjectMgr->GetGameObjectTemplate(entry)) |