aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-07-30 18:50:44 -0300
committerariel- <ariel-@users.noreply.github.com>2016-07-30 18:50:44 -0300
commit62bfee37cb21584cef631dda428feaf5eb829cda (patch)
treeddec04832a3761e9e2d5dddd83215a19f44fded1 /src/server/scripts/World
parent29826a92ef4cf7896e3be69757b015d47f3db006 (diff)
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)
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/item_scripts.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 52174e1b012..ff15698e579 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 fc29c36c030..277bc9ac804 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2191,7 +2191,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);