diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index c2899bfb1..c463b554b 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -184,7 +184,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) break; } - case ID_GAME_ATTRIBUTE: + case ID_PLAYER_ATTRIBUTE: { if (!player->creatureStats.mDead) @@ -197,7 +197,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) break; } - case ID_GAME_SKILL: + case ID_PLAYER_SKILL: { if (!player->creatureStats.mDead) @@ -714,8 +714,8 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) { playerController->GetPacket(ID_GAME_BASE_INFO)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_DYNAMICSTATS)->Send(pl->second, guid); - playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid); - playerController->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid); + playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(pl->second, guid); + playerController->GetPacket(ID_PLAYER_SKILL)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_POS)->Send(pl->second, guid); playerController->GetPacket(ID_PLAYER_CELL_CHANGE)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid); diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index 1a79bc598..36702e0c3 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -485,8 +485,8 @@ void StatsFunctions::SendAttributes(unsigned short pid) noexcept Player *player; GET_PLAYER(pid, player,); - mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_ATTRIBUTE)->Send(player, false); - mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_ATTRIBUTE)->Send(player, true); + mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(player, false); + mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(player, true); } void StatsFunctions::SendSkills(unsigned short pid) noexcept @@ -494,8 +494,8 @@ void StatsFunctions::SendSkills(unsigned short pid) noexcept Player *player; GET_PLAYER(pid, player,); - mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_SKILL)->Send(player, false); - mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_SKILL)->Send(player, true); + mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_SKILL)->Send(player, false); + mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_SKILL)->Send(player, true); } void StatsFunctions::SendLevel(unsigned short pid) noexcept diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index c87588eac..8e7fc2350 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -205,7 +205,7 @@ void LocalPlayer::updateAttributes(bool forceUpdate) if (attributesChanged || forceUpdate) { - getNetworking()->getPlayerPacket(ID_GAME_ATTRIBUTE)->Send(this); + getNetworking()->getPlayerPacket(ID_PLAYER_ATTRIBUTE)->Send(this); } } @@ -244,7 +244,7 @@ void LocalPlayer::updateSkills(bool forceUpdate) if (skillsChanged || forceUpdate) { npcStats.mLevelProgress = ptrNpcStats.getLevelProgress(); - getNetworking()->getPlayerPacket(ID_GAME_SKILL)->Send(this); + getNetworking()->getPlayerPacket(ID_PLAYER_SKILL)->Send(this); } } diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 6d461605a..32325e58f 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -574,7 +574,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) } break; } - case ID_GAME_ATTRIBUTE: + case ID_PLAYER_ATTRIBUTE: { if (guid == myGuid) { @@ -604,7 +604,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) } break; } - case ID_GAME_SKILL: + case ID_PLAYER_SKILL: { if (guid == myGuid) { diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 97b518c6d..98124b107 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -154,8 +154,8 @@ add_component_dir (openmw-mp Packets/Player/PacketBaseInfo Packets/Player/PacketPosition Packets/Player/PacketEquipment Packets/Player/PacketAttack Packets/Player/PacketDynamicStats Packets/Player/PacketDrawState - Packets/Player/PacketChatMessage Packets/Player/PacketCharGen Packets/Player/PacketAttribute - Packets/Player/PacketSkill Packets/Player/PacketLevel Packets/Player/PacketHandshake + Packets/Player/PacketChatMessage Packets/Player/PacketCharGen Packets/Player/PacketPlayerAttribute + Packets/Player/PacketPlayerSkill Packets/Player/PacketLevel Packets/Player/PacketHandshake Packets/Player/PacketGUIBoxes Packets/Player/PacketClass Packets/Player/PacketTime Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketJournal Packets/Player/PacketActiveSkills Packets/Player/PacketPlayerCellChange diff --git a/components/openmw-mp/Controllers/PlayerPacketController.cpp b/components/openmw-mp/Controllers/PlayerPacketController.cpp index 8c023bb09..db951cc14 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -17,8 +17,8 @@ #include "../Packets/Player/PacketDrawState.hpp" #include "../Packets/Player/PacketChatMessage.hpp" #include "../Packets/Player/PacketCharGen.hpp" -#include "../Packets/Player/PacketAttribute.hpp" -#include "../Packets/Player/PacketSkill.hpp" +#include "../Packets/Player/PacketPlayerAttribute.hpp" +#include "../Packets/Player/PacketPlayerSkill.hpp" #include "../Packets/Player/PacketLevel.hpp" #include "../Packets/Player/PacketHandshake.hpp" #include "../Packets/Player/PacketGUIBoxes.hpp" @@ -60,8 +60,8 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p AddPacket(&packets, peer); AddPacket(&packets, peer); - AddPacket(&packets, peer); - AddPacket(&packets, peer); + AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 290646bbe..143a550e7 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -23,8 +23,8 @@ enum GameMessages ID_CHAT_MESSAGE, ID_GAME_DRAWSTATE, - ID_GAME_ATTRIBUTE, - ID_GAME_SKILL, + ID_PLAYER_ATTRIBUTE, + ID_PLAYER_SKILL, ID_GAME_LEVEL, ID_GAME_CHARCLASS, ID_HANDSHAKE, diff --git a/components/openmw-mp/Packets/Player/PacketAttribute.cpp b/components/openmw-mp/Packets/Player/PacketPlayerAttribute.cpp similarity index 51% rename from components/openmw-mp/Packets/Player/PacketAttribute.cpp rename to components/openmw-mp/Packets/Player/PacketPlayerAttribute.cpp index b00d86e50..598298f56 100644 --- a/components/openmw-mp/Packets/Player/PacketAttribute.cpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerAttribute.cpp @@ -2,17 +2,17 @@ // Created by koncord on 08.03.16. // -#include "PacketAttribute.hpp" +#include "PacketPlayerAttribute.hpp" #include using namespace mwmp; -PacketAttribute::PacketAttribute(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +PacketPlayerAttribute::PacketPlayerAttribute(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { - packetID = ID_GAME_ATTRIBUTE; + packetID = ID_PLAYER_ATTRIBUTE; } -void PacketAttribute::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) +void PacketPlayerAttribute::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) { PlayerPacket::Packet(bs, player, send); diff --git a/components/openmw-mp/Packets/Player/PacketAttribute.hpp b/components/openmw-mp/Packets/Player/PacketPlayerAttribute.hpp similarity index 53% rename from components/openmw-mp/Packets/Player/PacketAttribute.hpp rename to components/openmw-mp/Packets/Player/PacketPlayerAttribute.hpp index 4a60347da..e603320e6 100644 --- a/components/openmw-mp/Packets/Player/PacketAttribute.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerAttribute.hpp @@ -2,21 +2,21 @@ // Created by koncord on 08.03.16. // -#ifndef OPENMW_PACKETATTRIBUTE_HPP -#define OPENMW_PACKETATTRIBUTE_HPP +#ifndef OPENMW_PACKETPLAYERATTRIBUTE_HPP +#define OPENMW_PACKETPLAYERATTRIBUTE_HPP #include namespace mwmp { - class PacketAttribute : public PlayerPacket + class PacketPlayerAttribute : public PlayerPacket { public: const static int AttributeCount = 8; - PacketAttribute(RakNet::RakPeerInterface *peer); + PacketPlayerAttribute(RakNet::RakPeerInterface *peer); virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send); }; } -#endif //OPENMW_PACKETATTRIBUTE_HPP +#endif //OPENMW_PACKETPLAYERATTRIBUTE_HPP diff --git a/components/openmw-mp/Packets/Player/PacketSkill.cpp b/components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp similarity index 65% rename from components/openmw-mp/Packets/Player/PacketSkill.cpp rename to components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp index 0899e981b..aeaf81fb4 100644 --- a/components/openmw-mp/Packets/Player/PacketSkill.cpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp @@ -2,19 +2,19 @@ // Created by koncord on 17.03.16. // -#include "PacketSkill.hpp" +#include "PacketPlayerSkill.hpp" #include #include using namespace mwmp; -PacketSkill::PacketSkill(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +PacketPlayerSkill::PacketPlayerSkill(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { - packetID = ID_GAME_SKILL; + packetID = ID_PLAYER_SKILL; } -void PacketSkill::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) +void PacketPlayerSkill::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) { PlayerPacket::Packet(bs, player, send); diff --git a/components/openmw-mp/Packets/Player/PacketSkill.hpp b/components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp similarity index 59% rename from components/openmw-mp/Packets/Player/PacketSkill.hpp rename to components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp index d7af6c56b..8debb7245 100644 --- a/components/openmw-mp/Packets/Player/PacketSkill.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp @@ -2,20 +2,20 @@ // Created by koncord on 17.03.16. // -#ifndef OPENMW_PACKETSKILL_HPP -#define OPENMW_PACKETSKILL_HPP +#ifndef OPENMW_PACKETPLAYERSKILL_HPP +#define OPENMW_PACKETPLAYERSKILL_HPP #include namespace mwmp { - class PacketSkill : public PlayerPacket + class PacketPlayerSkill : public PlayerPacket { public: const static int SkillCount = 27; const static int AttributeCount = 8; - PacketSkill(RakNet::RakPeerInterface *peer); + PacketPlayerSkill(RakNet::RakPeerInterface *peer); virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send); }; @@ -23,4 +23,4 @@ namespace mwmp -#endif //OPENMW_PACKETSKILL_HPP +#endif //OPENMW_PACKETPLAYERSKILL_HPP