Compare commits
10 Commits
814128fb3f
...
6321e695be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6321e695be | ||
|
|
835283bf26 | ||
|
|
8f6d651471 | ||
|
|
f6c29614d5 | ||
|
|
96e7a20bd9 | ||
|
|
cd8761796f | ||
|
|
de6e4875c2 | ||
|
|
35e19265bb | ||
|
|
240463aa24 | ||
|
|
92c541f662 |
@ -234,7 +234,7 @@ def backtick_check(file: io, file_path: str) -> None:
|
|||||||
# Skip SQL keywords
|
# Skip SQL keywords
|
||||||
if word.upper() in {"SELECT", "FROM", "JOIN", "WHERE", "GROUP", "BY", "ORDER",
|
if word.upper() in {"SELECT", "FROM", "JOIN", "WHERE", "GROUP", "BY", "ORDER",
|
||||||
"DELETE", "UPDATE", "INSERT", "INTO", "SET", "VALUES", "AND",
|
"DELETE", "UPDATE", "INSERT", "INTO", "SET", "VALUES", "AND",
|
||||||
"IN", "OR", "REPLACE"}:
|
"IN", "OR", "REPLACE", "NOT"}:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Make sure the word is enclosed in backticks
|
# Make sure the word is enclosed in backticks
|
||||||
|
|||||||
3
data/sql/updates/db_world/2025_02_24_00.sql
Normal file
3
data/sql/updates/db_world/2025_02_24_00.sql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_02_22_00 -> 2025_02_24_00
|
||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|512|2147483648 WHERE `entry` = 25038;
|
||||||
@ -633,6 +633,7 @@ void BossAI::_Reset()
|
|||||||
me->ResetLootMode();
|
me->ResetLootMode();
|
||||||
events.Reset();
|
events.Reset();
|
||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
|
me->m_Events.KillAllEvents(false);
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
ClearUniqueTimedEventsDone();
|
ClearUniqueTimedEventsDone();
|
||||||
_healthCheckEvents.clear();
|
_healthCheckEvents.clear();
|
||||||
@ -787,6 +788,20 @@ void BossAI::ScheduleHealthCheckEvent(std::initializer_list<uint8> healthPct, st
|
|||||||
_nextHealthCheck = _healthCheckEvents.front();
|
_nextHealthCheck = _healthCheckEvents.front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BossAI::ScheduleEnrageTimer(uint32 spellId, Milliseconds timer, uint8 textId /*= 0*/)
|
||||||
|
{
|
||||||
|
me->m_Events.AddEventAtOffset([this, spellId, textId]
|
||||||
|
{
|
||||||
|
if (!me->IsAlive())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (textId)
|
||||||
|
Talk(textId);
|
||||||
|
|
||||||
|
DoCastSelf(spellId, true);
|
||||||
|
}, timer);
|
||||||
|
}
|
||||||
|
|
||||||
// WorldBossAI - for non-instanced bosses
|
// WorldBossAI - for non-instanced bosses
|
||||||
|
|
||||||
WorldBossAI::WorldBossAI(Creature* creature) :
|
WorldBossAI::WorldBossAI(Creature* creature) :
|
||||||
|
|||||||
@ -485,6 +485,12 @@ public:
|
|||||||
void ScheduleHealthCheckEvent(uint32 healthPct, std::function<void()> exec);
|
void ScheduleHealthCheckEvent(uint32 healthPct, std::function<void()> exec);
|
||||||
void ScheduleHealthCheckEvent(std::initializer_list<uint8> healthPct, std::function<void()> exec);
|
void ScheduleHealthCheckEvent(std::initializer_list<uint8> healthPct, std::function<void()> exec);
|
||||||
|
|
||||||
|
// @brief Casts the spell after the fixed time and says the text id if provided. Timer will run even if the creature is casting or out of combat.
|
||||||
|
// @param spellId The spell to cast.
|
||||||
|
// @param timer The time to wait before casting the spell.
|
||||||
|
// @param textId The text id to say.
|
||||||
|
void ScheduleEnrageTimer(uint32 spellId, Milliseconds timer, uint8 textId = 0);
|
||||||
|
|
||||||
// Hook used to execute events scheduled into EventMap without the need
|
// Hook used to execute events scheduled into EventMap without the need
|
||||||
// to override UpdateAI
|
// to override UpdateAI
|
||||||
// note: You must re-schedule the event within this method if the event
|
// note: You must re-schedule the event within this method if the event
|
||||||
|
|||||||
@ -83,7 +83,6 @@ struct boss_sacrolash : public BossAI
|
|||||||
_isSisterDead = false;
|
_isSisterDead = false;
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
me->SetLootMode(0);
|
me->SetLootMode(0);
|
||||||
me->m_Events.KillAllEvents(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void DoAction(int32 param) override
|
||||||
@ -124,10 +123,7 @@ struct boss_sacrolash : public BossAI
|
|||||||
if (alythess->IsAlive() && !alythess->IsInCombat())
|
if (alythess->IsAlive() && !alythess->IsInCombat())
|
||||||
alythess->AI()->AttackStart(who);
|
alythess->AI()->AttackStart(who);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
ScheduleEnrageTimer(SPELL_ENRAGE, 6min, YELL_BERSERK);
|
||||||
Talk(YELL_BERSERK);
|
|
||||||
DoCastSelf(SPELL_ENRAGE, true);
|
|
||||||
}, 6min);
|
|
||||||
|
|
||||||
ScheduleTimedEvent(10s, [&] {
|
ScheduleTimedEvent(10s, [&] {
|
||||||
DoCastSelf(SPELL_SHADOW_BLADES);
|
DoCastSelf(SPELL_SHADOW_BLADES);
|
||||||
@ -195,7 +191,6 @@ struct boss_alythess : public BossAI
|
|||||||
_isSisterDead = false;
|
_isSisterDead = false;
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
me->SetLootMode(0);
|
me->SetLootMode(0);
|
||||||
me->m_Events.KillAllEvents(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void DoAction(int32 param) override
|
||||||
@ -236,10 +231,7 @@ struct boss_alythess : public BossAI
|
|||||||
if (sacrolash->IsAlive() && !sacrolash->IsInCombat())
|
if (sacrolash->IsAlive() && !sacrolash->IsInCombat())
|
||||||
sacrolash->AI()->AttackStart(who);
|
sacrolash->AI()->AttackStart(who);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
ScheduleEnrageTimer(SPELL_ENRAGE, 6min, YELL_BERSERK);
|
||||||
Talk(YELL_BERSERK);
|
|
||||||
DoCastSelf(SPELL_ENRAGE, true);
|
|
||||||
}, 6min);
|
|
||||||
|
|
||||||
ScheduleTimedEvent(1s, [&] {
|
ScheduleTimedEvent(1s, [&] {
|
||||||
DoCastVictim(SPELL_BLAZE);
|
DoCastVictim(SPELL_BLAZE);
|
||||||
|
|||||||
@ -134,7 +134,7 @@ struct boss_felmyst : public BossAI
|
|||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
{
|
{
|
||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
me->CastSpell(me, SPELL_NOXIOUS_FUMES, true);
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
Talk(YELL_BERSERK);
|
Talk(YELL_BERSERK);
|
||||||
DoCastSelf(SPELL_BERSERK, true);
|
DoCastSelf(SPELL_BERSERK, true);
|
||||||
@ -144,7 +144,7 @@ struct boss_felmyst : public BossAI
|
|||||||
|
|
||||||
Position landPos = who->GetPosition();
|
Position landPos = who->GetPosition();
|
||||||
me->m_Events.AddEventAtOffset([&, landPos] {
|
me->m_Events.AddEventAtOffset([&, landPos] {
|
||||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, landPos, false, true);
|
me->GetMotionMaster()->MoveLand(POINT_GROUND, landPos);
|
||||||
}, 2s);
|
}, 2s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,11 +168,14 @@ struct boss_felmyst : public BossAI
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 point) override
|
void MovementInform(uint32 type, uint32 point) override
|
||||||
{
|
{
|
||||||
if (type != POINT_MOTION_TYPE)
|
if (type != EFFECT_MOTION_TYPE && type != POINT_MOTION_TYPE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (point == POINT_GROUND)
|
if (point == POINT_GROUND)
|
||||||
{
|
{
|
||||||
|
if (!me->HasAura(SPELL_NOXIOUS_FUMES))
|
||||||
|
DoCastSelf(SPELL_NOXIOUS_FUMES, true);
|
||||||
|
|
||||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||||
me->SetCanFly(false);
|
me->SetCanFly(false);
|
||||||
me->SetDisableGravity(false);
|
me->SetDisableGravity(false);
|
||||||
|
|||||||
@ -486,6 +486,7 @@ enum BerylSorcerer
|
|||||||
NPC_LIBRARIAN_DONATHAN = 25262,
|
NPC_LIBRARIAN_DONATHAN = 25262,
|
||||||
NPC_CAPTURED_BERLY_SORCERER = 25474,
|
NPC_CAPTURED_BERLY_SORCERER = 25474,
|
||||||
SPELL_FROSTBOLT = 9672,
|
SPELL_FROSTBOLT = 9672,
|
||||||
|
SPELL_BLINK = 50648,
|
||||||
SPELL_ARCANE_CHAINS = 45611,
|
SPELL_ARCANE_CHAINS = 45611,
|
||||||
SPELL_ARCANE_CHAINS_CHARACTER_FORCE_CAST = 45625,
|
SPELL_ARCANE_CHAINS_CHARACTER_FORCE_CAST = 45625,
|
||||||
SPELL_ARCANE_CHAINS_SUMMON_CHAINED_MAGE_HUNTER = 45626,
|
SPELL_ARCANE_CHAINS_SUMMON_CHAINED_MAGE_HUNTER = 45626,
|
||||||
@ -509,6 +510,7 @@ struct npc_beryl_sorcererAI : public CreatureAI
|
|||||||
{
|
{
|
||||||
_playerGUID.Clear();
|
_playerGUID.Clear();
|
||||||
_chainsCast = false;
|
_chainsCast = false;
|
||||||
|
_blinkUsed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
@ -547,6 +549,18 @@ struct npc_beryl_sorcererAI : public CreatureAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (me->GetHealthPct() < 70.0f && !_blinkUsed)
|
||||||
|
{
|
||||||
|
if (Unit* victim = me->GetVictim())
|
||||||
|
{
|
||||||
|
if (me->IsWithinMeleeRange(victim) && urand(0, 99) < 20)
|
||||||
|
{
|
||||||
|
me->CastSpell(me, SPELL_BLINK, true);
|
||||||
|
}
|
||||||
|
_blinkUsed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_events.Update(diff);
|
_events.Update(diff);
|
||||||
|
|
||||||
if (uint32 eventId = _events.ExecuteEvent())
|
if (uint32 eventId = _events.ExecuteEvent())
|
||||||
@ -577,6 +591,7 @@ struct npc_beryl_sorcererAI : public CreatureAI
|
|||||||
EventMap _events;
|
EventMap _events;
|
||||||
ObjectGuid _playerGUID;
|
ObjectGuid _playerGUID;
|
||||||
bool _chainsCast;
|
bool _chainsCast;
|
||||||
|
bool _blinkUsed;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user