mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-31 18:42:27 +00:00
[API] Fix for SetBuffDuration function to check bard slots. (#2009)
This commit is contained in:
parent
0d02fadb60
commit
56d0478ab1
@ -10234,7 +10234,7 @@ void Mob::SetBuffDuration(int32 spell_id, int32 duration) {
|
|||||||
duration = PERMANENT_BUFF_DURATION;
|
duration = PERMANENT_BUFF_DURATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
int buff_count = GetMaxBuffSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int slot = 0; slot < buff_count; slot++) {
|
for (int slot = 0; slot < buff_count; slot++) {
|
||||||
|
|
||||||
if (!adjust_all_buffs) {
|
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);
|
std::string id = str_tolower(stat_identifier);
|
||||||
|
|
||||||
int buff_count = GetMaxBuffSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int slot = 0; slot < buff_count; slot++) {
|
for (int slot = 0; slot < buff_count; slot++) {
|
||||||
if (buffs[slot].spellid != SPELL_UNKNOWN && buffs[slot].spellid == spell_id) {
|
if (buffs[slot].spellid != SPELL_UNKNOWN && buffs[slot].spellid == spell_id) {
|
||||||
return GetBuffStatValueBySlot(slot, stat_identifier);
|
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)
|
int Mob::GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier)
|
||||||
{
|
{
|
||||||
if (slot > GetMaxBuffSlots()) {
|
if (slot > GetMaxTotalSlots()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user