mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Fixed rotation of many gameobjects summoned in tol barad, garrison and various scripts
This commit is contained in:
@@ -98,7 +98,7 @@ bool BattlefieldTB::SetupBattlefield()
|
||||
TolBaradCapturePoint* capturePoint = new TolBaradCapturePoint(this, GetDefenderTeam());
|
||||
|
||||
//Spawn flag pole
|
||||
if (GameObject* go = SpawnGameObject(TBCapturePoints[i].entryFlagPole[GetDefenderTeam()], TBCapturePoints[i].pos, QuaternionData()))
|
||||
if (GameObject* go = SpawnGameObject(TBCapturePoints[i].entryFlagPole[GetDefenderTeam()], TBCapturePoints[i].pos, QuaternionData::fromEulerAnglesZYX(TBCapturePoints[i].pos.GetOrientation(), 0.0f, 0.0f)))
|
||||
{
|
||||
go->SetGoArtKit(GetDefenderTeam() == TEAM_ALLIANCE ? TB_GO_ARTKIT_FLAG_ALLIANCE : TB_GO_ARTKIT_FLAG_HORDE);
|
||||
capturePoint->SetCapturePointData(go);
|
||||
@@ -108,7 +108,7 @@ bool BattlefieldTB::SetupBattlefield()
|
||||
|
||||
// Spawn towers
|
||||
for (uint8 i = 0; i < TB_TOWERS_COUNT; i++)
|
||||
if (GameObject* go = SpawnGameObject(TBTowers[i].entry, TBTowers[i].pos, QuaternionData()))
|
||||
if (GameObject* go = SpawnGameObject(TBTowers[i].entry, TBTowers[i].pos, QuaternionData::fromEulerAnglesZYX(TBTowers[i].pos.GetOrientation(), 0.0f, 0.0f)))
|
||||
Towers.insert(go->GetGUID());
|
||||
|
||||
// Init Graveyards
|
||||
@@ -512,7 +512,7 @@ void BattlefieldTB::UpdateNPCsAndGameObjects()
|
||||
TolBaradCapturePoint* capturePoint = new TolBaradCapturePoint(this, GetDefenderTeam());
|
||||
|
||||
//Spawn flag pole
|
||||
if (GameObject* go = SpawnGameObject(TBCapturePoints[i].entryFlagPole[GetDefenderTeam()], TBCapturePoints[i].pos, QuaternionData()))
|
||||
if (GameObject* go = SpawnGameObject(TBCapturePoints[i].entryFlagPole[GetDefenderTeam()], TBCapturePoints[i].pos, QuaternionData::fromEulerAnglesZYX(TBCapturePoints[i].pos.GetOrientation(), 0.0f, 0.0f)))
|
||||
{
|
||||
go->SetGoArtKit(GetDefenderTeam() == TEAM_ALLIANCE ? TB_GO_ARTKIT_FLAG_ALLIANCE : TB_GO_ARTKIT_FLAG_HORDE);
|
||||
capturePoint->SetCapturePointData(go);
|
||||
@@ -549,7 +549,7 @@ void BattlefieldTB::UpdateNPCsAndGameObjects()
|
||||
|
||||
// Spawn portals
|
||||
for (uint8 i = 0; i < TB_PORTAL_MAX; i++)
|
||||
if (GameObject* go = SpawnGameObject(TBPortalEntry[GetDefenderTeam()], TBPortals[i], QuaternionData()))
|
||||
if (GameObject* go = SpawnGameObject(TBPortalEntry[GetDefenderTeam()], TBPortals[i], QuaternionData::fromEulerAnglesZYX(TBPortals[i].GetOrientation(), 0.0f, 0.0f)))
|
||||
TemporaryGOs.insert(go->GetGUID());
|
||||
|
||||
// Update towers
|
||||
@@ -575,7 +575,7 @@ void BattlefieldTB::UpdateNPCsAndGameObjects()
|
||||
|
||||
// Spawn banners
|
||||
for (uint8 i = 0; i < TB_BANNER_MAX; i++)
|
||||
if (GameObject* go = SpawnGameObject(TBBannerEntry[GetDefenderTeam()], TBBanners[i], QuaternionData()))
|
||||
if (GameObject* go = SpawnGameObject(TBBannerEntry[GetDefenderTeam()], TBBanners[i], QuaternionData::fromEulerAnglesZYX(TBBanners[i].GetOrientation(), 0.0f, 0.0f)))
|
||||
TemporaryGOs.insert(go->GetGUID());
|
||||
|
||||
// Set graveyard controls
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "GameObjectData.h"
|
||||
#include "GarrisonPackets.h"
|
||||
#include "Optional.h"
|
||||
#include <unordered_map>
|
||||
@@ -194,6 +195,7 @@ public:
|
||||
void SetBuildingInfo(WorldPackets::Garrison::GarrisonBuildingInfo const& buildingInfo, Player* owner);
|
||||
|
||||
WorldPackets::Garrison::GarrisonPlotInfo PacketInfo;
|
||||
QuaternionData Rotation;
|
||||
uint32 EmptyGameObjectId = 0;
|
||||
uint32 GarrSiteLevelPlotInstId = 0;
|
||||
Building BuildingInfo;
|
||||
|
||||
@@ -358,9 +358,9 @@ public:
|
||||
me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
break;
|
||||
case 9:
|
||||
me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17], QuaternionData(), 7200);
|
||||
me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18], QuaternionData(), 7200);
|
||||
me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19], QuaternionData(), 7200);
|
||||
me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17], QuaternionData::fromEulerAnglesZYX(SpawnPosition[17].GetOrientation(), 0.0f, 0.0f), 7200);
|
||||
me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18], QuaternionData::fromEulerAnglesZYX(SpawnPosition[18].GetOrientation(), 0.0f, 0.0f), 7200);
|
||||
me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19], QuaternionData::fromEulerAnglesZYX(SpawnPosition[19].GetOrientation(), 0.0f, 0.0f), 7200);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
|
||||
void UseStatue(GameObject* go)
|
||||
{
|
||||
go->SummonGameObject(GO_ATALAI_LIGHT1, *go, QuaternionData(), 0);
|
||||
go->SummonGameObject(GO_ATALAI_LIGHT1, *go, QuaternionData::fromEulerAnglesZYX(go->GetOrientation(), 0.0f, 0.0f), 0);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -1260,7 +1260,7 @@ class npc_crate_helper : public CreatureScript
|
||||
instance->SetData(DATA_CRATE_COUNT, instance->GetData(DATA_CRATE_COUNT) + 1);
|
||||
if (GameObject* crate = me->FindNearestGameObject(GO_SUSPICIOUS_CRATE, 5.0f))
|
||||
{
|
||||
crate->SummonGameObject(GO_PLAGUED_CRATE, *crate, QuaternionData(), DAY);
|
||||
crate->SummonGameObject(GO_PLAGUED_CRATE, *crate, QuaternionData::fromEulerAnglesZYX(crate->GetOrientation(), 0.0f, 0.0f), DAY);
|
||||
crate->Delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ class boss_ossirian : public CreatureScript
|
||||
if (Creature* Trigger = me->SummonCreature(NPC_OSSIRIAN_TRIGGER, CrystalCoordinates[CrystalIterator]))
|
||||
{
|
||||
TriggerGUID = Trigger->GetGUID();
|
||||
if (GameObject* Crystal = Trigger->SummonGameObject(GO_OSSIRIAN_CRYSTAL, CrystalCoordinates[CrystalIterator], QuaternionData(), uint32(-1)))
|
||||
if (GameObject* Crystal = Trigger->SummonGameObject(GO_OSSIRIAN_CRYSTAL, CrystalCoordinates[CrystalIterator], QuaternionData::fromEulerAnglesZYX(CrystalCoordinates[CrystalIterator].GetOrientation(), 0.0f, 0.0f), uint32(-1)))
|
||||
{
|
||||
CrystalGUID = Crystal->GetGUID();
|
||||
++CrystalIterator;
|
||||
|
||||
@@ -500,7 +500,7 @@ public:
|
||||
_explosivesGuids.clear();
|
||||
for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
|
||||
{
|
||||
if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i], QuaternionData(), 0))
|
||||
if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i], QuaternionData::fromEulerAnglesZYX(ExplosivesPos[0][i].GetOrientation(), 0.0f, 0.0f), 0))
|
||||
_explosivesGuids.push_back(explosive->GetGUID());
|
||||
}
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_NONE); // reset anim state
|
||||
@@ -596,7 +596,7 @@ public:
|
||||
_explosivesGuids.clear();
|
||||
for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
|
||||
{
|
||||
if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_2, ExplosivesPos[1][i], QuaternionData(), 0))
|
||||
if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_2, ExplosivesPos[1][i], QuaternionData::fromEulerAnglesZYX(ExplosivesPos[1][i].GetOrientation(), 0.0f, 0.0f), 0))
|
||||
_explosivesGuids.push_back(explosive->GetGUID());
|
||||
}
|
||||
Talk(SAY_LEGOSO_15);
|
||||
|
||||
@@ -345,7 +345,7 @@ class spell_sc_twilight_documents : public SpellScriptLoader
|
||||
void SpawnGameObject(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (WorldLocation* loc = GetHitDest())
|
||||
GetCaster()->SummonGameObject(GAMEOBJECT_TWILIGHT_DOCUMENTS, *loc, QuaternionData(), 7200);
|
||||
GetCaster()->SummonGameObject(GAMEOBJECT_TWILIGHT_DOCUMENTS, *loc, QuaternionData::fromEulerAnglesZYX(loc->GetOrientation(), 0.0f, 0.0f), 7200);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
{
|
||||
pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData(), 90000);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData::fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 90000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
{
|
||||
pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData(), 90000);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData::fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 90000);
|
||||
}
|
||||
break;
|
||||
case BOSS_ARGENT_CHALLENGE_P:
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
{
|
||||
pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData(), 90000);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData::fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 90000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
if (tributeChest)
|
||||
if (Creature* tirion = instance->GetCreature(TirionGUID))
|
||||
if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, QuaternionData(), WEEK))
|
||||
if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, QuaternionData::fromEulerAnglesZYX(3.27f, 0.0f, 0.0f), WEEK))
|
||||
chest->SetRespawnTime(chest->GetRespawnDelay());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
case 6000:
|
||||
me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0]);
|
||||
me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1]);
|
||||
me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2], QuaternionData(), 0);
|
||||
me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2], QuaternionData::fromEulerAnglesZYX(EndSpawnLoc[2].GetOrientation(), 0.0f, 0.0f), 0);
|
||||
_updateTimer = 20*IN_MILLISECONDS;
|
||||
_instance->SetData(TYPE_EVENT, 6005);
|
||||
break;
|
||||
|
||||
@@ -1321,7 +1321,7 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader
|
||||
{
|
||||
summon->AI()->SetGUID(GetTarget()->GetGUID(), DATA_TRAPPED_PLAYER);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_ICE_TOMB_UNTARGETABLE);
|
||||
if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos, QuaternionData(), 0))
|
||||
if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos, QuaternionData::fromEulerAnglesZYX(pos.GetOrientation(), 0.0f, 0.0f), 0))
|
||||
{
|
||||
go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
|
||||
summon->AddGameObject(go);
|
||||
|
||||
@@ -1011,9 +1011,9 @@ public:
|
||||
if (Creature* alexstraszaGiftBoxBunny = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_GIFT_BOX_BUNNY_GUID)))
|
||||
{
|
||||
if (GetDifficulty() == DIFFICULTY_10_N)
|
||||
alexstraszaGiftBoxBunny->SummonGameObject(GO_HEART_OF_MAGIC_10, HeartOfMagicSpawnPos, QuaternionData(), 0);
|
||||
alexstraszaGiftBoxBunny->SummonGameObject(GO_HEART_OF_MAGIC_10, HeartOfMagicSpawnPos, QuaternionData::fromEulerAnglesZYX(HeartOfMagicSpawnPos.GetOrientation(), 0.0f, 0.0f), 0);
|
||||
else if (GetDifficulty() == DIFFICULTY_25_N)
|
||||
alexstraszaGiftBoxBunny->SummonGameObject(GO_HEART_OF_MAGIC_25, HeartOfMagicSpawnPos, QuaternionData(), 0);
|
||||
alexstraszaGiftBoxBunny->SummonGameObject(GO_HEART_OF_MAGIC_25, HeartOfMagicSpawnPos, QuaternionData::fromEulerAnglesZYX(HeartOfMagicSpawnPos.GetOrientation(), 0.0f, 0.0f), 0);
|
||||
}
|
||||
|
||||
me->SummonCreature(NPC_ALEXSTRASZA, AlexstraszaSpawnPos, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
@@ -2420,9 +2420,9 @@ class spell_alexstrasza_gift_beam_visual : public SpellScriptLoader
|
||||
if (Creature* target = GetTarget()->ToCreature())
|
||||
{
|
||||
if (target->GetMap()->GetDifficultyID() == DIFFICULTY_10_N)
|
||||
_alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_10, *target, QuaternionData(), 0);
|
||||
_alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_10, *target, QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.0f, 0.0f), 0);
|
||||
else if (target->GetMap()->GetDifficultyID() == DIFFICULTY_25_N)
|
||||
_alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_25, *target, QuaternionData(), 0);
|
||||
_alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_25, *target, QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.0f, 0.0f), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
// There is no other way afaik...
|
||||
void SpawnGameObject(uint32 entry, Position const& pos)
|
||||
{
|
||||
if (GameObject* go = GameObject::CreateGameObject(entry, instance, pos, QuaternionData(), 255, GO_STATE_READY))
|
||||
if (GameObject* go = GameObject::CreateGameObject(entry, instance, pos, QuaternionData::fromEulerAnglesZYX(pos.GetOrientation(), 0.0f, 0.0f), 255, GO_STATE_READY))
|
||||
instance->AddToMap(go);
|
||||
}
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
break;
|
||||
case ACTION_PLACE_BROKEN_HARPOON:
|
||||
for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
|
||||
me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosHarpoon[n].GetPositionX(), PosHarpoon[n].GetPositionY(), PosHarpoon[n].GetPositionZ(), 2.286f, QuaternionData(), 180);
|
||||
me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosHarpoon[n].GetPositionX(), PosHarpoon[n].GetPositionY(), PosHarpoon[n].GetPositionZ(), 2.286f, QuaternionData::fromEulerAnglesZYX(2.286f, 0.0f, 0.0f), 180);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -261,7 +261,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
{
|
||||
case EVENT_BUILD_HARPOON_1:
|
||||
Talk(EMOTE_HARPOON);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, QuaternionData(), uint32(me->GetRespawnTime())))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, QuaternionData::fromEulerAnglesZYX(4.790f, 0.0f, 0.0f), uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
@@ -271,7 +271,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
return;
|
||||
case EVENT_BUILD_HARPOON_2:
|
||||
Talk(EMOTE_HARPOON);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, QuaternionData(), uint32(me->GetRespawnTime())))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, QuaternionData::fromEulerAnglesZYX(4.659f, 0.0f, 0.0f), uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
@@ -280,7 +280,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
return;
|
||||
case EVENT_BUILD_HARPOON_3:
|
||||
Talk(EMOTE_HARPOON);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, QuaternionData(), uint32(me->GetRespawnTime())))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, QuaternionData::fromEulerAnglesZYX(5.382f, 0.0f, 0.0f), uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
@@ -290,7 +290,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
return;
|
||||
case EVENT_BUILD_HARPOON_4:
|
||||
Talk(EMOTE_HARPOON);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, QuaternionData(), uint32(me->GetRespawnTime())))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, QuaternionData::fromEulerAnglesZYX(4.266f, 0.0f, 0.0f), uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
|
||||
@@ -157,7 +157,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
{
|
||||
// he dropped it further, summon mound
|
||||
Map* map = player->GetMap();
|
||||
if (GameObject* go = GameObject::CreateGameObject(SI_SILITHYST_MOUND, map, *player, QuaternionData(), 255, GO_STATE_READY))
|
||||
if (GameObject* go = GameObject::CreateGameObject(SI_SILITHYST_MOUND, map, *player, QuaternionData::fromEulerAnglesZYX(player->GetOrientation(), 0.0f, 0.0f), 255, GO_STATE_READY))
|
||||
{
|
||||
PhasingHandler::InheritPhaseShift(go, player);
|
||||
go->SetRespawnTime(0);
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
DoCast(target, SPELL_IMPALING_SPINE, true);
|
||||
SpineTargetGUID = target->GetGUID();
|
||||
//must let target summon, otherwise you cannot click the spine
|
||||
target->SummonGameObject(GO_NAJENTUS_SPINE, *target, QuaternionData(), 30);
|
||||
target->SummonGameObject(GO_NAJENTUS_SPINE, *target, QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.0f, 0.0f), 30);
|
||||
Talk(SAY_NEEDLE);
|
||||
}
|
||||
events.Repeat(Seconds(20), Seconds(25));
|
||||
|
||||
@@ -961,7 +961,7 @@ public:
|
||||
{
|
||||
// Spell 37392 does not exist in dbc, manually spawning
|
||||
me->SummonCreature(NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.5f, me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000);
|
||||
me->SummonGameObject(GO_OSCILLATING_FREQUENCY_SCANNER, *me, QuaternionData(), 50);
|
||||
me->SummonGameObject(GO_OSCILLATING_FREQUENCY_SCANNER, *me, QuaternionData::fromEulerAnglesZYX(me->GetOrientation(), 0.0f, 0.0f), 50);
|
||||
me->DespawnOrUnsummon(50000);
|
||||
}
|
||||
|
||||
|
||||
@@ -2825,7 +2825,7 @@ class spell_item_crystal_prison_dummy_dnd : public SpellScriptLoader
|
||||
if (Creature* target = GetHitCreature())
|
||||
if (target->isDead() && !target->IsPet())
|
||||
{
|
||||
GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, *target, QuaternionData(), uint32(target->GetRespawnTime()-time(NULL)));
|
||||
GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, *target, QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.0f, 0.0f), uint32(target->GetRespawnTime()-time(NULL)));
|
||||
target->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
|
||||
float x, y, z;
|
||||
go->GetClosePoint(x, y, z, go->GetObjectSize() / 3, 7.0f);
|
||||
go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, QuaternionData(), 1);
|
||||
go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, QuaternionData::fromEulerAnglesZYX(go->GetOrientation(), 0.0f, 0.0f), 1);
|
||||
if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, go->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
{
|
||||
summon->SetVisible(false);
|
||||
|
||||
@@ -2049,7 +2049,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(), QuaternionData(), 1);
|
||||
me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i % 2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), QuaternionData::fromEulerAnglesZYX(me->GetOrientation(), 0.0f, 0.0f), 1);
|
||||
}
|
||||
else
|
||||
//me->CastSpell(me, GetFireworkSpell(me->GetEntry()), true);
|
||||
|
||||
Reference in New Issue
Block a user