exiles
This commit is contained in:
@@ -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<InstanceMapScript>::Instance()->AddScript(this);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user