From fdd7d53aed2d8b2e512a80520bc56436c104786d Mon Sep 17 00:00:00 2001 From: gsemaj Date: Mon, 14 Aug 2023 19:44:15 -0700 Subject: [PATCH] Passive mob buffs to new system --- src/MobAI.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/MobAI.cpp b/src/MobAI.cpp index 7f18ec3..ceb4faa 100644 --- a/src/MobAI.cpp +++ b/src/MobAI.cpp @@ -762,12 +762,9 @@ void MobAI::onCombatStart(CombatNPC* npc, EntityRef src) { self->roamY = self->y; self->roamZ = self->z; - int skillID = (int)self->data["m_iPassiveBuff"]; // cast passive - // TODO ABILITIES - /*std::vector targetData = { 1, self->id, 0, 0, 0 }; - for (auto& pwr : Abilities::Powers) - if (pwr.skillType == Abilities::SkillTable[skillID].skillType) - pwr.handle(self->id, targetData, skillID, Abilities::SkillTable[skillID].durationTime[0], Abilities::SkillTable[skillID].powerIntensity[0]);*/ + int skillID = (int)self->data["m_iPassiveBuff"]; + if(skillID != 0) // cast passive + Abilities::useNPCSkill(npc->getRef(), skillID, { npc }); } void MobAI::onRetreat(CombatNPC* npc, EntityRef src) {