diff --git a/zone/mob.cpp b/zone/mob.cpp index d8b10874e..bcaa43ccc 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -286,6 +286,8 @@ Mob::Mob(const char* in_name, armor_tint.Slot[i].Color = in_armor_tint.Slot[i].Color; } + std::fill(std::begin(m_spellHitsLeft), std::end(m_spellHitsLeft), 0); + m_Delta = glm::vec4(); animation = 0; diff --git a/zone/mob.h b/zone/mob.h index 6e390d7d6..0dfa162c1 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1414,7 +1414,8 @@ protected: glm::vec3 m_TargetRing; - uint32 m_spellHitsLeft[38]; // Used to track which spells will have their numhits incremented when spell finishes casting, 38 Buffslots + // we might want to do this differently, we gotta do max NPC buffs ... which is 97 + uint32 m_spellHitsLeft[EQEmu::constants::TotalBuffs]; // Used to track which spells will have their numhits incremented when spell finishes casting int flymode; bool m_targetable; int QGVarDuration(const char *fmt); diff --git a/zone/spells.cpp b/zone/spells.cpp index 9fcfc56d2..f37f2fc53 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5565,6 +5565,7 @@ void Client::InitializeBuffSlots() for(int x = 0; x < max_slots; ++x) { buffs[x].spellid = SPELL_UNKNOWN; + buffs[x].UpdateClient = false; } current_buff_count = 0; } @@ -5581,6 +5582,7 @@ void NPC::InitializeBuffSlots() for(int x = 0; x < max_slots; ++x) { buffs[x].spellid = SPELL_UNKNOWN; + buffs[x].UpdateClient = false; } current_buff_count = 0; }