diff options
| author | Shauren <shauren.trinity@gmail.com> | 2016-06-13 21:00:25 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2016-06-13 21:00:25 +0200 |
| commit | d2733eb6f1f9a550ec6511b5fa696b67b11044b3 (patch) | |
| tree | 92e101dba7e48661de4a02c93bfba5700a6f1bdf /src/server/scripts/Northrend | |
| parent | 3903482eb810625fce64c616a4edca3f06975e94 (diff) | |
| parent | 2fe6fc63d79655a96ee2135a6b380ce353729088 (diff) | |
Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion
Diffstat (limited to 'src/server/scripts/Northrend')
6 files changed, 27 insertions, 21 deletions
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 8c68fe4cc18..9d7c41ffd7b 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -1353,8 +1353,10 @@ class go_twilight_portal : public GameObjectScript } } - bool GossipHello(Player* player) override + bool GossipHello(Player* player, bool isUse) override { + if (!isUse) + return true; if (_spellId != 0) player->CastSpell(player, _spellId, true); return true; diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 106c567b24e..d755fa15d23 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -1113,7 +1113,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript me->RemoveAurasDueToSpell(SPELL_HARVEST_SOUL); if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) Talk(SAY_JAINA_ESCAPE_9); - if (Transport* gunship = ObjectAccessor::GetTransport(*me, _instance->GetGuidData(DATA_GUNSHIP))) + if (Transport* gunship = ObjectAccessor::GetTransportOnMap(*me, _instance->GetGuidData(DATA_GUNSHIP))) gunship->EnableMovement(true); _instance->SetBossState(DATA_THE_LICH_KING_ESCAPE, DONE); break; @@ -1185,7 +1185,7 @@ class npc_the_lich_king_escape_hor : public CreatureScript if (Creature* target = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_ESCAPE_LEADER))) DoCast(target, SPELL_HARVEST_SOUL); - if (Transport* gunship = ObjectAccessor::GetTransport(*me, _instance->GetGuidData(DATA_GUNSHIP))) + if (Transport* gunship = ObjectAccessor::GetTransportOnMap(*me, _instance->GetGuidData(DATA_GUNSHIP))) gunship->EnableMovement(true); break; default: diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 037b6a2988e..1a165780224 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -400,7 +400,7 @@ class instance_icecrown_citadel : public InstanceMapScript return entry; } - uint32 GetGameObjectEntry(ObjectGuid::LowType /*guidLow*/, uint32 entry) override + uint32 GetGameObjectEntry(ObjectGuid::LowType /*spawnId*/, uint32 entry) override { switch (entry) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index ef6ccf5bf4b..69dbc7bf9e6 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -200,7 +200,7 @@ public: if (zombie) { zombieToBeEatenGUID = zombie->GetGUID(); // save for later use - + // the soon-to-be-eaten zombie should stop moving and stop attacking zombie->AI()->SetData(DATA_ZOMBIE_STATE, STATE_ZOMBIE_TOBE_EATEN); @@ -225,7 +225,7 @@ public: case EVENT_KILL_ZOMBIE_SINGLE: { Creature* zombieToBeEaten = ObjectAccessor::GetCreature(*me, zombieToBeEatenGUID); - if (zombieToBeEaten && zombieToBeEaten->IsAlive() && zombieToBeEaten->IsWithinDistInMap(me, 10.0)) + if (zombieToBeEaten && zombieToBeEaten->IsAlive() && zombieToBeEaten->IsWithinDistInMap(me, 10.0)) DoCast(zombieToBeEaten, SPELL_ZOMBIE_CHOW_SEARCH_SINGLE); // do the killing + healing in done inside by spell script see below. zombieToBeEatenGUID = ObjectGuid::Empty; @@ -249,11 +249,11 @@ public: if (zombie && zombie->IsAlive() && zombie->GetExactDist2d(me) > 18.0) zombie = nullptr; } - + if (zombie) // cast the aoe spell only if at least one zombie is found nearby { Talk(EMOTE_DEVOURS_ALL); - DoCastAOE(SPELL_ZOMBIE_CHOW_SEARCH_MULTI); + DoCastAOE(SPELL_ZOMBIE_CHOW_SEARCH_MULTI); } break; } @@ -269,7 +269,7 @@ public: me->GetMotionMaster()->MoveIdle(); events.ScheduleEvent(EVENT_KILL_ZOMBIE_SINGLE, Seconds(1)); } - + } void DoAction(int32 action) override @@ -405,17 +405,19 @@ public: if (state == STATE_ZOMBIE_DECIMATED) { timer += diff; - Creature* gluth = ObjectAccessor::GetCreature(*me, GluthGUID); // Putting this in the UpdateAI loop fixes an issue where death gripping a decimated zombie would make the zombie stand still until the rest of the fight. // Also fix the issue where if one or more zombie is rooted when decimates hits (and MovePoint() is called), the zombie teleport to the boss. pretty weird behavior. - if (gluth && timer>1600 && me->GetExactDist2d(gluth) > 10.0 && me->CanFreeMove()) // it takes about 1600 ms for the animation to cycle. This way, the animation looks relatively smooth. + if (Creature* gluth = ObjectAccessor::GetCreature(*me, GluthGUID)) { - me->GetMotionMaster()->MovePoint(0, gluth->GetPosition()); // isn't dynamic. So, to take into account Gluth's movement, it must be called periodicly. - timer = 0; - } + if (timer > 1600 && me->GetExactDist2d(gluth) > 10.0 && me->CanFreeMove()) // it takes about 1600 ms for the animation to cycle. This way, the animation looks relatively smooth. + { + me->GetMotionMaster()->MovePoint(0, gluth->GetPosition()); // isn't dynamic. So, to take into account Gluth's movement, it must be called periodicly. + timer = 0; + } - if (me->GetExactDist2d(gluth) <= 10.0) - me->StopMoving(); + if (me->GetExactDist2d(gluth) <= 10.0) + me->StopMoving(); + } } else if (state == STATE_ZOMBIE_NORMAL) DoMeleeAttackIfReady(); @@ -430,10 +432,10 @@ public: { me->SetReactState(ReactStates::REACT_PASSIVE); me->AttackStop(); - me->SetTarget(ObjectGuid::Empty); + me->SetTarget(ObjectGuid::Empty); // at this point, the zombie should be non attacking and non moving. - me->SetWalk(true); // it doesnt seem to work with MoveFollow() (but it does work with MovePoint()). + me->SetWalk(true); // it doesnt seem to work with MoveFollow() (but it does work with MovePoint()). timer = 1000; } diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index e5944841ad5..f6c829590b9 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -86,8 +86,7 @@ public: void SpawnGameObject(uint32 entry, Position const& pos) { GameObject* go = new GameObject(); - if (!go->Create(instance->GenerateLowGuid<HighGuid::GameObject>(), entry, instance, - PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), + if (!go->Create(entry, instance, PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0, 0, 0, 0, 120, GO_STATE_READY)) { delete go; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 0d8f9a6bce1..33afada15fd 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -977,8 +977,11 @@ class go_celestial_planetarium_access : public GameObjectScript { } - bool GossipHello(Player* player) override + bool GossipHello(Player* player, bool isUse) override { + if (!isUse) + return true; + if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE)) return true; |
