mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-12 03:55:07 +00:00
fix(Core/Spells): Implement TrinityCore spell_group and spell_group_stack_rules (#23346)
Co-authored-by: treeston <treeston.mmoc@gmail.com> Co-authored-by: Trisjdc <trisjdc@gmail.com> Co-authored-by: QAston <none@none> Co-authored-by: ariel- <ariel-@users.noreply.github.com> Co-authored-by: Shauren <shauren.trinity@gmail.com> Co-authored-by: Jelle Meeus <sogladev@gmail.com>
This commit is contained in:
@@ -78,6 +78,10 @@ Position const PosMoveOnSpawn[1] =
|
||||
{ -11561.9f, -1627.868f, 41.29941f, 0.0f }
|
||||
};
|
||||
|
||||
// hack
|
||||
float const DamageIncrease = 35.0f;
|
||||
float const DamageDecrease = 100.f / (1.f + DamageIncrease / 100.f) - 100.f;
|
||||
|
||||
class boss_arlokk : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -90,7 +94,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
if (events.IsInPhase(PHASE_TWO))
|
||||
me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack
|
||||
me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease); // hack
|
||||
_Reset();
|
||||
_summonCountA = 0;
|
||||
_summonCountB = 0;
|
||||
@@ -253,7 +257,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_RAVAGE, 10s, 14s, 0, PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_TRANSFORM_BACK, 30s, 40s, 0, PHASE_TWO);
|
||||
events.SetPhase(PHASE_TWO);
|
||||
me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, true); // hack
|
||||
me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageIncrease); // hack
|
||||
break;
|
||||
case EVENT_RAVAGE:
|
||||
DoCastVictim(SPELL_RAVAGE, true);
|
||||
@@ -265,7 +269,7 @@ public:
|
||||
DoCast(me, SPELL_VANISH_VISUAL);
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_DAGGER));
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(WEAPON_DAGGER));
|
||||
me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack
|
||||
me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease); // hack
|
||||
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 4s, 7s, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_GOUGE, 12s, 15s, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_TRANSFORM, 30s, 0, PHASE_ONE);
|
||||
|
||||
@@ -73,6 +73,10 @@ enum Misc
|
||||
GO_SPIDER_EGGS = 179985,
|
||||
};
|
||||
|
||||
// hack
|
||||
float const DamageIncrease = 35.0f;
|
||||
float const DamageDecrease = 100.f / (1.f + DamageIncrease / 100.f) - 100.f;
|
||||
|
||||
// High Priestess Mar'li (14510)
|
||||
struct boss_marli : public BossAI
|
||||
{
|
||||
@@ -84,7 +88,7 @@ public:
|
||||
if (_phase == PHASE_SPIDER)
|
||||
{
|
||||
me->RemoveAura(SPELL_SPIDER_FORM);
|
||||
me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false);
|
||||
me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease);
|
||||
_phase = PHASE_TROLL;
|
||||
}
|
||||
|
||||
@@ -143,7 +147,7 @@ private:
|
||||
me->RemoveAura(SPELL_SPIDER_FORM);
|
||||
DoCastSelf(SPELL_TRANSFORM_BACK, true);
|
||||
Talk(SAY_TRANSFORM_BACK);
|
||||
me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false);
|
||||
me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageDecrease);
|
||||
|
||||
scheduler.CancelGroup(PHASE_SPIDER);
|
||||
}
|
||||
@@ -186,7 +190,7 @@ private:
|
||||
|
||||
Talk(SAY_TRANSFORM);
|
||||
DoCastSelf(SPELL_SPIDER_FORM, true);
|
||||
me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, true);
|
||||
me->ApplyStatPctModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, DamageIncrease);
|
||||
|
||||
scheduler.Schedule(5s, PHASE_SPIDER, [this](TaskContext context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user