aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Garrison/Garrison.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-05-07 17:45:09 +0200
committerShauren <shauren.trinity@gmail.com>2018-05-07 17:45:09 +0200
commit921235b3e9af0d72c49035016065552a7b34d9ca (patch)
treedfbfe479d9861caade8995ddf11d928d776183e1 /src/server/game/Garrison/Garrison.cpp
parentb773d9997bdd723cad8c646170e025a48f140f1d (diff)
Core/Misc: Fixed rotation of many gameobjects summoned in tol barad, garrison and various scripts
Diffstat (limited to 'src/server/game/Garrison/Garrison.cpp')
-rw-r--r--src/server/game/Garrison/Garrison.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Garrison/Garrison.cpp b/src/server/game/Garrison/Garrison.cpp
index 4dc4db59775..6a966ccb5d9 100644
--- a/src/server/game/Garrison/Garrison.cpp
+++ b/src/server/game/Garrison/Garrison.cpp
@@ -273,6 +273,7 @@ void Garrison::InitializePlots()
plotInfo.PacketInfo.GarrPlotInstanceID = garrPlotInstanceId;
plotInfo.PacketInfo.PlotPos = Position(gameObject->Pos.X, gameObject->Pos.Y, gameObject->Pos.Z, 2 * std::acos(gameObject->Rot[3]));
plotInfo.PacketInfo.PlotType = plot->PlotType;
+ plotInfo.Rotation = QuaternionData(gameObject->Rot[0], gameObject->Rot[1], gameObject->Rot[2], gameObject->Rot[3]);
plotInfo.EmptyGameObjectId = gameObject->ID;
plotInfo.GarrSiteLevelPlotInstId = plots->at(i)->ID;
}
@@ -731,7 +732,7 @@ GameObject* Garrison::Plot::CreateGameObject(Map* map, GarrisonFactionIndex fact
return nullptr;
}
- GameObject* building = GameObject::CreateGameObject(entry, map, PacketInfo.PlotPos.Pos, QuaternionData(), 255, GO_STATE_READY);
+ GameObject* building = GameObject::CreateGameObject(entry, map, PacketInfo.PlotPos.Pos, Rotation, 255, GO_STATE_READY);
if (!building)
return nullptr;
@@ -740,7 +741,7 @@ GameObject* Garrison::Plot::CreateGameObject(Map* map, GarrisonFactionIndex fact
if (FinalizeGarrisonPlotGOInfo const* finalizeInfo = sGarrisonMgr.GetPlotFinalizeGOInfo(PacketInfo.GarrPlotInstanceID))
{
Position const& pos2 = finalizeInfo->FactionInfo[faction].Pos;
- if (GameObject* finalizer = GameObject::CreateGameObject(finalizeInfo->FactionInfo[faction].GameObjectId, map, pos2, QuaternionData(), 255, GO_STATE_READY))
+ if (GameObject* finalizer = GameObject::CreateGameObject(finalizeInfo->FactionInfo[faction].GameObjectId, map, pos2, QuaternionData::fromEulerAnglesZYX(pos2.GetOrientation(), 0.0f, 0.0f), 255, GO_STATE_READY))
{
// set some spell id to make the object delete itself after use
finalizer->SetSpellId(finalizer->GetGOInfo()->goober.spell);