From ebbe43a634dce0249a26b60ee6f02db90690ebac Mon Sep 17 00:00:00 2001 From: luis Date: Thu, 24 Sep 2026 21:52:06 -0300 Subject: [PATCH] exiles --- src/server/game/Scripting/ScriptMgr.cpp | 4 ++- .../scripts/ExilesReach/exiles_reach.cpp | 4 +-- .../exiles_reach_darkmaul_plains.cpp | 28 +++++++++++++++---- .../exiles_reach_murloc_hideaway.cpp | 7 +++-- .../ExilesReach/exiles_reach_north_sea.cpp | 13 +++++++-- 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index c5749babc..750167e2e 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -2611,7 +2611,9 @@ InstanceMapScript::InstanceMapScript(char const* name, uint32 mapId) noexcept if (!GetEntry()) TC_LOG_ERROR("scripts", "Invalid InstanceMapScript for {}; no such map ID.", mapId); - if (GetEntry() && !GetEntry()->IsDungeon()) + // A map with an instance_template is intentionally scripted even when Map.db2 + // does not flag it as a dungeon (the Arathi catch-up map is one of these). + if (GetEntry() && !GetEntry()->IsDungeon() && !sObjectMgr->GetInstanceTemplate(mapId)) TC_LOG_ERROR("scripts", "InstanceMapScript for map {} is invalid.", mapId); ScriptRegistry::Instance()->AddScript(this); diff --git a/src/server/scripts/ExilesReach/exiles_reach.cpp b/src/server/scripts/ExilesReach/exiles_reach.cpp index c67a30b37..33b0a3f4d 100644 --- a/src/server/scripts/ExilesReach/exiles_reach.cpp +++ b/src/server/scripts/ExilesReach/exiles_reach.cpp @@ -53,12 +53,12 @@ public: { player->CastSpell(player, SPELL_CADAVER_KILL_CREDIT); - if (player->GetQuestObjectiveProgress(QUEST_H_THE_REDEATHER, 2) == 8) + if (player->GetQuestObjectiveData(QUEST_H_THE_REDEATHER, 397279) == 8) { player->CastSpell(player, SPELL_CADAVER_CREDIT_CHECK_CHOPPY_MALFUNCTION, true); } - if (player->GetQuestObjectiveProgress(QUEST_RIDE_OF_THE_SCIENTIFICALLY_ENHANCED_BOAR, 2) == 8) + if (player->GetQuestObjectiveData(QUEST_RIDE_OF_THE_SCIENTIFICALLY_ENHANCED_BOAR, 396499) == 8) { player->CastSpell(player, SPELL_GIANT_BOAR_PING_VEHICLE, true); } diff --git a/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp b/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp index cebfe260c..0c09c29fb 100644 --- a/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp +++ b/src/server/scripts/ExilesReach/exiles_reach_darkmaul_plains.cpp @@ -366,15 +366,30 @@ struct npc_exiles_reach_darkmaul_plains_156267 : public VehicleAI void IsSummonedBy(WorldObject* summoner) override { + // The summoned boar had no creature spell, so the Trample button was not on the bar. + if (!me->m_spells[0]) + me->m_spells[0] = SPELL_GIANT_BOAR_TRAMPLE; + if (Player* player = summoner->ToPlayer()) { - if (me->GetAreaId() == AREA_DARKMAUL_PLAINS && me->GetVehicleKit()) + if (me->GetVehicleKit()) { if (Creature* garrick = player->GetSummonedCreatureByEntry(NPC_OGRE_RUINS_TORGOK_FIGHTER_A)) garrick->EnterVehicle(me, 1); } } } + + void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) override + { + if (!apply || !passenger->IsPlayer()) + return; + + if (!me->m_spells[0]) + me->m_spells[0] = SPELL_GIANT_BOAR_TRAMPLE; + + passenger->ToPlayer()->VehicleSpellInitialize(); + } }; // Cork Fizzlepop, Lindie Springstock (Darkmaul Plains) (Re-Sizing the Situation) @@ -1061,16 +1076,19 @@ namespace if (creature->GetEntry() == NPC_OGRE_RUINS_MONSTROUS_CADAVER) { - uint32 const before = player->GetQuestObjectiveProgress(questId, 2); + // Objective 396499 / 397279 counts creature 165150, not the cadaver the player hits. + uint32 const objectiveId = ExileUsesHorde(player) ? 397279u : 396499u; + int32 const before = player->GetQuestObjectiveData(questId, objectiveId); Unit::Kill(player, creature); - if (before < 8 && player->GetQuestObjectiveProgress(questId, 2) == before) - player->CastSpell(player, SPELL_CADAVER_KILL_CREDIT, true); + if (before < 8 && player->GetQuestObjectiveData(questId, objectiveId) == before) + player->KilledMonsterCredit(NPC_OGRE_RUINS_CADAVER_KILL_CREDIT); } else Unit::Kill(player, creature); } - if (player->GetQuestObjectiveProgress(questId, 2) >= 8) + uint32 const objectiveId = ExileUsesHorde(player) ? 397279u : 396499u; + if (player->GetQuestObjectiveData(questId, objectiveId) >= 8) player->CastSpell(player, SPELL_GIANT_BOAR_PING_VEHICLE, true); } } diff --git a/src/server/scripts/ExilesReach/exiles_reach_murloc_hideaway.cpp b/src/server/scripts/ExilesReach/exiles_reach_murloc_hideaway.cpp index 10b62933f..2c8a4335e 100644 --- a/src/server/scripts/ExilesReach/exiles_reach_murloc_hideaway.cpp +++ b/src/server/scripts/ExilesReach/exiles_reach_murloc_hideaway.cpp @@ -32,10 +32,13 @@ void ArriveExileBeach(Player* player) return; uint32 const area = player->GetAreaId(); - if (area != AREA_NORTH_SEA_A && area != AREA_NORTH_SEA_H && area != AREA_MURLOC_HIDEAWAY) + // Brace for Impact ends on the deck. The crash movie has to move the + // player onto the beach even when the ship is not inside the North Sea subzone. + bool const aboardExileShip = player->GetTransport() != nullptr; + if (!aboardExileShip && area != AREA_NORTH_SEA_A && area != AREA_NORTH_SEA_H && area != AREA_MURLOC_HIDEAWAY) return; - if (area == AREA_NORTH_SEA_A || area == AREA_NORTH_SEA_H) + if (aboardExileShip || area == AREA_NORTH_SEA_A || area == AREA_NORTH_SEA_H) { player->TeleportTo(MAP_EXILES_REACH, -462.722f, -2620.544f, 0.472f, 0.760f); player->CastSpell(player, player->IsInHorde() ? SPELL_H_SHIP_CRASH : SPELL_A_SHIP_CRASH, true); diff --git a/src/server/scripts/ExilesReach/exiles_reach_north_sea.cpp b/src/server/scripts/ExilesReach/exiles_reach_north_sea.cpp index 03607f79e..0e1aae0d2 100644 --- a/src/server/scripts/ExilesReach/exiles_reach_north_sea.cpp +++ b/src/server/scripts/ExilesReach/exiles_reach_north_sea.cpp @@ -35,7 +35,12 @@ public: if (player->GetMapId() == MAP_EXILES_REACH) { uint32 const area = player->GetAreaId(); - if (area != AREA_NORTH_SEA_A && area != AREA_NORTH_SEA_H) + // New characters stand on the faction ship (transport), whose world + // area is often the parent zone or the other faction's North Sea. + // Gating the deck on the subzone hid Private Cole / Grunt Throg, + // so Stand Your Ground had nobody to accept or turn in. + bool const aboardExileShip = player->GetTransport() != nullptr; + if (!aboardExileShip && area != AREA_NORTH_SEA_A && area != AREA_NORTH_SEA_H) { // The deck phases are only updated while the player is still on the ship. // Leaving them on shows Jaina (and the Horde officers) a second time on the beach. @@ -62,7 +67,11 @@ public: return; } - switch (area) + uint32 const phaseArea = aboardExileShip + ? (ExileUsesHorde(player) ? AREA_NORTH_SEA_H : AREA_NORTH_SEA_A) + : area; + + switch (phaseArea) { case AREA_NORTH_SEA_H: {