aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/CharacterHandler.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/Handlers/CharacterHandler.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/Handlers/CharacterHandler.cpp')
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 173b64ae245..e776edb6bea 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1156,15 +1156,14 @@ void WorldSession::SendFeatureSystemStatus()
SendPacket(features.Write());
}
-void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
+void WorldSession::HandleSetFactionAtWar(WorldPackets::Character::SetFactionAtWar& packet)
{
- uint32 repListID;
- uint8 flag;
-
- recvData >> repListID;
- recvData >> flag;
+ GetPlayer()->GetReputationMgr().SetAtWar(packet.FactionIndex, true);
+}
- GetPlayer()->GetReputationMgr().SetAtWar(repListID, flag != 0);
+void WorldSession::HandleSetFactionNotAtWar(WorldPackets::Character::SetFactionNotAtWar& packet)
+{
+ GetPlayer()->GetReputationMgr().SetAtWar(packet.FactionIndex, false);
}
//I think this function is never used :/ I dunno, but i guess this opcode not exists
@@ -1205,20 +1204,14 @@ void WorldSession::HandleTutorialFlag(WorldPackets::Misc::TutorialSetFlag& packe
}
}
-void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
+void WorldSession::HandleSetWatchedFactionOpcode(WorldPackets::Character::SetWatchedFaction& packet)
{
- uint32 fact;
- recvData >> fact;
- GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
+ GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, packet.FactionIndex);
}
-void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData)
+void WorldSession::HandleSetFactionInactiveOpcode(WorldPackets::Character::SetFactionInactive& packet)
{
- uint32 replistid;
- uint8 inactive;
- recvData >> replistid >> inactive;
-
- _player->GetReputationMgr().SetInactive(replistid, inactive != 0);
+ _player->GetReputationMgr().SetInactive(packet.Index, packet.State);
}
void WorldSession::HandleRequestForcedReactionsOpcode(WorldPackets::Reputation::RequestForcedReactions& /*requestForcedReactions*/)