aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Reputation/ReputationMgr.cpp
diff options
context:
space:
mode:
authorDJScias <djscias@gmail.com>2015-04-22 23:26:31 +0200
committerDJScias <djscias@gmail.com>2015-04-23 00:56:35 +0200
commit1c13154e0b2268f817f7eb9892ce9e6d6ec5b6d6 (patch)
treeecec9a90a5ea8d7b83b497289f1825f526824722 /src/server/game/Reputation/ReputationMgr.cpp
parent209bf6b4e6d1936634848dd877874fdf0798809c (diff)
Core/PacketIO: Updated and enabled CMSG_SET_FACTION_AT_WAR, CMSG_SET_FACTION_INACTIVE, CMSG_SET_FACTION_NOT_AT_WAR, CMSG_SET_WATCHED_FACTION, SMSG_SET_FACTION_NOT_VISIBLE and SMSG_SET_FACTION_VISIBLE
Documentation used: - Thanks @Carbenium for all the help in regards to this (https://github.com/TrinityCore/WowPacketParser/commit/66a2baff13c381d107aad12ea7b583f5af67c275 & https://github.com/TrinityCore/WowPacketParser/commit/cfd48eb2eea9f7e9c9ded483e8a5ac47d0b73949) - SetWatchedFaction is used for CMSG_SET_WATCHED_FACTION (returns uint32 FactionIndex), confirmed in-game and with http://wow.gamepedia.com/API_GetWatchedFactionInfo (See Patch History Patch 5.0.4) - SetFactionVisible is used for SMSG_SET_FACTION_VISIBLE and SMSG_SET_FACTION_NOT_VISIBLE (uint32 FactionIndex, confirmed)
Diffstat (limited to 'src/server/game/Reputation/ReputationMgr.cpp')
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 48f3bf79088..5fea62655b3 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -27,6 +27,7 @@
#include "ScriptMgr.h"
#include "Opcodes.h"
#include "WorldSession.h"
+#include "CharacterPackets.h"
const int32 ReputationMgr::PointsInRank[MAX_REPUTATION_RANK] = {36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000};
@@ -225,15 +226,15 @@ void ReputationMgr::SendStates()
SendState(&(itr->second));
}
-void ReputationMgr::SendVisible(FactionState const* faction, bool visible /* = true*/) const
+void ReputationMgr::SendVisible(FactionState const* faction, bool visible) const
{
if (_player->GetSession()->PlayerLoading())
return;
// make faction visible/not visible in reputation list at client
- WorldPacket data(visible ? SMSG_SET_FACTION_VISIBLE : SMSG_SET_FACTION_NOT_VISIBLE, 4);
- data << faction->ReputationListID;
- _player->SendDirectMessage(&data);
+ WorldPackets::Character::SetFactionVisible packet(visible);
+ packet.FactionIndex = faction->ReputationListID;
+ _player->SendDirectMessage(packet.Write());
}
void ReputationMgr::Initialize()