aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectAccessor.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-25 16:04:08 -0600
committermegamage <none@none>2009-03-25 16:04:08 -0600
commit02440eaa106834edbf36cedad13a3badc6a09abe (patch)
tree04d172e04a50fcfd7dc81285855625988161915e /src/game/ObjectAccessor.cpp
parent312b8e5b73fc469ec735ddc4ce0507f72805bd19 (diff)
[7538] Hide some implementation details for reputation/forced faction reaction. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
-rw-r--r--src/game/ObjectAccessor.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index c245b09f410..14ee90ef3e5 100644
--- a/src/game/ObjectAccessor.cpp
+++ b/src/game/ObjectAccessor.cpp
@@ -81,13 +81,11 @@ ObjectAccessor::GetNPCIfCanInteractWith(Player const &player, uint64 guid, uint3
return NULL;
// not unfriendly
- FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(unit->getFaction());
- if(factionTemplate)
- {
- FactionEntry const* faction = sFactionStore.LookupEntry(factionTemplate->faction);
- if( faction && faction->reputationListID >= 0 && player.GetReputationRank(faction) <= REP_UNFRIENDLY)
- return NULL;
- }
+ if(FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(unit->getFaction()))
+ if(factionTemplate->faction)
+ if(FactionEntry const* faction = sFactionStore.LookupEntry(factionTemplate->faction))
+ if(faction->reputationListID >= 0 && player.GetReputationRank(faction) <= REP_UNFRIENDLY)
+ return NULL;
// not too far
if(!unit->IsWithinDistInMap(&player,INTERACTION_DISTANCE))