[Bug Fix (faction)] Do not award faction if NPC is charmed. (#1945)

* Do not award faction if npc is charmed.

* No faction on kill of charmed mob or questreward of same
This commit is contained in:
Paul Coene
2022-01-26 18:17:25 -05:00
committed by GitHub
parent b9722c6d28
commit e850d80656
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -2411,7 +2411,7 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQ::skills::SkillTy
give_exp_client = give_exp->CastToClient();
//do faction hits even if we are a merchant, so long as a player killed us
if (give_exp_client && !RuleB(NPC, EnableMeritBasedFaction))
if (!IsCharmed() && give_exp_client && !RuleB(NPC, EnableMeritBasedFaction))
hate_list.DoFactionHits(GetNPCFactionID());
bool IsLdonTreasure = (this->GetClass() == LDON_TREASURE);