mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bug Fix] Fix some spell types failing IsValidSpellRange check (#3707)
Hate Reduction, Slow and DoT spells were failing IsValidSpellRange checks due to improper spell IDs being checked. They were using the first spell in a bot's spell list by checking botSpell.id vs the proper spells in the loop.
This commit is contained in:
parent
100e6698ea
commit
60b65da7f2
@ -183,7 +183,7 @@ bool Bot::BotCastHateReduction(Mob* tar, uint8 botLevel, const BotSpell& botSpel
|
||||
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
||||
continue;
|
||||
|
||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
||||
if (IsValidSpellRange(iter.SpellId, tar)) {
|
||||
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
||||
}
|
||||
if (casted_spell) {
|
||||
@ -328,7 +328,7 @@ bool Bot::BotCastSlow(Mob* tar, uint8 botLevel, uint8 botClass, BotSpell& botSpe
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
||||
if (IsValidSpellRange(iter.SpellId, tar)) {
|
||||
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ bool Bot::BotCastDOT(Mob* tar, uint8 botLevel, const BotSpell& botSpell, const b
|
||||
|
||||
uint32 TempDontDotMeBefore = tar->DontDotMeBefore();
|
||||
|
||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
||||
if (IsValidSpellRange(s.SpellId, tar)) {
|
||||
casted_spell = AIDoSpellCast(s.SpellIndex, tar, s.ManaCost, &TempDontDotMeBefore);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user