mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 22:56:24 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -29,6 +29,7 @@ enum eTexts
|
||||
SAY_SUMMON_SKELETONS = 2,
|
||||
SAY_FROST_TOMB_EMOTE = 4,
|
||||
SAY_DEATH = 5,
|
||||
SAY_KILL = 6,
|
||||
};
|
||||
|
||||
enum eNPCs
|
||||
@@ -140,14 +141,13 @@ public:
|
||||
pInstance->SetData(DATA_KELESETH, NOT_STARTED);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) override {}
|
||||
|
||||
/*void KilledUnit(Unit * victim)
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim == me)
|
||||
return;
|
||||
DoScriptText(SAY_KILL, me);
|
||||
}*/
|
||||
if (victim->IsPlayer())
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@ struct npc_raging_flames : public ScriptedAI
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
if (Creature* summoner = summon->GetSummonerCreatureBase())
|
||||
if (summoner->IsAIEnabled)
|
||||
if (Unit* target = summoner->AI()->SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true, false))
|
||||
if (Unit* target = summoner->AI()->SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
|
||||
me->AddThreat(target, 1000000.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,12 +37,19 @@ enum Spells
|
||||
SPELL_ARCANE_TORRENT = 36022,
|
||||
SPELL_MANA_TAP = 36021,
|
||||
SPELL_DOMINATION = 35280,
|
||||
SPELL_ETHEREAL_TELEPORT = 34427,
|
||||
SPELL_GREATER_INVISIBILITY = 34426,
|
||||
SPELL_SUMMON_NETHER_WRAITH_1 = 35285,
|
||||
SPELL_SUMMON_NETHER_WRAITH_2 = 35286,
|
||||
SPELL_SUMMON_NETHER_WRAITH_3 = 35287,
|
||||
SPELL_SUMMON_NETHER_WRAITH_4 = 35288,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
ACTION_BRIDGE_MOB_DEATH = 1, // Used by SAI
|
||||
};
|
||||
|
||||
struct boss_pathaleon_the_calculator : public BossAI
|
||||
{
|
||||
boss_pathaleon_the_calculator(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR)
|
||||
@@ -53,6 +60,21 @@ struct boss_pathaleon_the_calculator : public BossAI
|
||||
});
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
|
||||
if (instance->GetPersistentData(DATA_BRIDGE_MOB_DEATH_COUNT) < 4)
|
||||
{
|
||||
DoCastSelf(SPELL_GREATER_INVISIBILITY);
|
||||
}
|
||||
}
|
||||
|
||||
bool CanAIAttack(Unit const* /*target*/) const override
|
||||
{
|
||||
return instance->GetPersistentData(DATA_BRIDGE_MOB_DEATH_COUNT) >= 4;
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
_JustEngagedWith();
|
||||
@@ -86,18 +108,48 @@ struct boss_pathaleon_the_calculator : public BossAI
|
||||
context.Repeat(15s);
|
||||
}).Schedule(25s, [this](TaskContext context)
|
||||
{
|
||||
Talk(SAY_DOMINATION);
|
||||
DoCastRandomTarget(SPELL_DOMINATION, 1, 50.0f);
|
||||
if (DoCastRandomTarget(SPELL_DOMINATION, 1, 50.0f) == SPELL_CAST_OK)
|
||||
{
|
||||
Talk(SAY_DOMINATION);
|
||||
}
|
||||
context.Repeat(30s);
|
||||
}).Schedule(8s, [this](TaskContext context)
|
||||
{
|
||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
||||
context.Repeat(12s);
|
||||
});
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
scheduler.Schedule(8s, [this](TaskContext context)
|
||||
{
|
||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
||||
context.Repeat(12s);
|
||||
});
|
||||
}
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_BRIDGE_MOB_DEATH)
|
||||
{
|
||||
uint8 mobCount = instance->GetPersistentData(DATA_BRIDGE_MOB_DEATH_COUNT);
|
||||
instance->StorePersistentData(DATA_BRIDGE_MOB_DEATH_COUNT, ++mobCount);
|
||||
|
||||
if (mobCount >= 4)
|
||||
{
|
||||
DoCastSelf(SPELL_ETHEREAL_TELEPORT);
|
||||
Talk(SAY_APPEAR);
|
||||
|
||||
scheduler.Schedule(2s, [this](TaskContext)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
|
||||
}).Schedule(25s, [this](TaskContext)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->IsPlayer())
|
||||
|
||||
@@ -63,6 +63,7 @@ enum SpellIds
|
||||
|
||||
enum DataIndex
|
||||
{
|
||||
DATA_BRIDGE_MOB_DEATH_COUNT,
|
||||
MAX_DATA_INDEXES
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user