ReputationMgr: set and clear AtWar flag appropriately
This commit is contained in:
parent
820a017eaf
commit
5ef916a7d0
@ -293,8 +293,9 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
|
||||
|
||||
SetVisible(&faction);
|
||||
|
||||
if (ReputationToRank(standing) <= REP_HOSTILE)
|
||||
{ SetAtWar(&itr->second, true); }
|
||||
// check and, if needed, modify AtWar flag every rep rank crossing
|
||||
if (ReputationToRank(standing) != ReputationToRank(BaseRep))
|
||||
SetAtWar(&itr->second, ReputationToRank(standing) <= REP_HOSTILE);
|
||||
|
||||
m_player->ReputationChanged(factionEntry);
|
||||
|
||||
@ -369,12 +370,12 @@ void ReputationMgr::SetAtWar(FactionState* faction, bool atWar)
|
||||
else
|
||||
{ faction->Flags &= ~FACTION_FLAG_AT_WAR; }
|
||||
|
||||
WorldPacket data(SMSG_SET_FACTION_ATWAR, 4 + 1);
|
||||
data << uint32(faction->ID);
|
||||
data << uint8(faction->Flags & FACTION_FLAG_AT_WAR); // the client tests only FACTION_FLAG_AT_WAR
|
||||
m_player->SendDirectMessage(&data);
|
||||
//WorldPacket data(SMSG_SET_FACTION_ATWAR, 4 + 1);
|
||||
//data << uint32(faction->ID);
|
||||
//data << uint8(faction->Flags & FACTION_FLAG_AT_WAR); // the client tests only FACTION_FLAG_AT_WAR
|
||||
//m_player->SendDirectMessage(&data);
|
||||
|
||||
faction->needSend = false;
|
||||
faction->needSend = true;
|
||||
faction->needSave = true;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,6 @@
|
||||
|
||||
#define WORLD_DB_VERSION_NR 21
|
||||
#define WORLD_DB_STRUCTURE_NR 14
|
||||
#define WORLD_DB_CONTENT_NR 67
|
||||
#define WORLD_DB_UPDATE_DESCRIPTION "kodo roundup tidyup"
|
||||
#define WORLD_DB_CONTENT_NR 77
|
||||
#define WORLD_DB_UPDATE_DESCRIPTION "lower_npc_text_id"
|
||||
#endif // __REVISION_H__
|
||||
|
Loading…
x
Reference in New Issue
Block a user