mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
[7538] Hide some implementation details for reputation/forced faction reaction. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user