From 56d0478ab1bd04d97ad91f91998586f049a21a72 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 17 Feb 2022 12:00:42 -0500 Subject: [PATCH] [API] Fix for SetBuffDuration function to check bard slots. (#2009) --- zone/spell_effects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 4a3b7b68e..d08ac823c 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -10234,7 +10234,7 @@ void Mob::SetBuffDuration(int32 spell_id, int32 duration) { duration = PERMANENT_BUFF_DURATION; } - int buff_count = GetMaxBuffSlots(); + int buff_count = GetMaxTotalSlots(); for (int slot = 0; slot < buff_count; slot++) { if (!adjust_all_buffs) { @@ -10283,7 +10283,7 @@ int Mob::GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier) std::string id = str_tolower(stat_identifier); - int buff_count = GetMaxBuffSlots(); + int buff_count = GetMaxTotalSlots(); for (int slot = 0; slot < buff_count; slot++) { if (buffs[slot].spellid != SPELL_UNKNOWN && buffs[slot].spellid == spell_id) { return GetBuffStatValueBySlot(slot, stat_identifier); @@ -10294,7 +10294,7 @@ int Mob::GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier) int Mob::GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier) { - if (slot > GetMaxBuffSlots()) { + if (slot > GetMaxTotalSlots()) { return 0; }