diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 0d9173216..7e10d0bc2 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -241,7 +241,7 @@ void Networking::update(RakNet::Packet *packet) void Networking::newPlayer(RakNet::RakNetGUID guid) { playerPacketController->GetPacket(ID_PLAYER_BASEINFO)->RequestData(guid); - playerPacketController->GetPacket(ID_PLAYER_DYNAMICSTATS)->RequestData(guid); + playerPacketController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->RequestData(guid); playerPacketController->GetPacket(ID_PLAYER_POS)->RequestData(guid); playerPacketController->GetPacket(ID_PLAYER_CELL_CHANGE)->RequestData(guid); playerPacketController->GetPacket(ID_PLAYER_EQUIPMENT)->RequestData(guid); @@ -263,7 +263,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) else if (pl->second->getLoadState() == Player::POSTLOADED) { playerPacketController->GetPacket(ID_PLAYER_BASEINFO)->setPlayer(pl->second); - playerPacketController->GetPacket(ID_PLAYER_DYNAMICSTATS)->setPlayer(pl->second); + playerPacketController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_ATTRIBUTE)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_SKILL)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_POS)->setPlayer(pl->second); @@ -271,7 +271,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) playerPacketController->GetPacket(ID_PLAYER_EQUIPMENT)->setPlayer(pl->second); playerPacketController->GetPacket(ID_PLAYER_BASEINFO)->Send(guid); - playerPacketController->GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(guid); + playerPacketController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_SKILL)->Send(guid); playerPacketController->GetPacket(ID_PLAYER_POS)->Send(guid); diff --git a/apps/openmw-mp/ProcessorInitializer.cpp b/apps/openmw-mp/ProcessorInitializer.cpp index dd6e851d0..8e0979dbb 100644 --- a/apps/openmw-mp/ProcessorInitializer.cpp +++ b/apps/openmw-mp/ProcessorInitializer.cpp @@ -16,7 +16,7 @@ #include "processors/player/ProcessorPlayerSpellbook.hpp" #include "processors/player/ProcessorPlayerJournal.hpp" #include "processors/player/ProcessorPlayerAttack.hpp" -#include "processors/player/ProcessorPlayerDynamicStats.hpp" +#include "processors/player/ProcessorPlayerStatsDynamic.hpp" #include "processors/player/ProcessorPlayerDeath.hpp" #include "processors/player/ProcessorPlayerResurrect.hpp" #include "processors/player/ProcessorPlayerAnimFlags.hpp" @@ -32,7 +32,7 @@ #include "processors/actor/ProcessorActorAnimPlay.hpp" #include "processors/actor/ProcessorActorAttack.hpp" #include "processors/actor/ProcessorActorCellChange.hpp" -#include "processors/actor/ProcessorActorDynamicStats.hpp" +#include "processors/actor/ProcessorActorStatsDynamic.hpp" #include "processors/actor/ProcessorActorPosition.hpp" #include "processors/actor/ProcessorActorSpeech.hpp" #include "WorldProcessor.hpp" @@ -69,7 +69,7 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorPlayerSpellbook()); PlayerProcessor::AddProcessor(new ProcessorPlayerJournal()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttack()); - PlayerProcessor::AddProcessor(new ProcessorPlayerDynamicStats()); + PlayerProcessor::AddProcessor(new ProcessorPlayerStatsDynamic()); PlayerProcessor::AddProcessor(new ProcessorPlayerDeath()); PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect()); PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags()); @@ -84,7 +84,7 @@ void ProcessorInitializer() ActorProcessor::AddProcessor(new ProcessorActorAnimPlay()); ActorProcessor::AddProcessor(new ProcessorActorAttack()); ActorProcessor::AddProcessor(new ProcessorActorCellChange()); - ActorProcessor::AddProcessor(new ProcessorActorDynamicStats()); + ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic()); ActorProcessor::AddProcessor(new ProcessorActorPosition()); ActorProcessor::AddProcessor(new ProcessorActorSpeech()); ActorProcessor::AddProcessor(new ProcessorActorTest()); diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index 663cd9869..43332b79e 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -472,14 +472,14 @@ void StatsFunctions::SendBaseInfo(unsigned short pid) noexcept mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_BASEINFO)->Send(true); } -void StatsFunctions::SendDynamicStats(unsigned short pid) noexcept +void StatsFunctions::SendStatsDynamic(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, ); - mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_DYNAMICSTATS)->setPlayer(player); - mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(false); - mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(true); + mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(player); + mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(false); + mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(true); } void StatsFunctions::SendAttributes(unsigned short pid) noexcept diff --git a/apps/openmw-mp/Script/Functions/Stats.hpp b/apps/openmw-mp/Script/Functions/Stats.hpp index b08980362..421a36293 100644 --- a/apps/openmw-mp/Script/Functions/Stats.hpp +++ b/apps/openmw-mp/Script/Functions/Stats.hpp @@ -70,7 +70,7 @@ {"Resurrect", StatsFunctions::Resurrect},\ {"SendBaseInfo", StatsFunctions::SendBaseInfo},\ \ - {"SendDynamicStats", StatsFunctions::SendDynamicStats},\ + {"SendStatsDynamic", StatsFunctions::SendStatsDynamic},\ {"SendAttributes", StatsFunctions::SendAttributes},\ {"SendSkills", StatsFunctions::SendSkills},\ {"SendLevel", StatsFunctions::SendLevel} @@ -142,7 +142,7 @@ public: static void SetCharGenStage(unsigned short pid, int start, int end) noexcept; static void SendBaseInfo(unsigned short pid) noexcept; - static void SendDynamicStats(unsigned short pid) noexcept; + static void SendStatsDynamic(unsigned short pid) noexcept; static void SendAttributes(unsigned short pid) noexcept; static void SendSkills(unsigned short pid) noexcept; static void SendLevel(unsigned short pid) noexcept; diff --git a/apps/openmw-mp/processors/actor/ProcessorActorDynamicStats.hpp b/apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp similarity index 53% rename from apps/openmw-mp/processors/actor/ProcessorActorDynamicStats.hpp rename to apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp index cbdf7b3f7..b0f4f3e44 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorDynamicStats.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp @@ -1,16 +1,16 @@ -#ifndef OPENMW_PROCESSORACTORDYNAMICSTATS_HPP -#define OPENMW_PROCESSORACTORDYNAMICSTATS_HPP +#ifndef OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP +#define OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP #include "apps/openmw-mp/ActorProcessor.hpp" namespace mwmp { - class ProcessorActorDynamicStats : public ActorProcessor + class ProcessorActorStatsDynamic : public ActorProcessor { public: - ProcessorActorDynamicStats() + ProcessorActorStatsDynamic() { - BPP_INIT(ID_ACTOR_DYNAMICSTATS) + BPP_INIT(ID_ACTOR_STATS_DYNAMIC) } void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override @@ -21,9 +21,9 @@ namespace mwmp if (serverCell != nullptr) serverCell->sendToLoaded(&packet, &actorList); - //Script::Call(player.getId(), actorList.cell.getDescription().c_str()); + //Script::Call(player.getId(), actorList.cell.getDescription().c_str()); } }; } -#endif //OPENMW_PROCESSORACTORDYNAMICSTATS_HPP +#endif //OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp index c074028c3..430f2f0fe 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp @@ -46,7 +46,7 @@ namespace mwmp //packet.Send(player, true); player.sendToLoaded(&packet); - playerController->GetPacket(ID_PLAYER_DYNAMICSTATS)->RequestData(player.attack.target); + playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->RequestData(player.attack.target); } } }; diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp index d75b7b6ee..52cdd0df4 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp @@ -41,27 +41,27 @@ namespace mwmp { LOG_APPEND(Log::LOG_INFO, "- Started information exchange with %s", other->npc.mName.c_str()); - playerController->GetPacket(ID_PLAYER_DYNAMICSTATS)->setPlayer(other); + playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(other); playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->setPlayer(other); playerController->GetPacket(ID_PLAYER_POS)->setPlayer(other); playerController->GetPacket(ID_PLAYER_SKILL)->setPlayer(other); playerController->GetPacket(ID_PLAYER_EQUIPMENT)->setPlayer(other); playerController->GetPacket(ID_PLAYER_ANIM_FLAGS)->setPlayer(other); - playerController->GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(pl->guid); + playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_POS)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_SKILL)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_EQUIPMENT)->Send(pl->guid); playerController->GetPacket(ID_PLAYER_ANIM_FLAGS)->Send(pl->guid); - playerController->GetPacket(ID_PLAYER_DYNAMICSTATS)->setPlayer(pl); + playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(pl); playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->setPlayer(pl); playerController->GetPacket(ID_PLAYER_SKILL)->setPlayer(pl); playerController->GetPacket(ID_PLAYER_EQUIPMENT)->setPlayer(pl); playerController->GetPacket(ID_PLAYER_ANIM_FLAGS)->setPlayer(pl); - playerController->GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(other->guid); + playerController->GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(other->guid); playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(other->guid); playerController->GetPacket(ID_PLAYER_SKILL)->Send(other->guid); playerController->GetPacket(ID_PLAYER_EQUIPMENT)->Send(other->guid); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerDynamicStats.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp similarity index 53% rename from apps/openmw-mp/processors/player/ProcessorPlayerDynamicStats.hpp rename to apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp index 3a3e6c58d..443656d05 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerDynamicStats.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp @@ -2,20 +2,20 @@ // Created by koncord on 01.04.17. // -#ifndef OPENMW_PROCESSORPLAYERDYNAMICSTATS_HPP -#define OPENMW_PROCESSORPLAYERDYNAMICSTATS_HPP +#ifndef OPENMW_PROCESSORPLAYERSTATS_DYNAMIC_HPP +#define OPENMW_PROCESSORPLAYERSTATS_DYNAMIC_HPP #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp { - class ProcessorPlayerDynamicStats : public PlayerProcessor + class ProcessorPlayerStatsDynamic : public PlayerProcessor { public: - ProcessorPlayerDynamicStats() + ProcessorPlayerStatsDynamic() { - BPP_INIT(ID_PLAYER_DYNAMICSTATS) + BPP_INIT(ID_PLAYER_STATS_DYNAMIC) } void Do(PlayerPacket &packet, Player &player) override @@ -28,4 +28,4 @@ namespace mwmp } -#endif //OPENMW_PROCESSORPLAYERDYNAMICSTATS_HPP +#endif //OPENMW_PROCESSORPLAYERSTATS_DYNAMIC_HPP diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 32c99d880..564913052 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -195,8 +195,8 @@ void LocalPlayer::updateDynamicStats(bool forceUpdate) timer = 0; - getNetworking()->getPlayerPacket(ID_PLAYER_DYNAMICSTATS)->setPlayer(this); - getNetworking()->getPlayerPacket(ID_PLAYER_DYNAMICSTATS)->Send(); + getNetworking()->getPlayerPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(this); + getNetworking()->getPlayerPacket(ID_PLAYER_STATS_DYNAMIC)->Send(); } } } diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index a69007f1d..021325207 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -498,7 +498,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) } break; } - case ID_PLAYER_DYNAMICSTATS: + case ID_PLAYER_STATS_DYNAMIC: { if (guid == myGuid) { @@ -577,8 +577,8 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) myPacket->Send(serverAddr); getLocalPlayer()->updateDynamicStats(true); - playerPacketController.GetPacket(ID_PLAYER_DYNAMICSTATS)->setPlayer(getLocalPlayer()); - playerPacketController.GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(serverAddr); + playerPacketController.GetPacket(ID_PLAYER_STATS_DYNAMIC)->setPlayer(getLocalPlayer()); + playerPacketController.GetPacket(ID_PLAYER_STATS_DYNAMIC)->Send(serverAddr); } else if (pl != 0) { @@ -891,7 +891,7 @@ void Networking::processActorPacket(RakNet::Packet *packet) { break; } - case ID_ACTOR_DYNAMICSTATS: + case ID_ACTOR_STATS_DYNAMIC: { break; } diff --git a/components/openmw-mp/Controllers/ActorPacketController.cpp b/components/openmw-mp/Controllers/ActorPacketController.cpp index 8b0383417..40adc1402 100644 --- a/components/openmw-mp/Controllers/ActorPacketController.cpp +++ b/components/openmw-mp/Controllers/ActorPacketController.cpp @@ -9,7 +9,7 @@ #include "../Packets/Actor/PacketActorAnimPlay.hpp" #include "../Packets/Actor/PacketActorAttack.hpp" #include "../Packets/Actor/PacketActorCellChange.hpp" -#include "../Packets/Actor/PacketActorDynamicStats.hpp" +#include "../Packets/Actor/PacketActorStatsDynamic.hpp" #include "../Packets/Actor/PacketActorPosition.hpp" #include "../Packets/Actor/PacketActorSpeech.hpp" @@ -33,7 +33,7 @@ mwmp::ActorPacketController::ActorPacketController(RakNet::RakPeerInterface *pee 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/Controllers/PlayerPacketController.cpp b/components/openmw-mp/Controllers/PlayerPacketController.cpp index 258559441..4445387c3 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -9,7 +9,7 @@ #include "../Packets/Player/PacketPlayerBaseInfo.hpp" #include "../Packets/Player/PacketPlayerEquipment.hpp" #include "../Packets/Player/PacketPlayerAttack.hpp" -#include "../Packets/Player/PacketPlayerDynamicStats.hpp" +#include "../Packets/Player/PacketPlayerStatsDynamic.hpp" #include "../Packets/Player/PacketPlayerResurrect.hpp" #include "../Packets/Player/PacketPlayerDeath.hpp" #include "../Packets/Player/PacketSendMyID.hpp" @@ -50,7 +50,7 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p 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 c03e356bc..e1035f673 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -13,7 +13,7 @@ enum GameMessages ID_PLAYER_BASEINFO, ID_PLAYER_CHARGEN, ID_PLAYER_POS, - ID_PLAYER_DYNAMICSTATS, + ID_PLAYER_STATS_DYNAMIC, ID_PLAYER_ATTACK, ID_USER_MYID, ID_PLAYER_EQUIPMENT, @@ -46,7 +46,7 @@ enum GameMessages ID_ACTOR_ATTACK, ID_ACTOR_CELL_CHANGE, ID_ACTOR_ANIM_FLAGS, - ID_ACTOR_DYNAMICSTATS, + ID_ACTOR_STATS_DYNAMIC, ID_ACTOR_POSITION, ID_ACTOR_SPEECH, diff --git a/components/openmw-mp/Packets/Actor/PacketActorDynamicStats.hpp b/components/openmw-mp/Packets/Actor/PacketActorDynamicStats.hpp deleted file mode 100644 index 72437a87c..000000000 --- a/components/openmw-mp/Packets/Actor/PacketActorDynamicStats.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETACTORDYNAMICSTATS_HPP -#define OPENMW_PACKETACTORDYNAMICSTATS_HPP - -#include - -namespace mwmp -{ - class PacketActorDynamicStats : public ActorPacket - { - public: - PacketActorDynamicStats(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, bool send); - }; -} - -#endif //OPENMW_PACKETACTORDYNAMICSTATS_HPP diff --git a/components/openmw-mp/Packets/Actor/PacketActorDynamicStats.cpp b/components/openmw-mp/Packets/Actor/PacketActorStatsDynamic.cpp similarity index 82% rename from components/openmw-mp/Packets/Actor/PacketActorDynamicStats.cpp rename to components/openmw-mp/Packets/Actor/PacketActorStatsDynamic.cpp index a1bcc7688..aaedd198b 100644 --- a/components/openmw-mp/Packets/Actor/PacketActorDynamicStats.cpp +++ b/components/openmw-mp/Packets/Actor/PacketActorStatsDynamic.cpp @@ -1,15 +1,15 @@ #include #include -#include "PacketActorDynamicStats.hpp" +#include "PacketActorStatsDynamic.hpp" using namespace mwmp; -PacketActorDynamicStats::PacketActorDynamicStats(RakNet::RakPeerInterface *peer) : ActorPacket(peer) +PacketActorStatsDynamic::PacketActorStatsDynamic(RakNet::RakPeerInterface *peer) : ActorPacket(peer) { - packetID = ID_ACTOR_DYNAMICSTATS; + packetID = ID_ACTOR_STATS_DYNAMIC; } -void PacketActorDynamicStats::Packet(RakNet::BitStream *bs, bool send) +void PacketActorStatsDynamic::Packet(RakNet::BitStream *bs, bool send) { ActorPacket::Packet(bs, send); diff --git a/components/openmw-mp/Packets/Actor/PacketActorStatsDynamic.hpp b/components/openmw-mp/Packets/Actor/PacketActorStatsDynamic.hpp new file mode 100644 index 000000000..87ac674b8 --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorStatsDynamic.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETACTORSTATSDYNAMIC_HPP +#define OPENMW_PACKETACTORSTATSDYNAMIC_HPP + +#include + +namespace mwmp +{ + class PacketActorStatsDynamic : public ActorPacket + { + public: + PacketActorStatsDynamic(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETACTORSTATSDYNAMIC_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.hpp b/components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.hpp deleted file mode 100644 index 9d608e6d8..000000000 --- a/components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// -// Created by koncord on 13.01.16. -// - -#ifndef OPENMW_PACKETDYNAMICSTATS_HPP -#define OPENMW_PACKETDYNAMICSTATS_HPP - - -#include - -namespace mwmp -{ - class PacketPlayerDynamicStats : public PlayerPacket - { - public: - PacketPlayerDynamicStats(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, bool send); - }; -} - -#endif //OPENMW_PACKETDYNAMICSTATS_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.cpp b/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.cpp similarity index 65% rename from components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.cpp rename to components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.cpp index d9f282961..86e3c2d3b 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.cpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.cpp @@ -2,17 +2,17 @@ // Created by koncord on 13.01.16. // -#include "PacketPlayerDynamicStats.hpp" +#include "PacketPlayerStatsDynamic.hpp" #include using namespace mwmp; -PacketPlayerDynamicStats::PacketPlayerDynamicStats(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +PacketPlayerStatsDynamic::PacketPlayerStatsDynamic(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { - packetID = ID_PLAYER_DYNAMICSTATS; + packetID = ID_PLAYER_STATS_DYNAMIC; } -void PacketPlayerDynamicStats::Packet(RakNet::BitStream *bs, bool send) +void PacketPlayerStatsDynamic::Packet(RakNet::BitStream *bs, bool send) { PlayerPacket::Packet(bs, send); RW(player->creatureStats.mDynamic[0], send); // health diff --git a/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp b/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp new file mode 100644 index 000000000..37543614e --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp @@ -0,0 +1,22 @@ +// +// Created by koncord on 13.01.16. +// + +#ifndef OPENMW_PACKETSTATSDYNAMIC_HPP +#define OPENMW_PACKETSTATSDYNAMIC_HPP + + +#include + +namespace mwmp +{ + class PacketPlayerStatsDynamic : public PlayerPacket + { + public: + PacketPlayerStatsDynamic(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETSTATSDYNAMIC_HPP