From c429e7d4899b51bba5df9bf0be0acee4ecc38cb7 Mon Sep 17 00:00:00 2001 From: ariel- Date: Sat, 30 Jul 2016 18:50:44 -0300 Subject: 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 62bfee37cb21584cef631dda428feaf5eb829cda) # 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 --- src/server/scripts/World/item_scripts.cpp | 2 +- src/server/scripts/World/npcs_special.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts/World') diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 1def7e16d11..60a282f26de 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -241,7 +241,7 @@ public: float x, y, z; go->GetClosePoint(x, y, z, go->GetObjectSize() / 3, 7.0f); - go->SummonGameObject(GO_HIGH_QUALITY_FUR, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 0, 0, 0, 0, 1); + go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, G3D::Quat(), 1); if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, go->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000)) { summon->SetVisible(false); diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 5725e35e3e7..84026dd671a 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2186,7 +2186,7 @@ public: float displacement = 0.7f; for (uint8 i = 0; i < 4; i++) - me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i%2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 1); + me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i % 2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), G3D::Quat(), 1); } else //me->CastSpell(me, GetFireworkSpell(me->GetEntry()), true); -- cgit v1.2.3