Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-05-09 22:07:43 +08:00
210 changed files with 1309 additions and 977 deletions
+1 -1
View File
@@ -2949,7 +2949,7 @@ public:
return false;
}
handler->GetSession()->GetPlayer()->CastSpell(unit, 530, true);
handler->GetSession()->GetPlayer()->CastSpell(unit, MAP_OUTLAND, true);
return true;
}
@@ -98,7 +98,7 @@ private:
class instance_blackrock_depths : public InstanceMapScript
{
public:
instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", 230) { }
instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", MAP_BLACKROCK_DEPTHS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -77,7 +77,7 @@ DoorData const doorData[] =
class instance_blackrock_spire : public InstanceMapScript
{
public:
instance_blackrock_spire() : InstanceMapScript(BRSScriptName, 229) { }
instance_blackrock_spire() : InstanceMapScript(BRSScriptName, MAP_BLACKROCK_SPIRE) { }
struct instance_blackrock_spireMapScript : public InstanceScript
{
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "GameObject.h"
#include "InstanceMapScript.h"
@@ -269,7 +270,7 @@ public:
{
Initialize();
if (me->GetMapId() == 469)
if (me->GetMapId() == MAP_BLACKWING_LAIR)
{
if (Creature* nefarian = me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true))
{
@@ -75,7 +75,7 @@ uint32 const Entry[3] = { 12422, 12416, 12420 };
class instance_blackwing_lair : public InstanceMapScript
{
public:
instance_blackwing_lair() : InstanceMapScript(BWLScriptName, 469) { }
instance_blackwing_lair() : InstanceMapScript(BWLScriptName, MAP_BLACKWING_LAIR) { }
struct instance_blackwing_lair_InstanceMapScript : public InstanceScript
{
@@ -504,8 +504,7 @@ class spell_bwl_shadowflame : public SpellScript
enum orb_of_command_misc
{
QUEST_BLACKHANDS_COMMAND = 7761,
MAP_BWL = 469
QUEST_BLACKHANDS_COMMAND = 7761
};
const Position orbOfCommandTP = { -7672.46f, -1107.19f, 396.65f, 0.59f };
@@ -519,7 +518,7 @@ public:
{
if (!player->IsAlive() && player->GetQuestRewardStatus(QUEST_BLACKHANDS_COMMAND))
{
player->TeleportTo(MAP_BWL, orbOfCommandTP.m_positionX, orbOfCommandTP.m_positionY, orbOfCommandTP.m_positionZ, orbOfCommandTP.m_orientation);
player->TeleportTo(MAP_BLACKWING_LAIR, orbOfCommandTP.m_positionX, orbOfCommandTP.m_positionY, orbOfCommandTP.m_positionZ, orbOfCommandTP.m_orientation);
return true;
}
return false;
@@ -74,7 +74,7 @@ public:
{
if (urand(0, 1))
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
{
DoCast(target, SPELL_SHADOW_BOLT_RANDOM);
}
@@ -353,7 +353,7 @@ public:
}
case EVENT_TELEPORT_RANDOM:
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
{
DoCastSelf(SPELL_HATE_TO_ZERO, true);
DoCast(target, SPELL_TELEPORT_RANDOM);
@@ -56,7 +56,7 @@ constexpr uint8 SAY_SPAWN = 1;
class instance_molten_core : public InstanceMapScript
{
public:
instance_molten_core() : InstanceMapScript(MCScriptName, 409) {}
instance_molten_core() : InstanceMapScript(MCScriptName, MAP_MOLTEN_CORE) {}
struct instance_molten_core_InstanceMapScript : public InstanceScript
{
@@ -22,7 +22,7 @@
class instance_deadmines : public InstanceMapScript
{
public:
instance_deadmines() : InstanceMapScript("instance_deadmines", 36) { }
instance_deadmines() : InstanceMapScript("instance_deadmines", MAP_DEADMINES) { }
struct instance_deadmines_InstanceMapScript : public InstanceScript
{
@@ -27,7 +27,7 @@
class instance_gnomeregan : public InstanceMapScript
{
public:
instance_gnomeregan() : InstanceMapScript("instance_gnomeregan", 90) { }
instance_gnomeregan() : InstanceMapScript("instance_gnomeregan", MAP_GNOMEREGAN) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -214,7 +214,7 @@ struct boss_netherspite : public BossAI
context.Repeat(90s);
}).Schedule(15s, PORTAL_PHASE, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_VOIDZONE, 1, 45.0f, true, true);
DoCastRandomTarget(SPELL_VOIDZONE, 0, 45.0f, true, true, false);
context.Repeat(15s);
});
}
@@ -127,7 +127,7 @@ struct boss_malchezaar : public BossAI
scheduler.Schedule(20s, 30s, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_AMPLIFY_DAMAGE, 1);
DoCastRandomTarget(SPELL_AMPLIFY_DAMAGE, 0, 0.0f, true, false, false);
context.Repeat();
}).Schedule(20s, [this](TaskContext context)
{
@@ -1210,7 +1210,7 @@ struct boss_romulo : public ScriptedAI
_scheduler.Schedule(15s, GROUP_COMBAT, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true, false))
{
if (target && !me->HasInArc(M_PI, target))
{
@@ -67,7 +67,7 @@ DoorData const doorData[] =
class instance_karazhan : public InstanceMapScript
{
public:
instance_karazhan() : InstanceMapScript("instance_karazhan", 532) { }
instance_karazhan() : InstanceMapScript("instance_karazhan", MAP_KARAZHAN) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -57,7 +57,7 @@ Position const KalecgosSpawnPos = { 164.3747f, -397.1197f, 2.151798f, 1.66219f }
class instance_magisters_terrace : public InstanceMapScript
{
public:
instance_magisters_terrace() : InstanceMapScript("instance_magisters_terrace", 585) { }
instance_magisters_terrace() : InstanceMapScript("instance_magisters_terrace", MAP_MAGISTERS_TERRACE) { }
struct instance_magisters_terrace_InstanceMapScript : public InstanceScript
{
@@ -71,7 +71,7 @@ float const CATHEDRAL_PULL_RANGE = 80.0f; // Distance from the Cathedral doors t
class instance_scarlet_monastery : public InstanceMapScript
{
public:
instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) {}
instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", MAP_SCARLET_MONASTERY) {}
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -307,7 +307,7 @@ public:
if (victim && (target->GetGUID() == victim->GetGUID()))
{
me->AddThreat(victim, -1000000); // drop current player, add a ton to second. This should guarantee that we don't end up with both 1 and 2 in a cage...
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 1, 200.0f)) // search in whole room
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 0, 200.0f, false, false)) // search in whole room
{
me->AddThreat(newTarget, 1000000);
}
@@ -208,7 +208,7 @@ public:
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 20s);
break;
case EVENT_DOMINATE_MIND:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 20.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true, false))
{
me->CastSpell(target, SPELL_DOMINATE_MIND, false);
}
@@ -31,7 +31,7 @@ Position KirtonosSpawn = Position(315.028, 70.5385, 102.15, 0.385971);
class instance_scholomance : public InstanceMapScript
{
public:
instance_scholomance() : InstanceMapScript(ScholomanceScriptName, 289) { }
instance_scholomance() : InstanceMapScript(ScholomanceScriptName, MAP_SCHOLOMANCE) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -31,7 +31,7 @@ enum Spells
class instance_shadowfang_keep : public InstanceMapScript
{
public:
instance_shadowfang_keep() : InstanceMapScript("instance_shadowfang_keep", 33) { }
instance_shadowfang_keep() : InstanceMapScript("instance_shadowfang_keep", MAP_SHADOWFANG_KEEP) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -58,7 +58,7 @@ Position const SlaughterPos = { 4032.20f, -3378.06f, 119.75f, 4.67f };
class instance_stratholme : public InstanceMapScript
{
public:
instance_stratholme() : InstanceMapScript("instance_stratholme", 329) { }
instance_stratholme() : InstanceMapScript("instance_stratholme", MAP_STRATHOLME) { }
struct instance_stratholme_InstanceMapScript : public InstanceScript
{
@@ -29,7 +29,7 @@
class instance_sunken_temple : public InstanceMapScript
{
public:
instance_sunken_temple() : InstanceMapScript("instance_sunken_temple", 109) { }
instance_sunken_temple() : InstanceMapScript("instance_sunken_temple", MAP_SUNKEN_TEMPLE) { }
struct instance_sunken_temple_InstanceMapScript : public InstanceScript
{
@@ -227,6 +227,11 @@ struct boss_kiljaeden : public BossAI
boss_kiljaeden(Creature* creature) : BossAI(creature, DATA_KILJAEDEN)
{
me->SetReactState(REACT_PASSIVE);
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
void InitializeAI() override
@@ -303,22 +308,22 @@ struct boss_kiljaeden : public BossAI
scheduler.CancelAll();
ScheduleBasicAbilities();
me->m_Events.AddEventAtOffset([&] {
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
kalec->AI()->Talk(SAY_KALECGOS_READY2);
EmpowerOrb(false);
}, 35s);
me->m_Events.AddEventAtOffset([&] {
scheduler.Schedule(1s, [this](TaskContext)
{
Talk(SAY_KJ_REFLECTION);
me->CastCustomSpell(SPELL_SINISTER_REFLECTION, SPELLVALUE_MAX_TARGETS, 1, me, TRIGGERED_NONE);
}, 1s);
});
scheduler.Schedule(1s + 200ms, [this](TaskContext)
{
DoCastSelf(SPELL_SHADOW_SPIKE);
ScheduleBasicAbilities();
});
ScheduleTimedEvent(15s, [&] {
@@ -340,75 +345,80 @@ struct boss_kiljaeden : public BossAI
ScheduleHealthCheckEvent(25, [&] {
_phase = PHASE_SACRIFICE;
me->m_Events.AddEventAtOffset([&] {
Talk(SAY_KJ_REFLECTION);
me->CastCustomSpell(SPELL_SINISTER_REFLECTION, SPELLVALUE_MAX_TARGETS, 1, me, TRIGGERED_NONE);
}, 1s);
me->m_Events.AddEventAtOffset([&] {
DoCastSelf(SPELL_SHADOW_SPIKE);
}, 2s);
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
{
kalec->AI()->Talk(SAY_KALECGOS_FOCUS, 8s);
kalec->AI()->Talk(SAY_KALECGOS_FATE, 20s + 200ms);
}
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
{
anveena->AI()->Talk(SAY_ANVEENA_KALEC, 18s);
anveena->AI()->Talk(SAY_ANVEENA_GOODBYE, 25s);
}
scheduler.CancelAll();
me->m_Events.AddEventAtOffset([&] {
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
scheduler.Schedule(1s, [this](TaskContext)
{
scheduler.Schedule(1s, [this](TaskContext)
{
anveena->RemoveAllAuras();
anveena->DespawnOrUnsummon(3500);
}
}, 28s);
Talk(SAY_KJ_REFLECTION);
me->CastCustomSpell(SPELL_SINISTER_REFLECTION, SPELLVALUE_MAX_TARGETS, 1, me, TRIGGERED_NONE);
});
me->m_Events.AddEventAtOffset([&] {
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
scheduler.Schedule(2s, [this](TaskContext)
{
anveena->CastSpell(anveena, SPELL_SACRIFICE_OF_ANVEENA, true);
DoCastSelf(SPELL_CUSTOM_08_STATE, true);
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
scheduler.DelayAll(7100ms);
DoCastSelf(SPELL_SHADOW_SPIKE);
});
me->m_Events.AddEventAtOffset([&] {
me->RemoveAurasDueToSpell(SPELL_CUSTOM_08_STATE);
me->RemoveUnitFlag(UNIT_FLAG_PACIFIED);
ScheduleBasicAbilities();
ScheduleTimedEvent(25s, [&] {
me->RemoveAurasDueToSpell(SPELL_ARMAGEDDON_PERIODIC);
Talk(EMOTE_KJ_DARKNESS);
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS);
me->m_Events.AddEventAtOffset([this]() {
if (me->IsAlive() && me->IsInCombat())
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
}, 9s);
}, 25s);
ScheduleTimedEvent(1500ms, [&] {
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
}, 20s);
}, 7s);
}
Talk(SAY_KJ_PHASE5);
}, 30s);
me->m_Events.AddEventAtOffset([&] {
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
kalec->AI()->Talk(SAY_KALECGOS_READY_ALL);
EmpowerOrb(true);
}, 61s);
{
kalec->AI()->Talk(SAY_KALECGOS_FOCUS, 8s);
kalec->AI()->Talk(SAY_KALECGOS_FATE, 20s + 200ms);
}
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
{
anveena->AI()->Talk(SAY_ANVEENA_KALEC, 18s);
anveena->AI()->Talk(SAY_ANVEENA_GOODBYE, 25s);
}
me->m_Events.AddEventAtOffset([&] {
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
{
anveena->RemoveAllAuras();
anveena->DespawnOrUnsummon(3500);
}
}, 28s);
me->m_Events.AddEventAtOffset([&] {
if (Creature* anveena = instance->GetCreature(DATA_ANVEENA))
{
anveena->CastSpell(anveena, SPELL_SACRIFICE_OF_ANVEENA, true);
DoCastSelf(SPELL_CUSTOM_08_STATE, true);
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
scheduler.CancelAll();
me->m_Events.AddEventAtOffset([&] {
me->RemoveAurasDueToSpell(SPELL_CUSTOM_08_STATE);
me->RemoveUnitFlag(UNIT_FLAG_PACIFIED);
ScheduleBasicAbilities();
ScheduleTimedEvent(25s, [&] {
me->RemoveAurasDueToSpell(SPELL_ARMAGEDDON_PERIODIC);
Talk(EMOTE_KJ_DARKNESS);
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS);
me->m_Events.AddEventAtOffset([this]() {
if (me->IsAlive() && me->IsInCombat())
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
}, 9s);
}, 25s);
ScheduleTimedEvent(1500ms, [&] {
DoCastSelf(SPELL_ARMAGEDDON_PERIODIC, true);
}, 20s);
}, 7s);
}
Talk(SAY_KJ_PHASE5);
}, 30s);
me->m_Events.AddEventAtOffset([&] {
if (Creature* kalec = instance->GetCreature(DATA_KALECGOS_KJ))
kalec->AI()->Talk(SAY_KALECGOS_READY_ALL);
EmpowerOrb(true);
}, 61s);
});
});
}
@@ -461,8 +471,12 @@ struct boss_kiljaeden : public BossAI
{
if (me->GetReactState() == REACT_PASSIVE)
return;
ScriptedAI::EnterEvadeMode(why);
me->DespawnOrUnsummon();
if (InstanceScript* instance = me->GetInstanceScript())
if (Creature* controller = instance->GetCreature(DATA_KJ_CONTROLLER))
if (controller->IsAIEnabled)
controller->AI()->Reset();
}
void AttackStart(Unit* who) override
@@ -78,7 +78,7 @@ ObjectData const summonData[] =
class instance_sunwell_plateau : public InstanceMapScript
{
public:
instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", 580) { }
instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", MAP_THE_SUNWELL) { }
struct instance_sunwell_plateau_InstanceMapScript : public InstanceScript
{
@@ -21,7 +21,7 @@
class instance_the_stockade : public InstanceMapScript
{
public:
instance_the_stockade() : InstanceMapScript("instance_the_stockade", 34) { }
instance_the_stockade() : InstanceMapScript("instance_the_stockade", MAP_STORMWIND_STOCKADE) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CreatureAI.h"
#include "InstanceMapScript.h"
#include "InstanceScript.h"
@@ -36,7 +37,7 @@ enum Events
class instance_uldaman : public InstanceMapScript
{
public:
instance_uldaman() : InstanceMapScript("instance_uldaman", 70) { }
instance_uldaman() : InstanceMapScript("instance_uldaman", MAP_ULDAMAN) { }
struct instance_uldaman_InstanceMapScript : public InstanceScript
{
@@ -156,11 +157,6 @@ class spell_uldaman_sub_boss_agro_keepers : public SpellScript
}
};
enum UldamanStonedEnum
{
MAP_ULDAMAN = 70
};
class spell_uldaman_stoned_aura : public AuraScript
{
PrepareAuraScript(spell_uldaman_stoned_aura);
@@ -84,7 +84,7 @@ struct boss_akilzon : public BossAI
scheduler.Schedule(10s, 20s, GROUP_STATIC_DISRUPTION, [this](TaskContext context)
{
Unit* target = SelectTarget(SelectTargetMethod::Random, 1);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false);
if (!target)
target = me->GetVictim();
if (target)
@@ -99,7 +99,7 @@ struct boss_akilzon : public BossAI
ScheduleTimedEvent(20s, 30s, [&] {
if (scheduler.GetNextGroupOccurrence(GROUP_ELECTRICAL_STORM) > 5s)
DoCastRandomTarget(SPELL_GUST_OF_WIND, 1);
DoCastRandomTarget(SPELL_GUST_OF_WIND, 0, 0.0f, true, false, false);
}, 20s, 30s);
ScheduleTimedEvent(10s, 20s, [&] {
@@ -205,7 +205,7 @@ struct boss_zuljin : public BossAI
if (me->HasAura(SPELL_LYNX_RUSH_HASTE))
return;
DoCastRandomTarget(SPELL_CLAW_RAGE_CHARGE, 1);
DoCastRandomTarget(SPELL_CLAW_RAGE_CHARGE, 0, 0.0f, true, false, true);
}, 15s, 20s);
ScheduleTimedEvent(14s, [&] {
@@ -96,7 +96,7 @@ BossBoundaryData const boundaries =
class instance_zulaman : public InstanceMapScript
{
public:
instance_zulaman() : InstanceMapScript("instance_zulaman", 568) { }
instance_zulaman() : InstanceMapScript("instance_zulaman", MAP_ZUL_AMAN) { }
struct instance_zulaman_InstanceMapScript : public InstanceScript
{
@@ -122,7 +122,7 @@ struct boss_hazzarah : public BossAI
case EVENT_CHAIN_BURN:
if (me->GetPowerPct(POWER_MANA) > 5.f) // totally guessed
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA; }))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA && u != me->GetVictim(); }))
{
DoCast(target, SPELL_CHAIN_BURN);
}
@@ -150,7 +150,7 @@ public:
events.ScheduleEvent(EVENT_VANISH, 38s, 45s);
return;
case EVENT_AMBUSH:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
{
me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation());
DoCast(target, SPELL_AMBUSH, true);
@@ -47,7 +47,7 @@ ObjectData const creatureData[] =
class instance_zulgurub : public InstanceMapScript
{
public:
instance_zulgurub(): InstanceMapScript(ZGScriptName, 309) { }
instance_zulgurub(): InstanceMapScript(ZGScriptName, MAP_ZUL_GURUB) { }
struct instance_zulgurub_InstanceMapScript : public InstanceScript
{
@@ -90,7 +90,7 @@ struct boss_twilight_corrupter : public ScriptedAI
_scheduler
.Schedule(12s, 18s, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_CREATURE_OF_NIGHTMARE, 1, 100.f);
DoCastRandomTarget(SPELL_CREATURE_OF_NIGHTMARE, 0, 100.f, true, false, false);
context.Repeat(35s, 45s);
})
.Schedule(9s, 16s, [this](TaskContext context)
@@ -27,6 +27,7 @@ npc_the_scourge_cauldron
npc_andorhal_tower
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -74,7 +75,7 @@ public:
switch (me->GetAreaId())
{
case 199: //felstone
case AREA_FELSTONE_FIELD:
if (player->GetQuestStatus(5216) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE)
{
@@ -82,7 +83,7 @@ public:
DoDie();
}
break;
case 200: //dalson
case AREA_DALSONS_TEARS:
if (player->GetQuestStatus(5219) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE)
{
@@ -90,7 +91,7 @@ public:
DoDie();
}
break;
case 201: //gahrron
case AREA_GAHRRONS_WITHERING:
if (player->GetQuestStatus(5225) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE)
{
@@ -98,7 +99,7 @@ public:
DoDie();
}
break;
case 202: //writhing
case AREA_THE_WRITHING_HAUNT:
if (player->GetQuestStatus(5222) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE)
{
+15 -14
View File
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CellImpl.h"
#include "CreatureScript.h"
#include "GameEventMgr.h"
@@ -154,8 +155,8 @@ struct npc_brewfest_bark_trigger : public ScriptedAI
bool allow = false;
uint32 quest = 0;
Player* player = who->ToPlayer();
// Kalimdor
if (me->GetMapId() == 1)
if (me->GetMapId() == MAP_KALIMDOR)
{
if (player->GetQuestStatus(QUEST_BARK_FOR_DROHN) == QUEST_STATUS_INCOMPLETE)
{
@@ -168,7 +169,7 @@ struct npc_brewfest_bark_trigger : public ScriptedAI
quest = QUEST_BARK_FOR_VOODOO;
}
}
else if (me->GetMapId() == 0)
else if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
{
if (player->GetQuestStatus(QUEST_BARK_FOR_BARLEY) == QUEST_STATUS_INCOMPLETE)
{
@@ -374,7 +375,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
}
case EVENT_SPAWN_MOLE_MACHINE:
{
if (me->GetMapId() == 1) // Kalimdor
if (me->GetMapId() == MAP_KALIMDOR)
{
float rand = 8 + rand_norm() * 12;
float angle = rand_norm() * 2 * M_PI;
@@ -383,7 +384,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
if (Creature* cr = me->SummonCreature(NPC_MOLE_MACHINE_TRIGGER, x, y, 21.3f, 0.0f))
cr->CastSpell(cr, SPELL_SPAWN_MOLE_MACHINE, true);
}
else if (me->GetMapId() == 0) // EK
else if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
{
float rand = rand_norm() * 20;
float angle = rand_norm() * 2 * M_PI;
@@ -457,7 +458,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
herald->Yell(amount, LANG_UNIVERSAL);
}
me->CastSpell(me, (me->GetMapId() == 1 ? SPELL_SUMMON_PLANS_H : SPELL_SUMMON_PLANS_A), true);
me->CastSpell(me, (me->GetMapId() == MAP_KALIMDOR ? SPELL_SUMMON_PLANS_H : SPELL_SUMMON_PLANS_A), true);
Reset();
}
@@ -473,7 +474,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
}
Creature* cr;
if (me->GetMapId() == 1) // Kalimdor
if (me->GetMapId() == MAP_KALIMDOR)
{
if ((cr = me->SummonCreature(NPC_DROHN_KEG, 1183.69f, -4315.15f, 21.1875f, 0.750492f)))
{
@@ -494,7 +495,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
revelerGUIDs.push_back(cr->GetGUID());
}
}
else if (me->GetMapId() == 0) // Eastern Kingdom
else if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
{
if ((cr = me->SummonCreature(NPC_BARLEYBREW_KEG, -5187.23f, -599.779f, 397.176f, 0.017453f)))
{
@@ -544,10 +545,10 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
switch (urand(0, 2))
{
case 0:
entry = (me->GetMapId() == 1 ? NPC_NORMAL_DROHN : NPC_NORMAL_THUNDERBREW);
entry = (me->GetMapId() == MAP_KALIMDOR ? NPC_NORMAL_DROHN : NPC_NORMAL_THUNDERBREW);
break;
case 1:
entry = (me->GetMapId() == 1 ? NPC_NORMAL_VOODOO : NPC_NORMAL_BARLEYBREW);
entry = (me->GetMapId() == MAP_KALIMDOR ? NPC_NORMAL_VOODOO : NPC_NORMAL_BARLEYBREW);
break;
case 2:
entry = NPC_NORMAL_GORDOK;
@@ -649,13 +650,13 @@ struct npc_dark_iron_guzzler : public ScriptedAI
uint32 entry[3] = {0, 0, 0};
uint32 shuffled[3] = {0, 0, 0};
if (me->GetMapId() == 1) // Kalimdor
if (me->GetMapId() == MAP_KALIMDOR)
{
entry[0] = NPC_DROHN_KEG;
entry[1] = NPC_VOODOO_KEG;
entry[2] = NPC_GORDOK_KEG;
}
else// if (me->GetMapId() == 0) // EK
else// if (me->GetMapId() == MAP_EASTERN_KINGDOMS)
{
entry[0] = NPC_THUNDERBREW_KEG;
entry[1] = NPC_BARLEYBREW_KEG;
@@ -1231,7 +1232,7 @@ class spell_brewfest_toss_mug : public SpellScript
return;
std::vector<Creature*> bakers;
if (caster->GetMapId() == 1) // Kalimdor
if (caster->GetMapId() == MAP_KALIMDOR)
{
if (Creature* creature = caster->FindNearestCreature(NPC_NORMAL_VOODOO, 40.0f))
{
@@ -1248,7 +1249,7 @@ class spell_brewfest_toss_mug : public SpellScript
bakers.push_back(creature);
}
}
else // EK
else // Eastern Kingdoms
{
if (Creature* creature = caster->FindNearestCreature(NPC_NORMAL_THUNDERBREW, 40.0f))
{
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "firework_show.h"
#include "firework_show_BootyBay.h"
#include "firework_show_Exodar.h"
@@ -32,16 +33,16 @@
// <mapId, zoneId>, show
std::map<std::pair<uint32, uint32>, FireworkShow const *> const FireworkShowStore = {
{ { 0, 1 }, &fireworkShowIronforge },
{ { 0, 33 }, &fireworkShowBootyBay },
{ { 0, 1497 }, &fireworkShowUndercity },
{ { 0, 1519 }, &fireworkShowStormwind },
{ { 1, 141 }, &fireworkShowTeldrassil },
{ { 1, 1637 }, &fireworkShowOrgrimmar },
{ { 1, 1638 }, &fireworkShowThunderBluff },
{ { 530, 3430 }, &fireworkShowSilvermoon },
{ { 530, 3557 }, &fireworkShowExodar },
{ { 530, 3703 }, &fireworkShowShattrath },
{ { MAP_EASTERN_KINGDOMS, AREA_DUN_MOROGH }, &fireworkShowIronforge },
{ { MAP_EASTERN_KINGDOMS, AREA_STRANGLETHORN_VALE }, &fireworkShowBootyBay },
{ { MAP_EASTERN_KINGDOMS, AREA_UNDERCITY }, &fireworkShowUndercity },
{ { MAP_EASTERN_KINGDOMS, AREA_STORMWIND_CITY }, &fireworkShowStormwind },
{ { MAP_KALIMDOR, AREA_TELDRASSIL }, &fireworkShowTeldrassil },
{ { MAP_KALIMDOR, AREA_ORGRIMMAR }, &fireworkShowOrgrimmar },
{ { MAP_KALIMDOR, AREA_THUNDER_BLUFF }, &fireworkShowThunderBluff },
{ { MAP_OUTLAND, AREA_EVERSONG_WOODS }, &fireworkShowSilvermoon },
{ { MAP_OUTLAND, AREA_THE_EXODAR }, &fireworkShowExodar },
{ { MAP_OUTLAND, AREA_SHATTRATH_CITY }, &fireworkShowShattrath },
};
struct go_firework_show : public GameObjectAI
+7 -6
View File
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CellImpl.h"
#include "CreatureScript.h"
#include "GameObjectAI.h"
@@ -371,42 +372,42 @@ struct npc_costumed_orphan_matron : public ScriptedAI
{
switch (me->GetAreaId())
{
case 87: // Goldshire
case AREA_GOLDSHIRE:
x = -9494.4f;
y = 48.53f;
z = 70.5f;
o = 0.5f;
path = 235431;
break;
case 131: // Kharanos
case AREA_KHARANOS:
x = -5558.34f;
y = -499.46f;
z = 414.12f;
o = 2.08f;
path = 235432;
break;
case 3576: // Azure Watch
case AREA_AZURE_WATCH:
x = -4163.58f;
y = -12460.30f;
z = 63.02f;
o = 4.31f;
path = 235433;
break;
case 362: // Razor Hill
case AREA_RAZOR_HILL:
x = 373.2f;
y = -4723.4f;
z = 31.2f;
o = 3.2f;
path = 235434;
break;
case 159: // Brill
case AREA_BRILL:
x = 2195.2f;
y = 264.0f;
z = 55.62f;
o = 0.15f;
path = 235435;
break;
case 3665: // Falcon Wing Square
case AREA_FALCONWING_SQUARE:
x = 9547.91f;
y = -6809.9f;
z = 27.96f;
+85 -88
View File
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "GameEventMgr.h"
#include "GameObjectScript.h"
@@ -59,91 +60,87 @@ static bool BonfireStampedOutState[COUNT_GO_BONFIRE_ALLIANCE + COUNT_GO_BONFIRE_
// <mapId, zoneId, teamId>, <state>
const std::map<std::tuple<uint32, uint32, TeamId>, bool*> BonfireStateStore = {
// Map 0
{ { 0, 1, TEAM_ALLIANCE }, &BonfireStampedOutState[0] },
{ { 0, 3, TEAM_HORDE }, &BonfireStampedOutState[1] },
{ { 0, 4, TEAM_ALLIANCE }, &BonfireStampedOutState[2] },
{ { 0, 8, TEAM_HORDE }, &BonfireStampedOutState[3] },
{ { 0, 10, TEAM_ALLIANCE }, &BonfireStampedOutState[4] },
{ { 0, 11, TEAM_ALLIANCE }, &BonfireStampedOutState[5] },
{ { 0, 12, TEAM_ALLIANCE }, &BonfireStampedOutState[6] },
{ { 0, 28, TEAM_ALLIANCE }, &BonfireStampedOutState[7] },
{ { 0, 33, TEAM_ALLIANCE }, &BonfireStampedOutState[8] },
{ { 0, 33, TEAM_HORDE }, &BonfireStampedOutState[9] },
{ { 0, 38, TEAM_ALLIANCE }, &BonfireStampedOutState[10] },
{ { 0, 40, TEAM_ALLIANCE }, &BonfireStampedOutState[11] },
{ { 0, 44, TEAM_ALLIANCE }, &BonfireStampedOutState[12] },
{ { 0, 45, TEAM_ALLIANCE }, &BonfireStampedOutState[13] },
{ { 0, 45, TEAM_HORDE }, &BonfireStampedOutState[14] },
{ { 0, 46, TEAM_ALLIANCE }, &BonfireStampedOutState[15] },
{ { 0, 46, TEAM_HORDE }, &BonfireStampedOutState[16] },
{ { 0, 47, TEAM_ALLIANCE }, &BonfireStampedOutState[17] },
{ { 0, 47, TEAM_HORDE }, &BonfireStampedOutState[18] },
{ { 0, 85, TEAM_HORDE }, &BonfireStampedOutState[19] },
{ { 0, 130, TEAM_HORDE }, &BonfireStampedOutState[20] },
{ { 0, 267, TEAM_ALLIANCE }, &BonfireStampedOutState[21] },
{ { 0, 267, TEAM_HORDE }, &BonfireStampedOutState[22] },
{ { MAP_EASTERN_KINGDOMS, AREA_DUN_MOROGH, TEAM_ALLIANCE }, &BonfireStampedOutState[0] },
{ { MAP_EASTERN_KINGDOMS, AREA_BADLANDS, TEAM_HORDE }, &BonfireStampedOutState[1] },
{ { MAP_EASTERN_KINGDOMS, AREA_BLASTED_LANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[2] },
{ { MAP_EASTERN_KINGDOMS, AREA_SWAMP_OF_SORROWS, TEAM_HORDE }, &BonfireStampedOutState[3] },
{ { MAP_EASTERN_KINGDOMS, AREA_DUSKWOOD, TEAM_ALLIANCE }, &BonfireStampedOutState[4] },
{ { MAP_EASTERN_KINGDOMS, AREA_WETLANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[5] },
{ { MAP_EASTERN_KINGDOMS, AREA_ELWYNN_FOREST, TEAM_ALLIANCE }, &BonfireStampedOutState[6] },
{ { MAP_EASTERN_KINGDOMS, AREA_WESTERN_PLAGUELANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[7] },
{ { MAP_EASTERN_KINGDOMS, AREA_STRANGLETHORN_VALE, TEAM_ALLIANCE }, &BonfireStampedOutState[8] },
{ { MAP_EASTERN_KINGDOMS, AREA_STRANGLETHORN_VALE, TEAM_HORDE }, &BonfireStampedOutState[9] },
{ { MAP_EASTERN_KINGDOMS, AREA_LOCH_MODAN, TEAM_ALLIANCE }, &BonfireStampedOutState[10] },
{ { MAP_EASTERN_KINGDOMS, AREA_WESTFALL, TEAM_ALLIANCE }, &BonfireStampedOutState[11] },
{ { MAP_EASTERN_KINGDOMS, AREA_REDRIDGE_MOUNTAINS, TEAM_ALLIANCE }, &BonfireStampedOutState[12] },
{ { MAP_EASTERN_KINGDOMS, AREA_ARATHI_HIGHLANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[13] },
{ { MAP_EASTERN_KINGDOMS, AREA_ARATHI_HIGHLANDS, TEAM_HORDE }, &BonfireStampedOutState[14] },
{ { MAP_EASTERN_KINGDOMS, AREA_BURNING_STEPPES, TEAM_ALLIANCE }, &BonfireStampedOutState[15] },
{ { MAP_EASTERN_KINGDOMS, AREA_BURNING_STEPPES, TEAM_HORDE }, &BonfireStampedOutState[16] },
{ { MAP_EASTERN_KINGDOMS, AREA_THE_HINTERLANDS, TEAM_ALLIANCE }, &BonfireStampedOutState[17] },
{ { MAP_EASTERN_KINGDOMS, AREA_THE_HINTERLANDS, TEAM_HORDE }, &BonfireStampedOutState[18] },
{ { MAP_EASTERN_KINGDOMS, AREA_TIRISFAL_GLADES, TEAM_HORDE }, &BonfireStampedOutState[19] },
{ { MAP_EASTERN_KINGDOMS, AREA_SILVERPINE_FOREST, TEAM_HORDE }, &BonfireStampedOutState[20] },
{ { MAP_EASTERN_KINGDOMS, AREA_HILLSBRAD_FOOTHILLS, TEAM_ALLIANCE }, &BonfireStampedOutState[21] },
{ { MAP_EASTERN_KINGDOMS, AREA_HILLSBRAD_FOOTHILLS, TEAM_HORDE }, &BonfireStampedOutState[22] },
// Map 1
{ { 1, 14, TEAM_HORDE }, &BonfireStampedOutState[23] },
{ { 1, 15, TEAM_ALLIANCE }, &BonfireStampedOutState[24] },
{ { 1, 15, TEAM_HORDE }, &BonfireStampedOutState[25] },
{ { 1, 17, TEAM_HORDE }, &BonfireStampedOutState[26] },
{ { 1, 141, TEAM_ALLIANCE }, &BonfireStampedOutState[27] },
{ { 1, 148, TEAM_ALLIANCE }, &BonfireStampedOutState[28] },
{ { 1, 215, TEAM_HORDE }, &BonfireStampedOutState[29] },
{ { 1, 331, TEAM_ALLIANCE }, &BonfireStampedOutState[30] },
{ { 1, 331, TEAM_HORDE }, &BonfireStampedOutState[31] },
{ { 1, 357, TEAM_ALLIANCE }, &BonfireStampedOutState[32] },
{ { 1, 357, TEAM_HORDE }, &BonfireStampedOutState[33] },
{ { 1, 400, TEAM_HORDE }, &BonfireStampedOutState[34] },
{ { 1, 405, TEAM_ALLIANCE }, &BonfireStampedOutState[35] },
{ { 1, 405, TEAM_HORDE }, &BonfireStampedOutState[36] },
{ { 1, 406, TEAM_HORDE }, &BonfireStampedOutState[37] },
{ { 1, 440, TEAM_ALLIANCE }, &BonfireStampedOutState[38] },
{ { 1, 440, TEAM_HORDE }, &BonfireStampedOutState[39] },
{ { 1, 618, TEAM_ALLIANCE }, &BonfireStampedOutState[40] },
{ { 1, 618, TEAM_HORDE }, &BonfireStampedOutState[41] },
{ { 1, 1377, TEAM_ALLIANCE }, &BonfireStampedOutState[42] },
{ { 1, 1377, TEAM_HORDE }, &BonfireStampedOutState[43] },
{ { MAP_KALIMDOR, AREA_DUROTAR, TEAM_HORDE }, &BonfireStampedOutState[23] },
{ { MAP_KALIMDOR, AREA_DUSTWALLOW_MARSH, TEAM_ALLIANCE }, &BonfireStampedOutState[24] },
{ { MAP_KALIMDOR, AREA_DUSTWALLOW_MARSH, TEAM_HORDE }, &BonfireStampedOutState[25] },
{ { MAP_KALIMDOR, AREA_THE_BARRENS, TEAM_HORDE }, &BonfireStampedOutState[26] },
{ { MAP_KALIMDOR, AREA_TELDRASSIL, TEAM_ALLIANCE }, &BonfireStampedOutState[27] },
{ { MAP_KALIMDOR, AREA_DARKSHORE, TEAM_ALLIANCE }, &BonfireStampedOutState[28] },
{ { MAP_KALIMDOR, AREA_MULGORE, TEAM_HORDE }, &BonfireStampedOutState[29] },
{ { MAP_KALIMDOR, AREA_ASHENVALE, TEAM_ALLIANCE }, &BonfireStampedOutState[30] },
{ { MAP_KALIMDOR, AREA_ASHENVALE, TEAM_HORDE }, &BonfireStampedOutState[31] },
{ { MAP_KALIMDOR, AREA_FERALAS, TEAM_ALLIANCE }, &BonfireStampedOutState[32] },
{ { MAP_KALIMDOR, AREA_FERALAS, TEAM_HORDE }, &BonfireStampedOutState[33] },
{ { MAP_KALIMDOR, AREA_THOUSAND_NEEDLES, TEAM_HORDE }, &BonfireStampedOutState[34] },
{ { MAP_KALIMDOR, AREA_DESOLACE, TEAM_ALLIANCE }, &BonfireStampedOutState[35] },
{ { MAP_KALIMDOR, AREA_DESOLACE, TEAM_HORDE }, &BonfireStampedOutState[36] },
{ { MAP_KALIMDOR, AREA_STONETALON_MOUNTAINS, TEAM_HORDE }, &BonfireStampedOutState[37] },
{ { MAP_KALIMDOR, AREA_TANARIS, TEAM_ALLIANCE }, &BonfireStampedOutState[38] },
{ { MAP_KALIMDOR, AREA_TANARIS, TEAM_HORDE }, &BonfireStampedOutState[39] },
{ { MAP_KALIMDOR, AREA_WINTERSPRING, TEAM_ALLIANCE }, &BonfireStampedOutState[40] },
{ { MAP_KALIMDOR, AREA_WINTERSPRING, TEAM_HORDE }, &BonfireStampedOutState[41] },
{ { MAP_KALIMDOR, AREA_SILITHUS, TEAM_ALLIANCE }, &BonfireStampedOutState[42] },
{ { MAP_KALIMDOR, AREA_SILITHUS, TEAM_HORDE }, &BonfireStampedOutState[43] },
// Map 530
{ { 530, 3430, TEAM_HORDE }, &BonfireStampedOutState[44] },
{ { 530, 3433, TEAM_HORDE }, &BonfireStampedOutState[45] },
{ { 530, 3483, TEAM_ALLIANCE }, &BonfireStampedOutState[46] },
{ { 530, 3483, TEAM_HORDE }, &BonfireStampedOutState[47] },
{ { 530, 3518, TEAM_ALLIANCE }, &BonfireStampedOutState[48] },
{ { 530, 3518, TEAM_HORDE }, &BonfireStampedOutState[49] },
{ { 530, 3519, TEAM_ALLIANCE }, &BonfireStampedOutState[50] },
{ { 530, 3519, TEAM_HORDE }, &BonfireStampedOutState[51] },
{ { 530, 3520, TEAM_ALLIANCE }, &BonfireStampedOutState[52] },
{ { 530, 3520, TEAM_HORDE }, &BonfireStampedOutState[53] },
{ { 530, 3521, TEAM_ALLIANCE }, &BonfireStampedOutState[54] },
{ { 530, 3521, TEAM_HORDE }, &BonfireStampedOutState[55] },
{ { 530, 3522, TEAM_ALLIANCE }, &BonfireStampedOutState[56] },
{ { 530, 3522, TEAM_HORDE }, &BonfireStampedOutState[57] },
{ { 530, 3523, TEAM_ALLIANCE }, &BonfireStampedOutState[58] },
{ { 530, 3523, TEAM_HORDE }, &BonfireStampedOutState[59] },
{ { 530, 3524, TEAM_ALLIANCE }, &BonfireStampedOutState[60] },
{ { 530, 3525, TEAM_ALLIANCE }, &BonfireStampedOutState[61] },
{ { MAP_OUTLAND, AREA_EVERSONG_WOODS, TEAM_HORDE }, &BonfireStampedOutState[44] },
{ { MAP_OUTLAND, AREA_GHOSTLANDS, TEAM_HORDE }, &BonfireStampedOutState[45] },
{ { MAP_OUTLAND, AREA_HELLFIRE_PENINSULA, TEAM_ALLIANCE }, &BonfireStampedOutState[46] },
{ { MAP_OUTLAND, AREA_HELLFIRE_PENINSULA, TEAM_HORDE }, &BonfireStampedOutState[47] },
{ { MAP_OUTLAND, AREA_NAGRAND, TEAM_ALLIANCE }, &BonfireStampedOutState[48] },
{ { MAP_OUTLAND, AREA_NAGRAND, TEAM_HORDE }, &BonfireStampedOutState[49] },
{ { MAP_OUTLAND, AREA_TEROKKAR_FOREST, TEAM_ALLIANCE }, &BonfireStampedOutState[50] },
{ { MAP_OUTLAND, AREA_TEROKKAR_FOREST, TEAM_HORDE }, &BonfireStampedOutState[51] },
{ { MAP_OUTLAND, AREA_SHADOWMOON_VALLEY, TEAM_ALLIANCE }, &BonfireStampedOutState[52] },
{ { MAP_OUTLAND, AREA_SHADOWMOON_VALLEY, TEAM_HORDE }, &BonfireStampedOutState[53] },
{ { MAP_OUTLAND, AREA_ZANGARMARSH, TEAM_ALLIANCE }, &BonfireStampedOutState[54] },
{ { MAP_OUTLAND, AREA_ZANGARMARSH, TEAM_HORDE }, &BonfireStampedOutState[55] },
{ { MAP_OUTLAND, AREA_BLADES_EDGE_MOUNTAINS, TEAM_ALLIANCE }, &BonfireStampedOutState[56] },
{ { MAP_OUTLAND, AREA_BLADES_EDGE_MOUNTAINS, TEAM_HORDE }, &BonfireStampedOutState[57] },
{ { MAP_OUTLAND, AREA_NETHERSTORM, TEAM_ALLIANCE }, &BonfireStampedOutState[58] },
{ { MAP_OUTLAND, AREA_NETHERSTORM, TEAM_HORDE }, &BonfireStampedOutState[59] },
{ { MAP_OUTLAND, AREA_AZUREMYST_ISLE, TEAM_ALLIANCE }, &BonfireStampedOutState[60] },
{ { MAP_OUTLAND, AREA_BLOODMYST_ISLE, TEAM_ALLIANCE }, &BonfireStampedOutState[61] },
// Map 571
{ { 571, 65, TEAM_ALLIANCE }, &BonfireStampedOutState[62] },
{ { 571, 65, TEAM_HORDE }, &BonfireStampedOutState[63] },
{ { 571, 66, TEAM_ALLIANCE }, &BonfireStampedOutState[64] },
{ { 571, 66, TEAM_HORDE }, &BonfireStampedOutState[65] },
{ { 571, 67, TEAM_ALLIANCE }, &BonfireStampedOutState[66] },
{ { 571, 67, TEAM_HORDE }, &BonfireStampedOutState[67] },
{ { 571, 394, TEAM_ALLIANCE }, &BonfireStampedOutState[68] },
{ { 571, 394, TEAM_HORDE }, &BonfireStampedOutState[69] },
{ { 571, 495, TEAM_ALLIANCE }, &BonfireStampedOutState[70] },
{ { 571, 495, TEAM_HORDE }, &BonfireStampedOutState[71] },
{ { 571, 2817, TEAM_ALLIANCE }, &BonfireStampedOutState[72] },
{ { 571, 2817, TEAM_HORDE }, &BonfireStampedOutState[73] },
{ { 571, 3537, TEAM_ALLIANCE }, &BonfireStampedOutState[74] },
{ { 571, 3537, TEAM_HORDE }, &BonfireStampedOutState[75] },
{ { 571, 3711, TEAM_ALLIANCE }, &BonfireStampedOutState[76] },
{ { 571, 3711, TEAM_HORDE }, &BonfireStampedOutState[77] },
{ { MAP_NORTHREND, AREA_DRAGONBLIGHT, TEAM_ALLIANCE }, &BonfireStampedOutState[62] },
{ { MAP_NORTHREND, AREA_DRAGONBLIGHT, TEAM_HORDE }, &BonfireStampedOutState[63] },
{ { MAP_NORTHREND, AREA_ZUL_DRAK, TEAM_ALLIANCE }, &BonfireStampedOutState[64] },
{ { MAP_NORTHREND, AREA_ZUL_DRAK, TEAM_HORDE }, &BonfireStampedOutState[65] },
{ { MAP_NORTHREND, AREA_THE_STORM_PEAKS, TEAM_ALLIANCE }, &BonfireStampedOutState[66] },
{ { MAP_NORTHREND, AREA_THE_STORM_PEAKS, TEAM_HORDE }, &BonfireStampedOutState[67] },
{ { MAP_NORTHREND, AREA_GRIZZLY_HILLS, TEAM_ALLIANCE }, &BonfireStampedOutState[68] },
{ { MAP_NORTHREND, AREA_GRIZZLY_HILLS, TEAM_HORDE }, &BonfireStampedOutState[69] },
{ { MAP_NORTHREND, AREA_HOWLING_FJORD, TEAM_ALLIANCE }, &BonfireStampedOutState[70] },
{ { MAP_NORTHREND, AREA_HOWLING_FJORD, TEAM_HORDE }, &BonfireStampedOutState[71] },
{ { MAP_NORTHREND, AREA_CRYSTALSONG_FOREST, TEAM_ALLIANCE }, &BonfireStampedOutState[72] },
{ { MAP_NORTHREND, AREA_CRYSTALSONG_FOREST, TEAM_HORDE }, &BonfireStampedOutState[73] },
{ { MAP_NORTHREND, AREA_BOREAN_TUNDRA, TEAM_ALLIANCE }, &BonfireStampedOutState[74] },
{ { MAP_NORTHREND, AREA_BOREAN_TUNDRA, TEAM_HORDE }, &BonfireStampedOutState[75] },
{ { MAP_NORTHREND, AREA_SHOLAZAR_BASIN, TEAM_ALLIANCE }, &BonfireStampedOutState[76] },
{ { MAP_NORTHREND, AREA_SHOLAZAR_BASIN, TEAM_HORDE }, &BonfireStampedOutState[77] },
};
uint32 const GoBonfireAlliance[COUNT_GO_BONFIRE_ALLIANCE] = { 187564, 187914, 187916, 187917, 187919, 187920, 187921, 187922, 187923, 187924, 187925, 187926, 187927, 187928, 187929, 187930, 187931, 187932, 187933, 187934, 187935, 187936, 187937, 187938, 187939, 187940, 187941, 187942, 187943, 187944, 187945, 187946, 194032, 194035, 194036, 194038, 194040, 194044, 194045, 194049 };
@@ -1254,22 +1251,22 @@ class spell_midsummer_summon_ahune_lieutenant : public SpellScript
switch (zoneId)
{
case 331: // Ashenvale
case AREA_ASHENVALE:
npcEntry = 26116; // Frostwave Lieutenant
break;
case 405: // Desolace
case AREA_DESOLACE:
npcEntry = 26178; // Hailstone Lieutenant
break;
case 33: // Stranglethorn Vale
case AREA_STRANGLETHORN_VALE:
npcEntry = 26204; // Chillwind Lieutenant
break;
case 51: // Searing Gorge
case AREA_SEARING_GORGE:
npcEntry = 26214; // Frigid Lieutenant
break;
case 1377: // Silithus
case AREA_SILITHUS:
npcEntry = 26215; // Glacial Lieutenant
break;
case 3483: // Hellfire Peninsula
case AREA_HELLFIRE_PENINSULA:
npcEntry = 26216; // Glacial Templar
break;
}
@@ -22,7 +22,7 @@
class instance_blackfathom_deeps : public InstanceMapScript
{
public:
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", 48) { }
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", MAP_BLACKFATHOM_DEEPS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -67,7 +67,7 @@ public:
}).Schedule(25s, 32s, [this](TaskContext context)
{
Talk(SAY_SLEEP);
DoCastRandomTarget(SPELL_SLEEP, 1, 0.0f, true, false, false);
DoCastRandomTarget(SPELL_SLEEP, 0, 0.0f, true, false, false);
context.Repeat(35s, 48s);
}).Schedule(30s, 48s, [this](TaskContext context)
{
@@ -139,8 +139,6 @@ enum HyjalMisc
CONTEXT_GROUP_WAVES = 1,
AREA_NORDRASSIL = 3710,
SPELL_ETERNAL_SILENCE = 42201,
GUID_GAIN_SOUL_CHARGE_PLAYER = 1
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "Chat.h"
#include "InstanceMapScript.h"
#include "InstanceScript.h"
@@ -72,7 +73,7 @@ Milliseconds hyjalNightElfWaveTimers[1][MAX_WAVES_NIGHT_ELF]
class instance_hyjal : public InstanceMapScript
{
public:
instance_hyjal() : InstanceMapScript("instance_hyjal", 534) { }
instance_hyjal() : InstanceMapScript("instance_hyjal", MAP_THE_BATTLE_FOR_MOUNT_HYJAL) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -955,7 +955,7 @@ public:
eventInRun = false;
ScheduleNextEvent(currentEvent, 0);
break;
//After waypoint 23
// After waypoint 23
case EVENT_ACTION_PHASE3+3:
SetRun(true);
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
@@ -971,10 +971,12 @@ public:
cr->AI()->Talk(SAY_PHASE305);
ScheduleNextEvent(currentEvent, 1000);
break;
// Trio citizen transformation right as we enter Town Hall
case EVENT_ACTION_PHASE3+6:
if (Creature* cr = GetEventNpc(NPC_CITY_MAN))
{
cr->UpdateEntry(NPC_INFINITE_HUNTER, nullptr, false);
cr->SetFullHealth();
cr->SetImmuneToAll(true);
cr->SetReactState(REACT_PASSIVE);
}
@@ -984,6 +986,7 @@ public:
if (Creature* cr = GetEventNpc(NPC_CITY_MAN4))
{
cr->UpdateEntry(NPC_INFINITE_AGENT, nullptr, false);
cr->SetFullHealth();
cr->SetImmuneToAll(true);
cr->SetReactState(REACT_PASSIVE);
}
@@ -993,18 +996,19 @@ public:
if (Creature* cr = GetEventNpc(NPC_CITY_MAN3))
{
cr->UpdateEntry(NPC_INFINITE_ADVERSARY, nullptr, false);
cr->SetFullHealth();
cr->SetReactState(REACT_AGGRESSIVE);
cr->SetInCombatWithZone();
cr->AddThreat(me, 0.0f);
}
if (Creature* cr = GetEventNpc(NPC_INFINITE_AGENT)) // it is infinite agent now :)
if (Creature* cr = GetEventNpc(NPC_INFINITE_AGENT))
{
cr->SetImmuneToAll(false);
cr->SetReactState(REACT_AGGRESSIVE);
cr->SetInCombatWithZone();
cr->AddThreat(me, 0.0f);
}
if (Creature* cr = GetEventNpc(NPC_INFINITE_HUNTER)) // it is infinite hunter now :)
if (Creature* cr = GetEventNpc(NPC_INFINITE_HUNTER))
{
cr->SetImmuneToAll(false);
cr->SetReactState(REACT_AGGRESSIVE);
@@ -29,7 +29,7 @@
class instance_culling_of_stratholme : public InstanceMapScript
{
public:
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", 595) { }
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", MAP_THE_CULLING_OF_STRATHOLME) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -81,7 +81,7 @@ struct boss_lieutenant_drake : public BossAI
context.Repeat(25s);
}).Schedule(1s, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 40.0f))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, false, false))
{
DoCast(target, SPELL_EXPLODING_SHOT);
}
@@ -41,7 +41,7 @@ const Position thrallPositions[THRALL_POSITIONS_COUNT] =
class instance_old_hillsbrad : public InstanceMapScript
{
public:
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", 560) { }
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", MAP_THE_ESCAPE_FROM_DURNHOLDE) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -38,7 +38,7 @@ ObjectData const creatureData[] =
class instance_the_black_morass : public InstanceMapScript
{
public:
instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", 269) { }
instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", MAP_OPENING_OF_THE_DARK_PORTAL) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -23,7 +23,7 @@
class instance_dire_maul : public InstanceMapScript
{
public:
instance_dire_maul() : InstanceMapScript(DMScriptName, 429) { }
instance_dire_maul() : InstanceMapScript(DMScriptName, MAP_DIRE_MAUL) { }
struct instance_dire_maul_InstanceMapScript : public InstanceScript
{
@@ -22,7 +22,7 @@
class instance_maraudon : public InstanceMapScript
{
public:
instance_maraudon() : InstanceMapScript("instance_maraudon", 349) { }
instance_maraudon() : InstanceMapScript("instance_maraudon", MAP_MARAUDON) { }
struct instance_maraudon_InstanceMapScript : public InstanceScript
{
@@ -28,7 +28,7 @@ ObjectData const creatureData[] =
class instance_onyxias_lair : public InstanceMapScript
{
public:
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", 249) { }
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", MAP_ONYXIAS_LAIR) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -21,7 +21,7 @@
class instance_ragefire_chasm : public InstanceMapScript
{
public:
instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", 389) { }
instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", MAP_RAGEFIRE_CHASM) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -23,7 +23,7 @@
class instance_razorfen_downs : public InstanceMapScript
{
public:
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", 129) { }
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", MAP_RAZORFEN_DOWNS) { }
struct instance_razorfen_downs_InstanceMapScript : public InstanceScript
{
@@ -21,7 +21,7 @@
class instance_razorfen_kraul : public InstanceMapScript
{
public:
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", 47) { }
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", MAP_RAZORFEN_KRAUL) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -57,7 +57,7 @@ struct boss_kurinnaxx : public BossAI
context.Repeat(8s, 10s);
}).Schedule(5s, 15s, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.f, true, false))
{
target->CastSpell(target, SPELL_SAND_TRAP, true, nullptr, nullptr, me->GetGUID());
}
@@ -67,7 +67,7 @@ std::array<uint32, 8> RajaxxWavesData[] =
class instance_ruins_of_ahnqiraj : public InstanceMapScript
{
public:
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) { }
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", MAP_RUINS_OF_AHN_QIRAJ) { }
struct instance_ruins_of_ahnqiraj_InstanceMapScript : public InstanceScript
{
@@ -50,16 +50,10 @@ struct npc_hivezara_stinger : public ScriptedAI
scheduler.Schedule(5s, [this](TaskContext context)
{
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u)
{
return u && !u->IsPet() && u->IsWithinDist2d(me, 20.f) && u->HasAura(SPELL_HIVEZARA_CATALYST);
});
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true, false, SPELL_HIVEZARA_CATALYST);
if (!target)
{
target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u)
{
return u && !u->IsPet() && u->IsWithinDist2d(me, 20.f);
});
target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true, false);
}
if (target)
@@ -98,7 +98,7 @@ struct boss_fankriss : public BossAI
})
.Schedule(15s, 20s, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
{
uint32 spellId = Acore::Containers::SelectRandomContainerElement(entangleSpells);
DoCast(target, spellId);
@@ -115,7 +115,7 @@ struct boss_sartura : public BossAI
switch (eventId)
{
case EVENT_SARTURA_WHIRLWIND:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
{
me->GetThreatMgr().ResetAllThreat();
me->AddThreat(target, 1000.0f);
@@ -199,7 +199,7 @@ struct npc_sartura_royal_guard : public ScriptedAI
switch (eventid)
{
case EVENT_GUARD_WHIRLWIND:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
{
me->GetThreatMgr().ResetAllThreat();
me->AddThreat(target, 1000.0f);
@@ -50,7 +50,7 @@ DoorData const doorData[] =
class instance_temple_of_ahnqiraj : public InstanceMapScript
{
public:
instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", MAP_AHN_QIRAJ_TEMPLE) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -98,7 +98,7 @@ struct npc_anubisath_defender : public ScriptedAI
{
scheduler.Schedule(6s, 10s, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1))
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 0.0f, false, false))
DoCast(target, SPELL_PLAGUE, true);
context.Repeat(6s, 10s);
});
@@ -22,7 +22,7 @@
class instance_wailing_caverns : public InstanceMapScript
{
public:
instance_wailing_caverns() : InstanceMapScript("instance_wailing_caverns", 43) { }
instance_wailing_caverns() : InstanceMapScript("instance_wailing_caverns", MAP_WAILING_CAVERNS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -106,7 +106,7 @@ static PyramidEventData pyramidSpawns[pyramidSpawnTotal] =
class instance_zulfarrak : public InstanceMapScript
{
public:
instance_zulfarrak() : InstanceMapScript(ZFScriptName, 209) {}
instance_zulfarrak() : InstanceMapScript(ZFScriptName, MAP_ZUL_FARRAK) {}
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -27,6 +27,7 @@ npc_shenthul
npc_thrall_warchief
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -148,11 +149,6 @@ enum ThrallWarchief : uint32
SAY_THRALL_ON_QUEST_REWARD_0 = 0,
SAY_THRALL_ON_QUEST_REWARD_1 = 1,
AREA_ORGRIMMAR = 1637,
AREA_RAZOR_HILL = 362,
AREA_CAMP_TAURAJO = 378,
AREA_CROSSROADS = 380,
GO_UNADORNED_SPIKE = 175787,
// What the Wind Carries (ID: 6566)
@@ -279,7 +275,7 @@ public:
{
if (player->IsAlive() && !player->IsGameMaster())
{
if (player->GetAreaId() == AREA_CROSSROADS)
if (player->GetAreaId() == AREA_THE_CROSSROADS)
{
player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true);
}
@@ -31,6 +31,7 @@ npc_twiggy_flathead
npc_wizzlecrank_shredder
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -52,8 +53,7 @@ enum Gilthares
SAY_GIL_SWEET = 6,
SAY_GIL_FREED = 7,
QUEST_FREE_FROM_HOLD = 898,
AREA_MERCHANT_COAST = 391
QUEST_FREE_FROM_HOLD = 898
};
class npc_gilthares : public CreatureScript
@@ -124,7 +124,7 @@ public:
return;
//only aggro text if not player and only in this area
if (!who->IsPlayer() && me->GetAreaId() == AREA_MERCHANT_COAST)
if (!who->IsPlayer() && me->GetAreaId() == AREA_THE_MERCHANT_COAST)
{
//appears to be pretty much random (possible only if escorter not in combat with who yet?)
Talk(SAY_GIL_AGGRO, who);
@@ -49,7 +49,7 @@ BossBoundaryData const boundaries =
class instance_azjol_nerub : public InstanceMapScript
{
public:
instance_azjol_nerub() : InstanceMapScript("instance_azjol_nerub", 601) { }
instance_azjol_nerub() : InstanceMapScript("instance_azjol_nerub", MAP_AZJOL_NERUB) { }
struct instance_azjol_nerub_InstanceScript : public InstanceScript
{
@@ -41,7 +41,7 @@ DoorData const doorData[] =
class instance_ahnkahet : public InstanceMapScript
{
public:
instance_ahnkahet() : InstanceMapScript(AhnKahetScriptName, 619) { }
instance_ahnkahet() : InstanceMapScript(AhnKahetScriptName, MAP_AHN_KAHET_THE_OLD_KINGDOM) { }
struct instance_ahnkahet_InstanceScript : public InstanceScript
{
@@ -852,7 +852,7 @@ struct boss_sartharion_dragonAI : public BossAI
if (isCalledBySartharion)
{
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 500, true))
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 500, true, false))
{
AttackStart(target);
}
@@ -30,7 +30,7 @@ BossBoundaryData const boundaries =
class instance_obsidian_sanctum : public InstanceMapScript
{
public:
instance_obsidian_sanctum() : InstanceMapScript("instance_obsidian_sanctum", 615) { }
instance_obsidian_sanctum() : InstanceMapScript("instance_obsidian_sanctum", MAP_THE_OBSIDIAN_SANCTUM) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "GameObjectAI.h"
#include "MapMgr.h"
@@ -187,7 +188,7 @@ public:
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
{
InstanceScript* instance = _owner->GetInstanceScript();
if (!instance || _owner->GetMapId() != 724)
if (!instance || _owner->GetMapId() != MAP_THE_RUBY_SANCTUM)
return true;
if (instance->GetBossState(DATA_HALION) != IN_PROGRESS)
@@ -396,7 +397,7 @@ public:
events.ScheduleEvent(EVENT_METEOR_STRIKE, 40s);
break;
case EVENT_FIERY_COMBUSTION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true, true, -SPELL_TWILIGHT_REALM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false, -SPELL_TWILIGHT_REALM))
me->CastSpell(target, SPELL_FIERY_COMBUSTION, false);
events.ScheduleEvent(EVENT_FIERY_COMBUSTION, 25s);
break;
@@ -539,7 +540,7 @@ public:
_events.ScheduleEvent(EVENT_BREATH, 10s, 12s);
break;
case EVENT_SOUL_CONSUMPTION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true, true, SPELL_TWILIGHT_REALM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false, SPELL_TWILIGHT_REALM))
me->CastSpell(target, SPELL_SOUL_CONSUMPTION, false);
_events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, 20s);
break;
@@ -950,7 +951,7 @@ public:
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
return;
if (!GetTarget()->GetInstanceScript() || !GetTarget()->GetInstanceScript()->IsEncounterInProgress() || GetTarget()->GetMapId() != 724)
if (!GetTarget()->GetInstanceScript() || !GetTarget()->GetInstanceScript()->IsEncounterInProgress() || GetTarget()->GetMapId() != MAP_THE_RUBY_SANCTUM)
return;
GetTarget()->CastCustomSpell(_summonSpellId, SPELLVALUE_BASE_POINT1, GetAura()->GetStackAmount(), GetTarget(), TRIGGERED_FULL_MASK, nullptr, nullptr, GetCasterGUID());
@@ -49,7 +49,7 @@ DoorData const doorData[] =
class instance_ruby_sanctum : public InstanceMapScript
{
public:
instance_ruby_sanctum() : InstanceMapScript("instance_ruby_sanctum", 724) { }
instance_ruby_sanctum() : InstanceMapScript("instance_ruby_sanctum", MAP_THE_RUBY_SANCTUM) { }
struct instance_ruby_sanctum_InstanceMapScript : public InstanceScript
{
@@ -41,7 +41,7 @@ class Group;
class instance_trial_of_the_champion : public InstanceMapScript
{
public:
instance_trial_of_the_champion() : InstanceMapScript("instance_trial_of_the_champion", 650) { }
instance_trial_of_the_champion() : InstanceMapScript("instance_trial_of_the_champion", MAP_TRIAL_OF_THE_CHAMPION) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -28,7 +28,7 @@ std::map<uint32, bool> validDedicatedInsanityItems;
class instance_trial_of_the_crusader : public InstanceMapScript
{
public:
instance_trial_of_the_crusader() : InstanceMapScript("instance_trial_of_the_crusader", 649) { }
instance_trial_of_the_crusader() : InstanceMapScript("instance_trial_of_the_crusader", MAP_TRIAL_OF_THE_CRUSADER) { }
struct instance_trial_of_the_crusader_InstanceMapScript : public InstanceScript
{
@@ -34,7 +34,7 @@ DoorData const doorData[] =
class instance_drak_tharon_keep : public InstanceMapScript
{
public:
instance_drak_tharon_keep() : InstanceMapScript("instance_drak_tharon_keep", 600) { }
instance_drak_tharon_keep() : InstanceMapScript("instance_drak_tharon_keep", MAP_DRAK_THARON_KEEP) { }
struct instance_drak_tharon_keep_InstanceScript : public InstanceScript
{
@@ -30,7 +30,7 @@ BossBoundaryData const boundaries =
class instance_forge_of_souls : public InstanceMapScript
{
public:
instance_forge_of_souls() : InstanceMapScript("instance_forge_of_souls", 632) { }
instance_forge_of_souls() : InstanceMapScript("instance_forge_of_souls", MAP_THE_FORGE_OF_SOULS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -130,7 +130,7 @@ private:
class instance_halls_of_reflection : public InstanceMapScript
{
public:
instance_halls_of_reflection() : InstanceMapScript("instance_halls_of_reflection", 668) { }
instance_halls_of_reflection() : InstanceMapScript("instance_halls_of_reflection", MAP_HALLS_OF_REFLECTION) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -25,7 +25,7 @@
class instance_pit_of_saron : public InstanceMapScript
{
public:
instance_pit_of_saron() : InstanceMapScript("instance_pit_of_saron", 658) { }
instance_pit_of_saron() : InstanceMapScript("instance_pit_of_saron", MAP_PIT_OF_SARON) { }
struct instance_pit_of_saron_InstanceScript : public InstanceScript
{
@@ -123,7 +123,7 @@ public:
events.ScheduleEvent(EVENT_ECK_SPIT, 10s);
break;
case EVENT_ECK_SPRING:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 30.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true, false))
{
me->GetThreatMgr().ResetAllThreat();
me->AddThreat(target, 500.0f);
@@ -207,7 +207,7 @@ public:
return;
}
events.ScheduleEvent(EVENT_IMPALING_CHARGE, 21s);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
{
me->CastSpell(target, SPELL_IMPALING_CHARGE, false);
impaledList.insert(target->GetGUID());
@@ -32,7 +32,7 @@ DoorData const doorData[] =
class instance_gundrak : public InstanceMapScript
{
public:
instance_gundrak() : InstanceMapScript("instance_gundrak", 604) { }
instance_gundrak() : InstanceMapScript("instance_gundrak", MAP_GUNDRAK) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -16,6 +16,7 @@
*/
#include "AchievementCriteriaScript.h"
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "GridNotifiers.h"
#include "ObjectMgr.h"
@@ -798,7 +799,7 @@ class spell_blood_queen_vampiric_bite : public SpellScript
SpellCastResult CheckTarget()
{
if (GetExplTargetUnit()->GetMapId() != 631)
if (GetExplTargetUnit()->GetMapId() != MAP_ICECROWN_CITADEL)
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
if (IsVampire(GetExplTargetUnit()))
{
@@ -819,7 +820,7 @@ class spell_blood_queen_vampiric_bite : public SpellScript
return;
}
if (!GetCaster()->IsPlayer() || GetCaster()->GetMapId() != 631)
if (!GetCaster()->IsPlayer() || GetCaster()->GetMapId() != MAP_ICECROWN_CITADEL)
return;
InstanceScript* instance = GetCaster()->GetInstanceScript();
if (!instance || instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) != IN_PROGRESS)
@@ -358,7 +358,7 @@ public:
void JustSummoned(Creature* summon) override
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
summon->AI()->AttackStart(target);
//if (IsHeroic())
@@ -468,7 +468,7 @@ public:
switch (action)
{
case ACTION_MARK_OF_THE_FALLEN_CHAMPION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, true, -SPELL_MARK_OF_THE_FALLEN_CHAMPION))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_MARK_OF_THE_FALLEN_CHAMPION))
{
++_fallenChampionCastCount;
me->CastSpell(target, SPELL_MARK_OF_THE_FALLEN_CHAMPION, false);
@@ -16,6 +16,7 @@
*/
#include "AchievementCriteriaScript.h"
#include "AreaDefines.h"
#include "Config.h"
#include "CreatureScript.h"
#include "CreatureTextMgr.h"
@@ -857,7 +857,7 @@ public:
events.Repeat(9s, 13s);
break;
case EVENT_SPELL_ADHERENT_CURSE_OF_TORPOR:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
me->CastSpell(target, SPELL_CURSE_OF_TORPOR, false);
events.Repeat(9s, 13s);
break;
@@ -482,7 +482,7 @@ class spell_marrowgar_coldflame : public SpellScript
void SelectTarget(std::list<WorldObject*>& targets)
{
targets.clear();
Unit* target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 1, -1.0f, true,true, -SPELL_IMPALED); // -1.0f as it takes into account object size
Unit* target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, -1.0f, true, false, -SPELL_IMPALED); // -1.0f as it takes into account object size
if (!target)
target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true); // if only tank or noone outside of boss' model
if (!target)
@@ -209,7 +209,7 @@ public:
bool operator()(Unit const* target) const
{
if (!me || !target || !target->IsPlayer())
if (!me || !target || !target->IsPlayer() || target == me->GetThreatMgr().GetCurrentVictim())
return false;
if (me->IsWithinCombatRange(target, 7.0f))
@@ -640,7 +640,7 @@ public:
}
else
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, MalleableGooSelector(me)))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, MalleableGooSelector(me)))
{
Talk(EMOTE_MALLEABLE_GOO);
me->CastSpell(target, SPELL_MALLEABLE_GOO, true);
@@ -16,6 +16,7 @@
*/
#include "AchievementCriteriaScript.h"
#include "AreaDefines.h"
#include "Cell.h"
#include "CellImpl.h"
#include "CreatureScript.h"
@@ -16,6 +16,7 @@
*/
#include "icecrown_citadel.h"
#include "AreaDefines.h"
#include "AreaTriggerScript.h"
#include "Cell.h"
#include "CellImpl.h"
@@ -627,7 +628,7 @@ public:
switch (eventId)
{
case EVENT_DEATH_PLAGUE:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, true, -SPELL_RECENTLY_INFECTED))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_RECENTLY_INFECTED))
{
Talk(EMOTE_DEATH_PLAGUE_WARNING, target);
DoCast(target, SPELL_DEATH_PLAGUE);
@@ -1161,7 +1162,7 @@ public:
Talk(SAY_SVALNA_AGGRO);
break;
case EVENT_IMPALING_SPEAR:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, true, -SPELL_IMPALING_SPEAR))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_IMPALING_SPEAR))
{
DoCast(me, SPELL_AETHER_SHIELD);
me->AddAura(70203, me);
@@ -1347,7 +1348,7 @@ public:
Events.ScheduleEvent(EVENT_ARNATH_SMITE, 4s, 7s);
break;
case EVENT_ARNATH_DOMINATE_MIND:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, true, -SPELL_DOMINATE_MIND))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false, -SPELL_DOMINATE_MIND))
DoCast(target, SPELL_DOMINATE_MIND);
Events.ScheduleEvent(EVENT_ARNATH_DOMINATE_MIND, 28s, 37s);
break;
@@ -1425,7 +1426,7 @@ public:
Events.ScheduleEvent(EVENT_BRANDON_JUDGEMENT_OF_COMMAND, 8s, 13s);
break;
case EVENT_BRANDON_HAMMER_OF_BETRAYAL:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
DoCast(target, SPELL_HAMMER_OF_BETRAYAL);
Events.ScheduleEvent(EVENT_BRANDON_HAMMER_OF_BETRAYAL, 45s, 60s);
break;
@@ -1552,12 +1553,12 @@ public:
Events.ScheduleEvent(EVENT_RUPERT_FEL_IRON_BOMB, 15s, 20s);
break;
case EVENT_RUPERT_MACHINE_GUN:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
DoCast(target, SPELL_MACHINE_GUN);
Events.ScheduleEvent(EVENT_RUPERT_MACHINE_GUN, 25s, 30s);
break;
case EVENT_RUPERT_ROCKET_LAUNCH:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
DoCast(target, SPELL_ROCKET_LAUNCH);
Events.ScheduleEvent(EVENT_RUPERT_ROCKET_LAUNCH, 10s, 15s);
break;
@@ -2397,7 +2398,7 @@ class spell_icc_yd_summon_undead : public SpellScript
void HandleDummyLaunch(SpellEffIndex /*effIndex*/)
{
if (Unit* c = GetCaster())
if (c->GetMapId() == 631)
if (c->GetMapId() == MAP_ICECROWN_CITADEL)
for (uint8 i = 0; i < 5; ++i)
c->CastSpell(c, 71302, true);
}
@@ -565,12 +565,6 @@ enum PutricideEventFlags
PUTRICIDE_EVENT_FLAG_TRAP_FINISHED = 8,
};
enum AreaIds
{
AREA_ICECROWN_CITADEL = 4812,
AREA_THE_FROZEN_THRONE = 4859,
};
enum ItemIds
{
ITEM_GOBLIN_ROCKET_PACK = 49278
@@ -16,6 +16,7 @@
*/
#include "AccountMgr.h"
#include "AreaDefines.h"
#include "CreatureTextMgr.h"
#include "Group.h"
#include "InstanceMapScript.h"
@@ -199,7 +200,7 @@ private:
class instance_icecrown_citadel : public InstanceMapScript
{
public:
instance_icecrown_citadel() : InstanceMapScript(ICCScriptName, 631) { }
instance_icecrown_citadel() : InstanceMapScript(ICCScriptName, MAP_ICECROWN_CITADEL) { }
struct instance_icecrown_citadel_InstanceMapScript : public InstanceScript
{
@@ -243,11 +244,11 @@ public:
void OnPlayerAreaUpdate(Player* player, uint32 /*oldArea*/, uint32 newArea) override
{
if (newArea == 4890 /*Putricide's Laboratory of Alchemical Horrors and Fun*/ ||
newArea == 4891 /*The Sanctum of Blood*/ ||
newArea == 4889 /*The Frost Queen's Lair*/ ||
newArea == 4859 /*The Frozen Throne*/ ||
newArea == 4910 /*Frostmourne*/)
if (newArea == AREA_PUTRICIDES_LABORATORY_OF_ALCHEMICAL_HORRORS_AND_FUN ||
newArea == AREA_THE_SANCTUM_OF_BLOOD ||
newArea == AREA_THE_FROST_QUEENS_LAIR ||
newArea == AREA_THE_FROZEN_THRONE ||
newArea == AREA_FROSTMOURNE)
{
player->SendInitWorldStates(player->GetZoneId(), player->GetAreaId());
}
@@ -161,7 +161,7 @@ public:
events.Repeat(20s);
break;
case EVENT_MUTATING_INJECTION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true, true, -SPELL_MUTATING_INJECTION))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false, -SPELL_MUTATING_INJECTION))
{
me->CastSpell(target, SPELL_MUTATING_INJECTION, false);
}
@@ -370,7 +370,7 @@ public:
events.Repeat(25s);
break;
case EVENT_FROST_BLAST:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, RAID_MODE(1, 0), 0, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true, RAID_MODE(false, true)))
{
me->CastSpell(target, SPELL_FROST_BLAST, false);
}
@@ -380,7 +380,7 @@ public:
case EVENT_CHAINS:
for (uint8 i = 0; i < 3; ++i)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 200, true, true, -SPELL_CHAINS_OF_KELTHUZAD))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 200, true, false, -SPELL_CHAINS_OF_KELTHUZAD))
{
me->CastSpell(target, SPELL_CHAINS_OF_KELTHUZAD, true);
}
@@ -61,7 +61,7 @@ static constexpr std::array<uint32, HorsemanCount> HorsemanDataGroup
static WorldLocation const SapphironTeleportPos
{
NaxxramasMapId, 3498.300049f, -5349.490234f, 144.968002f, 1.3698910f
MAP_NAXXRAMAS, 3498.300049f, -5349.490234f, 144.968002f, 1.3698910f
};
static DoorData const doorData[]
@@ -787,7 +787,7 @@ public:
void AddSC_instance_naxxramas()
{
RegisterInstanceScript(instance_naxxramas, NaxxramasMapId);
RegisterInstanceScript(instance_naxxramas, MAP_NAXXRAMAS);
RegisterNaxxramasCreatureAI(npc_mr_bigglesworth);
RegisterNaxxramasCreatureAI(npc_living_poison);
RegisterNaxxramasCreatureAI(npc_naxxramas_trigger);
@@ -305,7 +305,6 @@ enum NaxxramasMisc
SOUND_SCREAM = 8873
};
static constexpr uint32 NaxxramasMapId = 533;
static constexpr uint8 HeiganEruptSectionCount = 4;
static constexpr uint8 HorsemanCount = 4;
static constexpr uint8 AbominationKillCountReq = 18;
@@ -36,7 +36,7 @@ bool EoEDrakeEnterVehicleEvent::Execute(uint64 /*eventTime*/, uint32 /*updateTim
class instance_eye_of_eternity : public InstanceMapScript
{
public:
instance_eye_of_eternity() : InstanceMapScript("instance_eye_of_eternity", 616) { }
instance_eye_of_eternity() : InstanceMapScript("instance_eye_of_eternity", MAP_THE_EYE_OF_ETERNITY) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -33,7 +33,7 @@ DoorData const doorData[] =
class instance_nexus : public InstanceMapScript
{
public:
instance_nexus() : InstanceMapScript("instance_nexus", 576) { }
instance_nexus() : InstanceMapScript("instance_nexus", MAP_THE_NEXUS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
@@ -27,7 +27,7 @@
class instance_oculus : public InstanceMapScript
{
public:
instance_oculus() : InstanceMapScript("instance_oculus", 578) { }
instance_oculus() : InstanceMapScript("instance_oculus", MAP_THE_OCULUS) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -23,7 +23,7 @@
class instance_halls_of_lightning : public InstanceMapScript
{
public:
instance_halls_of_lightning() : InstanceMapScript("instance_halls_of_lightning", 602) { }
instance_halls_of_lightning() : InstanceMapScript("instance_halls_of_lightning", MAP_HALLS_OF_LIGHTNING) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -23,7 +23,7 @@
class instance_halls_of_stone : public InstanceMapScript
{
public:
instance_halls_of_stone() : InstanceMapScript("instance_halls_of_stone", 599) { }
instance_halls_of_stone() : InstanceMapScript("instance_halls_of_stone", MAP_HALLS_OF_STONE) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
@@ -16,6 +16,7 @@
*/
#include "AchievementCriteriaScript.h"
#include "AreaDefines.h"
#include "CellImpl.h"
#include "CombatAI.h"
#include "CreatureScript.h"
@@ -1575,11 +1576,6 @@ class spell_systems_shutdown_aura : public AuraScript
class FlameLeviathanPursuedTargetSelector
{
enum Area
{
AREA_FORMATION_GROUNDS = 4652,
};
public:
explicit FlameLeviathanPursuedTargetSelector() {};
@@ -17,6 +17,7 @@
#include "AccountMgr.h"
#include "AchievementCriteriaScript.h"
#include "AreaDefines.h"
#include "BanMgr.h"
#include "CreatureScript.h"
#include "GameObjectScript.h"
@@ -527,7 +528,7 @@ class spell_mark_of_the_faceless_periodic_aura : public AuraScript
{
if (Unit* caster = GetCaster())
if (Unit* target = GetTarget())
if (target->GetMapId() == 603)
if (target->GetMapId() == MAP_ULDUAR)
{
int32 dmg = 5000;
caster->CastCustomSpell(target, SPELL_MARK_OF_THE_FACELESS_EFFECT, 0, &dmg, 0, true);

Some files were not shown because too many files have changed in this diff Show More