mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-30 05:12:25 +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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mob->CheckLosFN(caster)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob->GetReverseFactionCon(caster) >= FACTION_KINDLY) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
LogAICastBeneficialClose(
|
LogAICastBeneficialClose(
|
||||||
"NPC [{}] Distance [{}] Cast Range [{}] Caster [{}]",
|
"NPC [{}] Distance [{}] Cast Range [{}] Caster [{}]",
|
||||||
mob->GetCleanName(),
|
mob->GetCleanName(),
|
||||||
@ -3101,10 +3109,6 @@ bool NPC::AICheckCloseBeneficialSpells(
|
|||||||
caster->GetCleanName()
|
caster->GetCleanName()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (mob->GetReverseFactionCon(caster) >= FACTION_KINDLY) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((spell_types & SpellType_Buff) && !RuleB(NPC, BuffFriends)) {
|
if ((spell_types & SpellType_Buff) && !RuleB(NPC, BuffFriends)) {
|
||||||
if (mob != caster) {
|
if (mob != caster) {
|
||||||
spell_types = SpellType_Heal;
|
spell_types = SpellType_Heal;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user