mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51: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)
|
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
if (IsValidSpellRange(iter.SpellId, tar)) {
|
||||||
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
||||||
}
|
}
|
||||||
if (casted_spell) {
|
if (casted_spell) {
|
||||||
@ -328,7 +328,7 @@ bool Bot::BotCastSlow(Mob* tar, uint8 botLevel, uint8 botClass, BotSpell& botSpe
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
if (IsValidSpellRange(iter.SpellId, tar)) {
|
||||||
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
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();
|
uint32 TempDontDotMeBefore = tar->DontDotMeBefore();
|
||||||
|
|
||||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
if (IsValidSpellRange(s.SpellId, tar)) {
|
||||||
casted_spell = AIDoSpellCast(s.SpellIndex, tar, s.ManaCost, &TempDontDotMeBefore);
|
casted_spell = AIDoSpellCast(s.SpellIndex, tar, s.ManaCost, &TempDontDotMeBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user