mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[Bug] Fix ignore_primary_assist. (#1323)
* [Bug] Fix ignore_primary_assist. * Fix to continue loop instead of return Co-authored-by: Noudess <noudess@gmail.com>
This commit is contained in:
parent
dba3010c89
commit
c18562b150
@ -3294,17 +3294,16 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
|
|||||||
* then jump in if they are our friend
|
* then jump in if they are our friend
|
||||||
*/
|
*/
|
||||||
if (mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GRAY) {
|
if (mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GRAY) {
|
||||||
bool use_primary_faction = false;
|
|
||||||
if (mob->GetPrimaryFaction() == sender->CastToNPC()->GetPrimaryFaction()) {
|
if (mob->GetPrimaryFaction() == sender->CastToNPC()->GetPrimaryFaction()) {
|
||||||
const NPCFactionList *cf = content_db.GetNPCFactionEntry(mob->CastToNPC()->GetNPCFactionID());
|
const NPCFactionList *cf = content_db.GetNPCFactionEntry(mob->CastToNPC()->GetNPCFactionID());
|
||||||
if (cf) {
|
if (cf) {
|
||||||
if (cf->assistprimaryfaction != 0) {
|
if (cf->assistprimaryfaction == 0) {
|
||||||
use_primary_faction = true;
|
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
|
//attacking someone on same faction, or a friend
|
||||||
//Father Nitwit: make sure we can see them.
|
//Father Nitwit: make sure we can see them.
|
||||||
if (mob->CheckLosFN(sender)) {
|
if (mob->CheckLosFN(sender)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user