Never show standing with factions of the opposing team.
Minor cleanup in affected code. --HG-- branch : trunk
This commit is contained in:
@@ -357,7 +357,9 @@ void ReputationMgr::SetVisible(FactionTemplateEntry const*factionTemplateEntry)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(FactionEntry const *factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction))
|
if(FactionEntry const *factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction))
|
||||||
SetVisible(factionEntry);
|
// Never show factions of the opposing team
|
||||||
|
if(!(factionEntry->BaseRepRaceMask[1] & m_player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom) )
|
||||||
|
SetVisible(factionEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReputationMgr::SetVisible(FactionEntry const *factionEntry)
|
void ReputationMgr::SetVisible(FactionEntry const *factionEntry)
|
||||||
@@ -376,10 +378,7 @@ void ReputationMgr::SetVisible(FactionState* faction)
|
|||||||
{
|
{
|
||||||
// always invisible or hidden faction can't be make visible
|
// always invisible or hidden faction can't be make visible
|
||||||
// except if faction has FACTION_FLAG_SPECIAL
|
// except if faction has FACTION_FLAG_SPECIAL
|
||||||
if(faction->Flags & FACTION_FLAG_INVISIBLE_FORCED && !(faction->Flags & FACTION_FLAG_SPECIAL) )
|
if(faction->Flags & (FACTION_FLAG_INVISIBLE_FORCED|FACTION_FLAG_HIDDEN) && !(faction->Flags & FACTION_FLAG_SPECIAL) )
|
||||||
return;
|
|
||||||
|
|
||||||
if(faction->Flags & FACTION_FLAG_HIDDEN)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// already set
|
// already set
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] =
|
|||||||
|
|
||||||
enum FactionFlags
|
enum FactionFlags
|
||||||
{
|
{
|
||||||
|
FACTION_FLAG_NONE = 0x00, // no faction flag
|
||||||
FACTION_FLAG_VISIBLE = 0x01, // makes visible in client (set or can be set at interaction with target of this faction)
|
FACTION_FLAG_VISIBLE = 0x01, // makes visible in client (set or can be set at interaction with target of this faction)
|
||||||
FACTION_FLAG_AT_WAR = 0x02, // enable AtWar-button in client. player controlled (except opposition team always war state), Flag only set on initial creation
|
FACTION_FLAG_AT_WAR = 0x02, // enable AtWar-button in client. player controlled (except opposition team always war state), Flag only set on initial creation
|
||||||
FACTION_FLAG_HIDDEN = 0x04, // hidden faction from reputation pane in client (player can gain reputation, but this update not sent to client)
|
FACTION_FLAG_HIDDEN = 0x04, // hidden faction from reputation pane in client (player can gain reputation, but this update not sent to client)
|
||||||
@@ -48,14 +49,12 @@ struct FactionState
|
|||||||
{
|
{
|
||||||
uint32 ID;
|
uint32 ID;
|
||||||
RepListID ReputationListID;
|
RepListID ReputationListID;
|
||||||
uint32 Flags;
|
uint8 Flags;
|
||||||
int32 Standing;
|
int32 Standing;
|
||||||
bool Changed;
|
bool Changed;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<RepListID,FactionState> FactionStateList;
|
typedef std::map<RepListID,FactionState> FactionStateList;
|
||||||
typedef std::pair<FactionStateList::const_iterator,FactionStateList::const_iterator> FactionStateListPair;
|
|
||||||
|
|
||||||
typedef std::map<uint32,ReputationRank> ForcedReactions;
|
typedef std::map<uint32,ReputationRank> ForcedReactions;
|
||||||
|
|
||||||
class Player;
|
class Player;
|
||||||
@@ -133,7 +132,7 @@ class ReputationMgr
|
|||||||
|
|
||||||
private: // internal helper functions
|
private: // internal helper functions
|
||||||
void Initialize();
|
void Initialize();
|
||||||
uint32 GetDefaultStateFlags(const FactionEntry *factionEntry) const;
|
uint32 GetDefaultStateFlags(FactionEntry const* factionEntry) const;
|
||||||
bool SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
|
bool SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
|
||||||
bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
|
bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
|
||||||
void SetVisible(FactionState* faction);
|
void SetVisible(FactionState* faction);
|
||||||
|
|||||||
Reference in New Issue
Block a user