mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/Mechanar): Implement Pathaleon's spawn (#15536)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
--
|
||||
UPDATE `creature_text` SET `Emote` = 33 WHERE `CreatureID` = 19220 AND `GroupID` = 6;
|
||||
UPDATE `smart_scripts` SET `action_param1` = 1 WHERE `id`=1003 AND `action_type` = 223 AND `entryorguid` IN (-138820, -138869, -138893, -138879);
|
||||
UPDATE `creature_template_addon` SET `emote` = 0 WHERE (`entry` = 19220);
|
||||
@@ -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