From 137d2d723d9ff86af9faeaf706267b6a2efb80f0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 25 Mar 2018 01:16:06 -0400 Subject: [PATCH] Initialize AISpellVar --- zone/npc.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zone/npc.cpp b/zone/npc.cpp index b9aec3abb..edd6e5673 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -399,6 +399,19 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if raid_target = d->raid_target; ignore_despawn = d->ignore_despawn; m_targetable = !d->untargetable; + + AISpellVar.fail_recast = RuleI(Spells, AI_SpellCastFinishedFailRecast); + AISpellVar.engaged_no_sp_recast_min = RuleI(Spells, AI_EngagedNoSpellMinRecast); + AISpellVar.engaged_no_sp_recast_max = RuleI(Spells, AI_EngagedNoSpellMaxRecast); + AISpellVar.engaged_beneficial_self_chance = RuleI(Spells, AI_EngagedBeneficialSelfChance); + AISpellVar.engaged_beneficial_other_chance = RuleI(Spells, AI_EngagedBeneficialOtherChance); + AISpellVar.engaged_detrimental_chance = RuleI(Spells, AI_EngagedDetrimentalChance); + AISpellVar.pursue_no_sp_recast_min = RuleI(Spells, AI_PursueNoSpellMinRecast); + AISpellVar.pursue_no_sp_recast_max = RuleI(Spells, AI_PursueNoSpellMaxRecast); + AISpellVar.pursue_detrimental_chance = RuleI(Spells, AI_PursueDetrimentalChance); + AISpellVar.idle_no_sp_recast_min = RuleI(Spells, AI_IdleNoSpellMinRecast); + AISpellVar.idle_no_sp_recast_max = RuleI(Spells, AI_IdleNoSpellMaxRecast); + AISpellVar.idle_beneficial_chance = RuleI(Spells, AI_IdleBeneficialChance); } NPC::~NPC()