264 sScriptMgr->OnPlayerReputationChange(
_player, factionEntry->ID, standing, incremental);
271 if (repTemplate->faction[i])
273 if (
_player->GetReputationRank(repTemplate->faction[i]) <=
ReputationRank(repTemplate->faction_rank[i]))
276 int32 spilloverRep =
int32(standing * repTemplate->faction_rate[i]);
284 float spillOverRepOut = float(standing);
288 if (!flist && factionEntry->ParentFactionID && factionEntry->ParentFactionModOut != 0.0f)
290 spillOverRepOut *= factionEntry->ParentFactionModOut;
293 FactionStateList::iterator parentState =
_factions.find(parent->ReputationIndex);
308 for (std::vector<uint32>::const_iterator itr = flist->begin(); itr != flist->end(); ++itr)
312 if (factionEntryCalc == factionEntry ||
GetRank(factionEntryCalc) >
ReputationRank(factionEntryCalc->ParentFactionCapIn))
314 int32 spilloverRep =
int32(spillOverRepOut * factionEntryCalc->ParentFactionModIn);
315 if (spilloverRep != 0 || !incremental)
323 FactionStateList::iterator faction =
_factions.find(factionEntry->ReputationIndex);
void SendState(FactionState const *faction)
Definition: ReputationMgr.cpp:175
ReputationRank
Definition: SharedDefines.h:211
FactionStateList _factions
Definition: ReputationMgr.h:160
#define MAX_SPILLOVER_FACTIONS
Definition: SharedDefines.h:226
#define sObjectMgr
Definition: ObjectMgr.h:1567
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
Definition: ReputationMgr.h:45
Definition: DBCStructure.h:405
int32_t int32
Definition: g3dmath.h:167
ReputationRank GetRank(FactionEntry const *factionEntry) const
Definition: ReputationMgr.cpp:119
DBCStorage< FactionEntry > sFactionStore(Factionfmt)
#define sScriptMgr
Definition: ScriptMgr.h:837
bool SetOneFactionReputation(FactionEntry const *factionEntry, int32 standing, bool incremental)
Public for chat command needs.
Definition: ReputationMgr.cpp:333
Player * _player
Definition: ReputationMgr.h:159
std::vector< uint32 > const * GetFactionTeamList(uint32 faction)
Definition: DBCStores.cpp:552
Definition: ObjectMgr.h:493