mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-07 06:13:52 +00:00
Add LOS check with NPC::AICheckCloseBeneficialSpells [skip ci]
This commit is contained in:
parent
785804a936
commit
240d5c2a66
12
zone/npc.cpp
12
zone/npc.cpp
@ -3093,6 +3093,14 @@ bool NPC::AICheckCloseBeneficialSpells(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!mob->CheckLosFN(caster)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mob->GetReverseFactionCon(caster) >= FACTION_KINDLY) {
|
||||
continue;
|
||||
}
|
||||
|
||||
LogAICastBeneficialClose(
|
||||
"NPC [{}] Distance [{}] Cast Range [{}] Caster [{}]",
|
||||
mob->GetCleanName(),
|
||||
@ -3101,10 +3109,6 @@ bool NPC::AICheckCloseBeneficialSpells(
|
||||
caster->GetCleanName()
|
||||
);
|
||||
|
||||
if (mob->GetReverseFactionCon(caster) >= FACTION_KINDLY) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((spell_types & SpellType_Buff) && !RuleB(NPC, BuffFriends)) {
|
||||
if (mob != caster) {
|
||||
spell_types = SpellType_Heal;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user