mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-10 15:12:26 +00:00
Add NPC NPC faction check to BeamDirectional
This commit is contained in:
parent
46cbd147b5
commit
e86fca3aff
@ -5643,6 +5643,19 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsNPC() && (*iter)->IsNPC()) {
|
||||||
|
auto fac = (*iter)->GetReverseFactionCon(this);
|
||||||
|
if (beneficial_targets) {
|
||||||
|
// only affect mobs we would assist.
|
||||||
|
if (!(fac <= FACTION_AMIABLE))
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
// affect mobs that are on our hate list, or which have bad faction with us
|
||||||
|
if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//# shortest distance from line to target point
|
//# shortest distance from line to target point
|
||||||
float d = std::abs((*iter)->GetY() - m * (*iter)->GetX() - b) / sqrt(m * m + 1);
|
float d = std::abs((*iter)->GetY() - m * (*iter)->GetX() - b) / sqrt(m * m + 1);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user