[Commands] Cleanup #aggro Command. (#1799)

- Cleanup messages and logic.
- Cleanup constant names and references.
- Cleanup aggro description methods.
This commit is contained in:
Kinglykrab
2021-11-21 10:12:12 -05:00
committed by GitHub
parent 04fda24c8e
commit b9214bfdee
16 changed files with 512 additions and 319 deletions
+5 -5
View File
@@ -2907,7 +2907,7 @@ FACTION_VALUE NPC::GetReverseFactionCon(Mob* iOther) {
return GetSpecialFactionCon(iOther);
if (primaryFaction == 0)
return FACTION_INDIFFERENT;
return FACTION_INDIFFERENTLY;
//if we are a pet, use our owner's faction stuff
Mob *own = GetOwner();
@@ -2917,7 +2917,7 @@ FACTION_VALUE NPC::GetReverseFactionCon(Mob* iOther) {
//make sure iOther is an npc
//also, if we dont have a faction, then they arnt gunna think anything of us either
if(!iOther->IsNPC() || GetPrimaryFaction() == 0)
return(FACTION_INDIFFERENT);
return(FACTION_INDIFFERENTLY);
//if we get here, iOther is an NPC too
@@ -2941,7 +2941,7 @@ FACTION_VALUE NPC::CheckNPCFactionAlly(int32 other_faction) {
else if (fac->npc_value < 0)
return FACTION_SCOWLS;
else
return FACTION_INDIFFERENT;
return FACTION_INDIFFERENTLY;
}
}
@@ -2953,7 +2953,7 @@ FACTION_VALUE NPC::CheckNPCFactionAlly(int32 other_faction) {
if (GetPrimaryFaction() == other_faction)
return FACTION_ALLY;
else
return FACTION_INDIFFERENT;
return FACTION_INDIFFERENTLY;
}
bool NPC::IsFactionListAlly(uint32 other_faction) {
@@ -3421,7 +3421,7 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
}
}
if (sender->GetReverseFactionCon(mob) <= FACTION_AMIABLE) {
if (sender->GetReverseFactionCon(mob) <= FACTION_AMIABLY) {
//attacking someone on same faction, or a friend
//Father Nitwit: make sure we can see them.
if (mob->CheckLosFN(sender)) {