mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Rooted mobs cast spells instead of doing nothing.
This commit is contained in:
parent
c7ad873581
commit
5285e8a163
@ -57,7 +57,11 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
if(AI_HasSpells() == false)
|
if(AI_HasSpells() == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (iChance < 100) {
|
// Rooted mobs were just standing around when tar out of range.
|
||||||
|
// Any sane mob would cast if they can.
|
||||||
|
bool cast_only_option = (IsRooted() && !CombatRange(tar));
|
||||||
|
|
||||||
|
if (!cast_only_option && iChance < 100) {
|
||||||
if (zone->random.Int(0, 100) >= iChance)
|
if (zone->random.Int(0, 100) >= iChance)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user