mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Fixes to all-reputation and all-skill custom option handling:
- Move on-create customs (all explored, all reputations) to CharacterHandler::HandlePlayerLogin for first login. Fixes #19839. - Add Wrath factions to all reputations custom (it only had BC factions). - Remove unused ReputationMgr::SendStates. Add ReputationMgr::SendState handling for sending all updated states in arbitrary order if nullptr is passed (used in point #1). - Fix all weapon skills max custom to properly apply on learning new weapon skills.
This commit is contained in:
@@ -168,7 +168,7 @@ void ReputationMgr::SendForceReactions()
|
||||
|
||||
void ReputationMgr::SendState(FactionState const* faction)
|
||||
{
|
||||
uint32 count = 1;
|
||||
uint32 count = faction ? 1 : 0;
|
||||
|
||||
WorldPacket data(SMSG_SET_FACTION_STANDING, 17);
|
||||
data << float(0);
|
||||
@@ -178,15 +178,18 @@ void ReputationMgr::SendState(FactionState const* faction)
|
||||
size_t p_count = data.wpos();
|
||||
data << uint32(count);
|
||||
|
||||
data << uint32(faction->ReputationListID);
|
||||
data << uint32(faction->Standing);
|
||||
if (faction)
|
||||
{
|
||||
data << uint32(faction->ReputationListID);
|
||||
data << uint32(faction->Standing);
|
||||
}
|
||||
|
||||
for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
|
||||
{
|
||||
if (itr->second.needSend)
|
||||
{
|
||||
itr->second.needSend = false;
|
||||
if (itr->second.ReputationListID != faction->ReputationListID)
|
||||
if (!faction || itr->second.ReputationListID != faction->ReputationListID)
|
||||
{
|
||||
data << uint32(itr->second.ReputationListID);
|
||||
data << uint32(itr->second.Standing);
|
||||
@@ -235,12 +238,6 @@ void ReputationMgr::SendInitialReputations()
|
||||
_player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void ReputationMgr::SendStates()
|
||||
{
|
||||
for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
|
||||
SendState(&(itr->second));
|
||||
}
|
||||
|
||||
void ReputationMgr::SendVisible(FactionState const* faction) const
|
||||
{
|
||||
if (_player->GetSession()->PlayerLoading())
|
||||
|
||||
Reference in New Issue
Block a user