19 #ifndef __TRINITY_REPUTATION_MGR_H
20 #define __TRINITY_REPUTATION_MGR_H
68 _visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0), _sendFactionIncreased(
false) { }
94 FactionStateList::const_iterator repItr = _factions.find (
id);
95 return repItr != _factions.end() ? &repItr->second :
NULL;
98 bool IsAtWar(
uint32 faction_id)
const;
114 return GetForcedRankIfAny(factionTemplateEntry->
Faction);
119 ForcedReactions::const_iterator forceItr = _forcedReactions.find(factionId);
120 return forceItr != _forcedReactions.end() ? &forceItr->second :
NULL;
126 return SetReputation(factionEntry, standing,
false);
130 return SetReputation(factionEntry, standing,
true);
135 void SetAtWar(
RepListID repListID,
bool on);
136 void SetInactive(
RepListID repListID,
bool on);
141 bool SetOneFactionReputation(
FactionEntry const* factionEntry,
int32 standing,
bool incremental);
144 void SendInitialReputations();
145 void SendForceReactions();
152 bool SetReputation(
FactionEntry const* factionEntry,
int32 standing,
bool incremental);
155 void SetInactive(
FactionState* faction,
bool inactive)
const;
156 void SendVisible(
FactionState const* faction,
bool visible =
true)
const;
Definition: ReputationMgr.h:41
uint32 GetReputationRankStrIndex(FactionEntry const *factionEntry) const
Definition: ReputationMgr.h:107
FactionState const * GetState(RepListID id) const
Definition: ReputationMgr.h:92
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
ReputationRank
Definition: SharedDefines.h:211
Definition: ReputationMgr.h:43
uint32 ID
Definition: ReputationMgr.h:51
Definition: ReputationMgr.h:64
Definition: ReputationMgr.h:39
FactionStateList _factions
Definition: ReputationMgr.h:160
void LoadFromDB()
Definition: AddonMgr.cpp:40
Definition: Language.h:352
Definition: ReputationMgr.h:37
static const int32 Reputation_Cap
Definition: ReputationMgr.h:75
Definition: Language.h:346
int32 Standing
Definition: ReputationMgr.h:53
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: Language.h:348
#define false
Definition: CascPort.h:18
uint32 RepListID
Definition: ReputationMgr.h:48
uint8 GetReveredFactionCount() const
Definition: ReputationMgr.h:82
void apply(T *val)
Definition: ByteConverter.h:41
FactionState const * GetState(FactionEntry const *factionEntry) const
Definition: ReputationMgr.h:87
Definition: ReputationMgr.h:42
Definition: Language.h:351
#define MAX_REPUTATION_RANK
Definition: SharedDefines.h:224
ForcedReactions _forcedReactions
Definition: ReputationMgr.h:161
bool _sendFactionIncreased
Definition: ReputationMgr.h:166
Definition: Language.h:347
Definition: ReputationMgr.h:40
std::map< uint32, ReputationRank > ForcedReactions
Definition: ReputationMgr.h:60
int32_t int32
Definition: Define.h:146
ReputationRank const * GetForcedRankIfAny(FactionTemplateEntry const *factionTemplateEntry) const
Definition: ReputationMgr.h:112
uint32_t uint32
Definition: Define.h:150
static void Initialize(PCASC_SALSA20 pState, LPBYTE pbKey, DWORD cbKeyLength, LPBYTE pbVector)
Definition: CascDecrypt.cpp:81
Definition: ReputationMgr.h:45
static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK]
Definition: ReputationMgr.h:29
bool needSend
Definition: ReputationMgr.h:55
FactionStateList const & GetStateList() const
Definition: ReputationMgr.h:85
Definition: DBCStructure.h:433
Definition: DBCStructure.h:405
static const int32 Reputation_Bottom
Definition: ReputationMgr.h:76
Definition: ReputationMgr.h:44
#define TC_GAME_API
Definition: Define.h:134
uint8 Flags
Definition: ReputationMgr.h:54
ReputationRank const * GetForcedRankIfAny(uint32 factionId) const
Definition: ReputationMgr.h:117
Definition: Language.h:350
uint8_t uint8
Definition: Define.h:152
Definition: ReputationMgr.h:38
bool needSave
Definition: ReputationMgr.h:56
std::map< RepListID, FactionState > FactionStateList
Definition: ReputationMgr.h:59
ReputationMgr(Player *owner)
Definition: ReputationMgr.h:67
Definition: Language.h:349
bool ModifyReputation(FactionEntry const *factionEntry, int32 standing)
Definition: ReputationMgr.h:128
int32 ReputationIndex
Definition: DBCStructure.h:408
uint8 GetHonoredFactionCount() const
Definition: ReputationMgr.h:81
uint8 GetExaltedFactionCount() const
Definition: ReputationMgr.h:83
Player * _player
Definition: ReputationMgr.h:159
FactionFlags
Definition: ReputationMgr.h:35
bool CanHaveReputation() const
Definition: DBCStructure.h:425
uint8 GetVisibleFactionCount() const
Definition: ReputationMgr.h:80
bool SetReputation(FactionEntry const *factionEntry, int32 standing)
Definition: ReputationMgr.h:124
Definition: Language.h:353
~ReputationMgr()
Definition: ReputationMgr.h:69
Definition: ReputationMgr.h:49
RepListID ReputationListID
Definition: ReputationMgr.h:52
uint32 Faction
Definition: DBCStructure.h:436
std::shared_ptr< Transaction > SQLTransaction
Definition: Transaction.h:58