mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Codestyle: Renamed some variables to fit codestyle, corrected order in structure/class fields to match alignment (they use slightly less memory now)
Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
@@ -50,8 +50,8 @@ struct FactionState
|
||||
{
|
||||
uint32 ID;
|
||||
RepListID ReputationListID;
|
||||
uint8 Flags;
|
||||
int32 Standing;
|
||||
uint8 Flags;
|
||||
bool needSend;
|
||||
bool needSave;
|
||||
};
|
||||
@@ -64,8 +64,8 @@ class Player;
|
||||
class ReputationMgr
|
||||
{
|
||||
public: // constructors and global modifiers
|
||||
explicit ReputationMgr(Player* owner) : m_player(owner),
|
||||
m_visibleFactionCount(0), m_honoredFactionCount(0), m_reveredFactionCount(0), m_exaltedFactionCount(0) {}
|
||||
explicit ReputationMgr(Player* owner) : _player(owner),
|
||||
_visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0) {}
|
||||
~ReputationMgr() {}
|
||||
|
||||
void SaveToDB(SQLTransaction& trans);
|
||||
@@ -77,12 +77,12 @@ class ReputationMgr
|
||||
|
||||
static ReputationRank ReputationToRank(int32 standing);
|
||||
public: // accessors
|
||||
uint8 GetVisibleFactionCount() const { return m_visibleFactionCount; }
|
||||
uint8 GetHonoredFactionCount() const { return m_honoredFactionCount; }
|
||||
uint8 GetReveredFactionCount() const { return m_reveredFactionCount; }
|
||||
uint8 GetExaltedFactionCount() const { return m_exaltedFactionCount; }
|
||||
uint8 GetVisibleFactionCount() const { return _visibleFactionCount; }
|
||||
uint8 GetHonoredFactionCount() const { return _honoredFactionCount; }
|
||||
uint8 GetReveredFactionCount() const { return _reveredFactionCount; }
|
||||
uint8 GetExaltedFactionCount() const { return _exaltedFactionCount; }
|
||||
|
||||
FactionStateList const& GetStateList() const { return m_factions; }
|
||||
FactionStateList const& GetStateList() const { return _factions; }
|
||||
|
||||
FactionState const* GetState(FactionEntry const* factionEntry) const
|
||||
{
|
||||
@@ -91,8 +91,8 @@ class ReputationMgr
|
||||
|
||||
FactionState const* GetState(RepListID id) const
|
||||
{
|
||||
FactionStateList::const_iterator repItr = m_factions.find (id);
|
||||
return repItr != m_factions.end() ? &repItr->second : NULL;
|
||||
FactionStateList::const_iterator repItr = _factions.find (id);
|
||||
return repItr != _factions.end() ? &repItr->second : NULL;
|
||||
}
|
||||
|
||||
bool IsAtWar(uint32 faction_id) const;
|
||||
@@ -111,8 +111,8 @@ class ReputationMgr
|
||||
|
||||
ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const
|
||||
{
|
||||
ForcedReactions::const_iterator forceItr = m_forcedReactions.find(factionTemplateEntry->faction);
|
||||
return forceItr != m_forcedReactions.end() ? &forceItr->second : NULL;
|
||||
ForcedReactions::const_iterator forceItr = _forcedReactions.find(factionTemplateEntry->faction);
|
||||
return forceItr != _forcedReactions.end() ? &forceItr->second : NULL;
|
||||
}
|
||||
|
||||
public: // modifiers
|
||||
@@ -149,13 +149,13 @@ class ReputationMgr
|
||||
void SendVisible(FactionState const* faction) const;
|
||||
void UpdateRankCounters(ReputationRank old_rank, ReputationRank new_rank);
|
||||
private:
|
||||
Player* m_player;
|
||||
FactionStateList m_factions;
|
||||
ForcedReactions m_forcedReactions;
|
||||
uint8 m_visibleFactionCount :8;
|
||||
uint8 m_honoredFactionCount :8;
|
||||
uint8 m_reveredFactionCount :8;
|
||||
uint8 m_exaltedFactionCount :8;
|
||||
Player* _player;
|
||||
FactionStateList _factions;
|
||||
ForcedReactions _forcedReactions;
|
||||
uint8 _visibleFactionCount :8;
|
||||
uint8 _honoredFactionCount :8;
|
||||
uint8 _reveredFactionCount :8;
|
||||
uint8 _exaltedFactionCount :8;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user