Merge pull request #794 from noudess/master

Small fix for an NPC on a faction but with no entries in npc_faction_entries
This commit is contained in:
Michael Cook (mackal) 2018-12-06 19:44:17 -05:00 committed by GitHub
commit a4a69be0f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2632,6 +2632,15 @@ FACTION_VALUE NPC::CheckNPCFactionAlly(int32 other_faction) {
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;
}