diff options
author | megamage <none@none> | 2009-03-25 16:04:08 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-25 16:04:08 -0600 |
commit | 02440eaa106834edbf36cedad13a3badc6a09abe (patch) | |
tree | 04d172e04a50fcfd7dc81285855625988161915e /src/game/ObjectAccessor.cpp | |
parent | 312b8e5b73fc469ec735ddc4ce0507f72805bd19 (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.cpp | 12 |
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)) |