From c18562b150bd124b75a6216a3345fc5fceaeb5d0 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 23 Apr 2021 00:40:17 -0400 Subject: [PATCH] [Bug] Fix ignore_primary_assist. (#1323) * [Bug] Fix ignore_primary_assist. * Fix to continue loop instead of return Co-authored-by: Noudess --- zone/npc.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 87d7b57fc..2a90bf360 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -3294,17 +3294,16 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker) * then jump in if they are our friend */ if (mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GRAY) { - bool use_primary_faction = false; if (mob->GetPrimaryFaction() == sender->CastToNPC()->GetPrimaryFaction()) { const NPCFactionList *cf = content_db.GetNPCFactionEntry(mob->CastToNPC()->GetNPCFactionID()); if (cf) { - if (cf->assistprimaryfaction != 0) { - use_primary_faction = true; + if (cf->assistprimaryfaction == 0) { + continue; //Same faction and ignore primary assist } } } - if (use_primary_faction || sender->GetReverseFactionCon(mob) <= FACTION_AMIABLE) { + if (sender->GetReverseFactionCon(mob) <= FACTION_AMIABLE) { //attacking someone on same faction, or a friend //Father Nitwit: make sure we can see them. if (mob->CheckLosFN(sender)) {