mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Entities: debloat SummonGameObject parameter list using proper wrappers and enable GO rotation in scripts
- There's still an overload allowing for x, y, z, o to be passed directly
- Fixed default animstate for GameObject creation in many places, it should be 255, not 100 (checked in sniffs)
(cherry picked from commit 62bfee37cb)
# Conflicts:
# src/server/game/Battlefield/Battlefield.cpp
# src/server/game/Battlegrounds/Battleground.cpp
# src/server/game/Entities/GameObject/GameObject.cpp
# src/server/game/Entities/GameObject/GameObject.h
# src/server/game/Entities/Object/Object.cpp
# src/server/game/Entities/Object/Object.h
# src/server/game/Spells/SpellEffects.cpp
# src/server/scripts/Commands/cs_gobject.cpp
# src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
# src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
# src/server/scripts/Kalimdor/zone_feralas.cpp
# src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
# src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
# src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
This commit is contained in:
@@ -727,7 +727,7 @@ GameObject* Garrison::Plot::CreateGameObject(Map* map, GarrisonFactionIndex fact
|
||||
|
||||
Position const& pos = PacketInfo.PlotPos;
|
||||
GameObject* building = new GameObject();
|
||||
if (!building->Create(entry, map, 0, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), G3D::Quat(), 255, GO_STATE_READY))
|
||||
if (!building->Create(entry, map, 0, pos, G3D::Quat(), 255, GO_STATE_READY))
|
||||
{
|
||||
delete building;
|
||||
return nullptr;
|
||||
@@ -739,8 +739,7 @@ GameObject* Garrison::Plot::CreateGameObject(Map* map, GarrisonFactionIndex fact
|
||||
{
|
||||
Position const& pos2 = finalizeInfo->FactionInfo[faction].Pos;
|
||||
GameObject* finalizer = new GameObject();
|
||||
if (finalizer->Create(finalizeInfo->FactionInfo[faction].GameObjectId, map, 0, pos2.GetPositionX(), pos2.GetPositionY(),
|
||||
pos2.GetPositionZ(), pos2.GetOrientation(), G3D::Quat(), 255, GO_STATE_READY))
|
||||
if (finalizer->Create(finalizeInfo->FactionInfo[faction].GameObjectId, map, 0, pos2, G3D::Quat(), 255, GO_STATE_READY))
|
||||
{
|
||||
// set some spell id to make the object delete itself after use
|
||||
finalizer->SetSpellId(finalizer->GetGOInfo()->goober.spell);
|
||||
|
||||
Reference in New Issue
Block a user