typo fixes
This commit is contained in:
1 parent
7010950032
commit
897a3b0633
2 files changed
+14
-14
No files matched your search
@@ -7533,8 +7533,8 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
|
||||
// check forced reputation to support SPELL_AURA_FORCE_REACTION
|
||||
if (selfPlayerOwner)
|
||||
{
|
||||
if (FactionTemplateEntry const* tarGetFactionTemplateEntry = target->GetFactionTemplateEntry())
|
||||
if (ReputationRank const* repRank = selfPlayerOwner->GetReputationMgr().GetForcedRankIfAny(tarGetFactionTemplateEntry))
|
||||
if (FactionTemplateEntry const* targetFactionTemplateEntry = target->GetFactionTemplateEntry())
|
||||
if (ReputationRank const* repRank = selfPlayerOwner->GetReputationMgr().GetForcedRankIfAny(targetFactionTemplateEntry))
|
||||
return *repRank;
|
||||
}
|
||||
else if (targetPlayerOwner)
|
||||
@@ -7573,23 +7573,23 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
|
||||
|
||||
if (selfPlayerOwner)
|
||||
{
|
||||
if (FactionTemplateEntry const* tarGetFactionTemplateEntry = target->GetFactionTemplateEntry())
|
||||
if (FactionTemplateEntry const* targetFactionTemplateEntry = target->GetFactionTemplateEntry())
|
||||
{
|
||||
if (ReputationRank const* repRank = selfPlayerOwner->GetReputationMgr().GetForcedRankIfAny(tarGetFactionTemplateEntry))
|
||||
if (ReputationRank const* repRank = selfPlayerOwner->GetReputationMgr().GetForcedRankIfAny(targetFactionTemplateEntry))
|
||||
return *repRank;
|
||||
if (!selfPlayerOwner->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_IGNORE_REPUTATION))
|
||||
{
|
||||
if (FactionEntry const* tarGetFactionEntry = sFactionStore.LookupEntry(tarGetFactionTemplateEntry->faction))
|
||||
if (FactionEntry const* targetFactionEntry = sFactionStore.LookupEntry(targetFactionTemplateEntry->faction))
|
||||
{
|
||||
if (tarGetFactionEntry->CanHaveReputation())
|
||||
if (targetFactionEntry->CanHaveReputation())
|
||||
{
|
||||
// check contested flags
|
||||
if (tarGetFactionTemplateEntry->factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD
|
||||
if (targetFactionTemplateEntry->factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD
|
||||
&& selfPlayerOwner->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP))
|
||||
return REP_HOSTILE;
|
||||
|
||||
// if faction has reputation, hostile state depends only from AtWar state
|
||||
if (selfPlayerOwner->GetReputationMgr().IsAtWar(tarGetFactionEntry))
|
||||
if (selfPlayerOwner->GetReputationMgr().IsAtWar(targetFactionEntry))
|
||||
return REP_HOSTILE;
|
||||
return REP_FRIENDLY;
|
||||
}
|
||||
@@ -7609,8 +7609,8 @@ ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTem
|
||||
if (!factionTemplateEntry)
|
||||
return REP_NEUTRAL;
|
||||
|
||||
FactionTemplateEntry const* tarGetFactionTemplateEntry = target->GetFactionTemplateEntry();
|
||||
if (!tarGetFactionTemplateEntry)
|
||||
FactionTemplateEntry const* targetFactionTemplateEntry = target->GetFactionTemplateEntry();
|
||||
if (!targetFactionTemplateEntry)
|
||||
return REP_NEUTRAL;
|
||||
|
||||
if (Player const* targetPlayerOwner = target->GetAffectingPlayer())
|
||||
@@ -7638,11 +7638,11 @@ ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTem
|
||||
}
|
||||
|
||||
// common faction based check
|
||||
if (factionTemplateEntry->IsHostileTo(*tarGetFactionTemplateEntry))
|
||||
if (factionTemplateEntry->IsHostileTo(*targetFactionTemplateEntry))
|
||||
return REP_HOSTILE;
|
||||
if (factionTemplateEntry->IsFriendlyTo(*tarGetFactionTemplateEntry))
|
||||
if (factionTemplateEntry->IsFriendlyTo(*targetFactionTemplateEntry))
|
||||
return REP_FRIENDLY;
|
||||
if (tarGetFactionTemplateEntry->IsFriendlyTo(*factionTemplateEntry))
|
||||
if (targetFactionTemplateEntry->IsFriendlyTo(*factionTemplateEntry))
|
||||
return REP_FRIENDLY;
|
||||
if (factionTemplateEntry->factionFlags & FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT)
|
||||
return REP_HOSTILE;
|
||||
|
||||
Reference in new issue
Block a user