Added event system and updated Bazzalan as a test.

This commit is contained in:
2024-10-18 19:24:33 -04:00
parent 5847754197
commit 5877e9122c
4 changed files with 14 additions and 32 deletions

View File

@@ -45,30 +45,6 @@ public:
sMythicPlus->RemoveCreature(creature);
}
// CreatureAI* GetCreatureAI(Creature* creature) const override
// {
// if(!creature) {
// return nullptr;
// }
// uint32 instance = creature->GetInstanceId();
// if(!instance) {
// return nullptr;
// }
// MpLogger::debug("GetCreatureAI: Instance logger for instanceId {} called on {}", instance, creature->GetGUID().GetCounter());
// // Attach to creatures that are in a mythic+ map
// MpCreatureData* creatureData = sMpDataStore->GetCreatureData(creature->GetGUID());
// if (!creatureData) {
// return nullptr;
// }
// MpLogger::debug("GetCreatureAI: called on {}", creature->GetName());
// return new MpScriptAI(creature);
// }
};
void Add_MP_AllCreatureScripts()

View File

@@ -1,23 +1,26 @@
#include "BaseCreatureHandler.h"
#include "Spell.h"
/**
* Bazzalan need some upgrades so made him more formidable
*/
class Ragefire_Bazzalan_Mythic : public BaseCreatureHandler
{
public:
Ragefire_Bazzalan_Mythic() : BaseCreatureHandler(11519) {}
// Implement the required methods from BaseCreatureHandler
void OnJustDied(Creature* creature, Unit* killer) override {
creature->Yell("The flame... it burns out...", LANG_UNIVERSAL, nullptr);
}
void OnAddToInstance(Creature* creature) override {
creature->Yell("The fire rises again!", LANG_UNIVERSAL, nullptr);
MpLogger::debug("Ragefire Bazzalan spawned Setting high health");
uint32 health = 10000000;
uint32 health = creature->GetMaxHealth() * 2;
creature->SetCreateHealth(health);
creature->SetMaxHealth(health);
creature->SetHealth(health);
creature->ResetPlayerDamageReq();
creature->SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)health);
creature->AddExtraAttacks(3);
creature->SetObjectScale(2.0f);
}
};

View File

@@ -273,6 +273,9 @@ void MythicPlus::ScaleCreature(uint8 level, Creature* creature, MpMultipliers* m
int32 meleeDamage = sMpDataStore->GetDamageScaleFactor(creature->GetMapId(), instanceData->difficulty);
if(creature->IsDungeonBoss()) {
meleeDamage *= 1.15;
// Give the boss an increase in casting speed.
creature->SetFloatValue(UNIT_MOD_CAST_SPEED, 1.30f);
}
// Calculate the level difference

View File

@@ -166,6 +166,7 @@ public:
break;
case MythicPlus::UNIT_EVENT_DOT:
case MythicPlus::UNIT_EVENT_SPELL:
case MythicPlus::UNIT_EVENT_HOT:
if(creature->IsDungeonBoss()) {
if(spellInfo) {
alteredDmgHeal = sMythicPlus->ScaleDamageSpell(spellInfo, damageOrHeal, sMpDataStore->GetCreatureData(attacker->GetGUID()), creature, target, instanceData->boss.spell);
@@ -186,7 +187,6 @@ public:
MpLogger::debug("Incoming spell New Damage: {}({}) {} hits {}", alteredDmgHeal, damageOrHeal, attacker->GetName(), target->GetName());
}
break;
case MythicPlus::UNIT_EVENT_HOT:
case MythicPlus::UNIT_EVENT_HEAL:
break;
}