From 3d0f314c39a535fe1987e76da93e8d59699f4b1d Mon Sep 17 00:00:00 2001 From: Ben Carter Date: Fri, 18 Oct 2024 20:37:48 -0400 Subject: [PATCH] updated to add headless horseman --- src/MythicPlus.cpp | 10 +++++++--- src/UnitScript.cpp | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/MythicPlus.cpp b/src/MythicPlus.cpp index ff1a887..be8b283 100644 --- a/src/MythicPlus.cpp +++ b/src/MythicPlus.cpp @@ -118,6 +118,10 @@ bool MythicPlus::IsCreatureEligible(Creature* creature) return true; } + if (creature->GetEntry() == 23682) { + return true; + } + // Check if the creature is a pet or summon controlled by a player if ((creature->IsHunterPet() || creature->IsPet() || creature->IsSummon()) && creature->IsControlledByPlayer()) { return false; @@ -172,7 +176,7 @@ void MythicPlus::AddScaledCreature(Creature* creature, MpInstanceData* instanceD // allow small variance in level for non-boss creatures uint8 level = uint8(urand(instanceData->creature.avgLevel - 1, instanceData->creature.avgLevel + 1)); - if(creature->IsDungeonBoss()) { + if(creature->IsDungeonBoss() || creature->GetEntry() == 23682) { ScaleCreature(instanceData->boss.avgLevel, creature, &instanceData->boss, instanceData->difficulty); } else { ScaleCreature(level, creature, &instanceData->creature, instanceData->difficulty); @@ -271,7 +275,7 @@ void MythicPlus::ScaleCreature(uint8 level, Creature* creature, MpMultipliers* m MpInstanceData *instanceData = sMpDataStore->GetInstanceData(creature->GetMapId(), creature->GetInstanceId()); int32 meleeDamage = sMpDataStore->GetDamageScaleFactor(creature->GetMapId(), instanceData->difficulty); - if(creature->IsDungeonBoss()) { + if(creature->IsDungeonBoss() || creature->GetEntry() == 23682) { meleeDamage *= 1.15; // Give the boss an increase in casting speed. @@ -354,7 +358,7 @@ int32 MythicPlus::ScaleDamageSpell(SpellInfo const * spellInfo, uint32 damage, M MpInstanceData *instanceData = sMpDataStore->GetInstanceData(creature->GetMapId(), creature->GetInstanceId()); int32 spellBonus = sMpDataStore->GetSpellScaleFactor(creature->GetMapId(), instanceData->difficulty); - if(creature->IsDungeonBoss()) { + if(creature->IsDungeonBoss() || creature->GetEntry() == 23682) { spellBonus *= 1.15; } diff --git a/src/UnitScript.cpp b/src/UnitScript.cpp index b3ca6aa..fd4994e 100644 --- a/src/UnitScript.cpp +++ b/src/UnitScript.cpp @@ -142,7 +142,7 @@ public: if(eventType != MythicPlus::UNIT_EVENT_MELEE) { MpLogger::debug("Incoming Event Type ({}): {} hits {} before mod: {} spell: ", eventName, attacker->GetName(), target->GetName(), damageOrHeal, spellInfo ? spellInfo->SpellName[0] : "none"); - if(creature->IsDungeonBoss()) { + if(creature->IsDungeonBoss() || creature->GetEntry() == 23682) { alteredDmgHeal = damageOrHeal * instanceData->boss.melee; } else { alteredDmgHeal = damageOrHeal * instanceData->creature.melee; @@ -157,7 +157,7 @@ public: */ switch (eventType) { case MythicPlus::UNIT_EVENT_MELEE: - if(creature->IsDungeonBoss()) { + if(creature->IsDungeonBoss() || creature->GetEntry() == 23682) { alteredDmgHeal = damageOrHeal * instanceData->boss.melee; } else { alteredDmgHeal = damageOrHeal * instanceData->creature.melee; @@ -167,7 +167,7 @@ public: case MythicPlus::UNIT_EVENT_DOT: case MythicPlus::UNIT_EVENT_SPELL: case MythicPlus::UNIT_EVENT_HOT: - if(creature->IsDungeonBoss()) { + if(creature->IsDungeonBoss() || creature->GetEntry() == 23682) { if(spellInfo) { alteredDmgHeal = sMythicPlus->ScaleDamageSpell(spellInfo, damageOrHeal, sMpDataStore->GetCreatureData(attacker->GetGUID()), creature, target, instanceData->boss.spell); } else {