mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -105,7 +105,10 @@ public:
|
||||
Talk(SAY_ONDEATH);
|
||||
// If Archimonde has not yet been initialized, this won't trigger
|
||||
if (Creature* archi = instance->GetCreature(DATA_ARCHIMONDE))
|
||||
{
|
||||
archi->AI()->DoAction(ACTION_BECOME_ACTIVE_AND_CHANNEL);
|
||||
archi->AI()->Talk(SAY_ARCHIMONDE_INTRO, 25000ms);
|
||||
}
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
|
||||
@@ -614,7 +614,7 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
|
||||
{
|
||||
scheduler.Schedule(0s, [this](TaskContext context)
|
||||
{
|
||||
DoCastVictim(SPELL_GARGOYLE_STRIKE);
|
||||
DoCastVictim(SPELL_FROST_BREATH);
|
||||
context.Repeat(3500ms, 4s);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -178,6 +178,11 @@ enum HyjalPaths
|
||||
HORDE_BOSS_PATH = 178527
|
||||
};
|
||||
|
||||
enum BossActions
|
||||
{
|
||||
ACTION_BECOME_ACTIVE_AND_CHANNEL = 0
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetHyjalAI(T* obj)
|
||||
{
|
||||
|
||||
@@ -491,6 +491,7 @@ public:
|
||||
{
|
||||
// No overlapping!
|
||||
_scheduler.CancelGroup(CONTEXT_GROUP_WAVES);
|
||||
trash = 0; // Reset counter here to avoid resetting the counter from scheduled waves. Required because creatures killed for RP events counts towards the kill counter as well, confirmed in Retail.
|
||||
|
||||
_scheduler.Schedule(1ms, [this, startWaves, maxWaves, timerptr](TaskContext context)
|
||||
{
|
||||
@@ -498,7 +499,6 @@ public:
|
||||
if (_currentWave >= maxWaves)
|
||||
return;
|
||||
|
||||
trash = 0; // Overrun event trash can modify the counter, so we set it to 0 at the start of every wave. World Update is sent in the first spawn
|
||||
instance->SummonCreatureGroup(startWaves + _currentWave); // _currentWave should be 0 when this function is first called
|
||||
|
||||
// Check if it's time to summon Infernals
|
||||
|
||||
@@ -37,7 +37,8 @@ enum Yells
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_DEATH = 1,
|
||||
SAY_FAIL = 2
|
||||
SAY_FAIL = 2,
|
||||
SAY_THANKS = 0
|
||||
};
|
||||
|
||||
class boss_infinite_corruptor : public CreatureScript
|
||||
@@ -98,7 +99,7 @@ public:
|
||||
{
|
||||
cr->DespawnOrUnsummon(5000);
|
||||
cr->RemoveAllAuras();
|
||||
cr->Say("You have my thanks for saving my existence in this timeline. Now i must report back to my superiors. They must know immediately of what i just experienced.", LANG_UNIVERSAL);
|
||||
cr->AI()->Talk(SAY_THANKS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,13 +97,15 @@ enum Says
|
||||
|
||||
//Cityman
|
||||
SAY_PHASE202 = 0,
|
||||
SAY_PHASE204_1 = 0,
|
||||
|
||||
//Crazyman
|
||||
SAY_PHASE204 = 0,
|
||||
SAY_PHASE204 = 1,
|
||||
|
||||
//Drakonian
|
||||
SAY_PHASE302 = 0,
|
||||
SAY_PHASE305 = 1,
|
||||
SAY_PHASE305_1 = 39,
|
||||
};
|
||||
|
||||
enum NPCs
|
||||
@@ -559,7 +561,7 @@ public:
|
||||
case 11:
|
||||
if (Creature* cityman = GetEventNpc(NPC_CITY_MAN2))
|
||||
{
|
||||
cityman->Say("Oh no...", LANG_UNIVERSAL); // missing script_text
|
||||
cityman->AI()->Talk(SAY_PHASE204_1);
|
||||
me->CastSpell(cityman, SPELL_ARTHAS_CRUSADER_STRIKE, true);
|
||||
}
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
@@ -1019,7 +1021,7 @@ public:
|
||||
}
|
||||
|
||||
summons.DespawnAll();
|
||||
me->Say("I can't afford to spare you.", LANG_UNIVERSAL);
|
||||
Talk(SAY_PHASE305_1);
|
||||
me->SetFacingTo(0.0f);
|
||||
ScheduleNextEvent(currentEvent, 5000);
|
||||
break;
|
||||
|
||||
@@ -36,10 +36,9 @@ enum Yells
|
||||
EMOTE_VORTEX = 3,
|
||||
EMOTE_TWINK_PACT = 4,
|
||||
SAY_TWINK_PACT = 5,
|
||||
SAY_KILL_PLAYER_1 = 6,
|
||||
SAY_KILL_PLAYER = 6,
|
||||
SAY_BERSERK = 7,
|
||||
SAY_DEATH = 8,
|
||||
SAY_KILL_PLAYER_2 = 9,
|
||||
};
|
||||
|
||||
enum Equipment
|
||||
@@ -502,10 +501,9 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
{
|
||||
if( who->GetTypeId() == TYPEID_PLAYER )
|
||||
{
|
||||
int32 id = urand(0, 1) ? SAY_KILL_PLAYER_1 : SAY_KILL_PLAYER_2;
|
||||
Talk(id);
|
||||
Talk(SAY_KILL_PLAYER);
|
||||
if( Creature* twin = GetSister() )
|
||||
twin->AI()->Talk(id);
|
||||
twin->AI()->Talk(SAY_KILL_PLAYER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -884,8 +884,7 @@ public:
|
||||
{
|
||||
if( Creature* c = instance->GetCreature(NPC_JaraxxusGUID) )
|
||||
{
|
||||
c->Yell("Banished to the Nether!", LANG_UNIVERSAL);
|
||||
c->PlayDirectSound(16146, 0);
|
||||
c->AI()->Talk(SAY_STAGE_1_06_1);
|
||||
if( Creature* f = instance->GetCreature(NPC_FizzlebangGUID) )
|
||||
{
|
||||
c->CastSpell(f, 67888, true);
|
||||
|
||||
@@ -260,6 +260,7 @@ enum eTexts
|
||||
|
||||
// Lord Jaraxxus
|
||||
SAY_STAGE_1_05 = 0,
|
||||
SAY_STAGE_1_06_1 = 9,
|
||||
|
||||
// The Lich King
|
||||
SAY_STAGE_4_02 = 0,
|
||||
|
||||
@@ -66,7 +66,8 @@ enum Spells
|
||||
|
||||
enum Misc
|
||||
{
|
||||
GO_CAGE = 185474
|
||||
GO_CAGE = 185474,
|
||||
ACTION_RESET_ADDS = 1
|
||||
};
|
||||
|
||||
const Position olumWalk = { 456.17194f, -544.31866f, -7.5470476f, 0.00f };
|
||||
@@ -75,6 +76,17 @@ struct boss_fathomlord_karathress : public BossAI
|
||||
{
|
||||
boss_fathomlord_karathress(Creature* creature) : BossAI(creature, DATA_FATHOM_LORD_KARATHRESS){ }
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard)
|
||||
{
|
||||
if (!fathomguard->IsAlive())
|
||||
{
|
||||
fathomguard->Respawn(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
@@ -156,6 +168,18 @@ struct boss_fathomlord_karathress : public BossAI
|
||||
DoCastSelf(SPELL_ENRAGE, true);
|
||||
});
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action == ACTION_RESET_ADDS)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard)
|
||||
{
|
||||
fathomguard->DespawnOrUnsummon();
|
||||
});
|
||||
}
|
||||
}
|
||||
private:
|
||||
bool _recentlySpoken;
|
||||
};
|
||||
@@ -259,6 +283,15 @@ struct boss_fathomguard_sharkkis : public ScriptedAI
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS))
|
||||
{
|
||||
karathress->AI()->DoAction(ACTION_RESET_ADDS);
|
||||
}
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
SummonList _summons;
|
||||
@@ -434,6 +467,15 @@ struct boss_fathomguard_tidalvess : public ScriptedAI
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS))
|
||||
{
|
||||
karathress->AI()->DoAction(ACTION_RESET_ADDS);
|
||||
}
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
TaskScheduler _totemScheduler;
|
||||
@@ -518,6 +560,15 @@ struct boss_fathomguard_caribdis : public ScriptedAI
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS))
|
||||
{
|
||||
karathress->AI()->DoAction(ACTION_RESET_ADDS);
|
||||
}
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
InstanceScript* _instance;
|
||||
|
||||
@@ -95,10 +95,10 @@ struct boss_void_reaver : public BossAI
|
||||
context.Repeat(12100ms, 15800ms);
|
||||
}).Schedule(3450ms, GROUP_ARCANE_ORB, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, -18.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false);
|
||||
else if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false);
|
||||
if (!DoCastRandomTarget(SPELL_ARCANE_ORB, 0, -18.0f))
|
||||
{
|
||||
DoCastRandomTarget(SPELL_ARCANE_ORB, 0, 18.0f);
|
||||
}
|
||||
context.Repeat(2400ms, 6300ms);
|
||||
}).Schedule(14350ms, [this](TaskContext context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user