mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 19:32:24 +00:00
Small fix for an NPC on a faction but with no entries in npc_faction_entries.
This commit is contained in:
parent
2a9f38de2a
commit
9bf23a131b
13
zone/npc.cpp
13
zone/npc.cpp
@ -2632,7 +2632,16 @@ FACTION_VALUE NPC::CheckNPCFactionAlly(int32 other_faction) {
|
|||||||
return FACTION_INDIFFERENT;
|
return FACTION_INDIFFERENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FACTION_INDIFFERENT;
|
|
||||||
|
// I believe that the assumption is, barring no entry in npc_faction_entries
|
||||||
|
// that two npcs on like faction con ally to each other. This catches cases
|
||||||
|
// where an npc is on a faction but has no hits (hence no entry in
|
||||||
|
// npc_faction_entries).
|
||||||
|
|
||||||
|
if (GetPrimaryFaction() == other_faction)
|
||||||
|
return FACTION_ALLY;
|
||||||
|
else
|
||||||
|
return FACTION_INDIFFERENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NPC::IsFactionListAlly(uint32 other_faction) {
|
bool NPC::IsFactionListAlly(uint32 other_faction) {
|
||||||
@ -2820,4 +2829,4 @@ void NPC::ModifyStatsOnCharm(bool bRemoved)
|
|||||||
// the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses()
|
// the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses()
|
||||||
SetAttackTimer();
|
SetAttackTimer();
|
||||||
CalcAC();
|
CalcAC();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user