mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/Garrisons: Fixed building gameobject id used for buildings under construction when *ConstructionGameObjectID is empty
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user