[General] Rename DYNAMICSTATS into STATS_DYNAMIC

This commit is contained in:
David Cernat 2017-04-16 09:00:18 +03:00
parent f64580bc10
commit 870886192b
19 changed files with 90 additions and 90 deletions

View file

@ -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);

View file

@ -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());

View file

@ -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

View file

@ -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;

View file

@ -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<Script::CallbackIdentity("OnActorDynamicStats")>(player.getId(), actorList.cell.getDescription().c_str());
//Script::Call<Script::CallbackIdentity("OnActorStatsDynamic")>(player.getId(), actorList.cell.getDescription().c_str());
}
};
}
#endif //OPENMW_PROCESSORACTORDYNAMICSTATS_HPP
#endif //OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP

View file

@ -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);
}
}
};

View file

@ -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);

View file

@ -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

View file

@ -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();
}
}
}

View file

@ -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;
}

View file

@ -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<PacketActorAnimPlay>(&packets, peer);
AddPacket<PacketActorAttack>(&packets, peer);
AddPacket<PacketActorCellChange>(&packets, peer);
AddPacket<PacketActorDynamicStats>(&packets, peer);
AddPacket<PacketActorStatsDynamic>(&packets, peer);
AddPacket<PacketActorPosition>(&packets, peer);
AddPacket<PacketActorSpeech>(&packets, peer);
}

View file

@ -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<PacketPlayerEquipment>(&packets, peer);
AddPacket<PacketPlayerAttack>(&packets, peer);
AddPacket<PacketPlayerDynamicStats>(&packets, peer);
AddPacket<PacketPlayerStatsDynamic>(&packets, peer);
AddPacket<PacketPlayerResurrect>(&packets, peer);
AddPacket<PacketPlayerDeath>(&packets, peer);

View file

@ -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,

View file

@ -1,17 +0,0 @@
#ifndef OPENMW_PACKETACTORDYNAMICSTATS_HPP
#define OPENMW_PACKETACTORDYNAMICSTATS_HPP
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
namespace mwmp
{
class PacketActorDynamicStats : public ActorPacket
{
public:
PacketActorDynamicStats(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send);
};
}
#endif //OPENMW_PACKETACTORDYNAMICSTATS_HPP

View file

@ -1,15 +1,15 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Log.hpp>
#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);

View file

@ -0,0 +1,17 @@
#ifndef OPENMW_PACKETACTORSTATSDYNAMIC_HPP
#define OPENMW_PACKETACTORSTATSDYNAMIC_HPP
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
namespace mwmp
{
class PacketActorStatsDynamic : public ActorPacket
{
public:
PacketActorStatsDynamic(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send);
};
}
#endif //OPENMW_PACKETACTORSTATSDYNAMIC_HPP

View file

@ -1,22 +0,0 @@
//
// Created by koncord on 13.01.16.
//
#ifndef OPENMW_PACKETDYNAMICSTATS_HPP
#define OPENMW_PACKETDYNAMICSTATS_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketPlayerDynamicStats : public PlayerPacket
{
public:
PacketPlayerDynamicStats(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send);
};
}
#endif //OPENMW_PACKETDYNAMICSTATS_HPP

View file

@ -2,17 +2,17 @@
// Created by koncord on 13.01.16.
//
#include "PacketPlayerDynamicStats.hpp"
#include "PacketPlayerStatsDynamic.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
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

View file

@ -0,0 +1,22 @@
//
// Created by koncord on 13.01.16.
//
#ifndef OPENMW_PACKETSTATSDYNAMIC_HPP
#define OPENMW_PACKETSTATSDYNAMIC_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketPlayerStatsDynamic : public PlayerPacket
{
public:
PacketPlayerStatsDynamic(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send);
};
}
#endif //OPENMW_PACKETSTATSDYNAMIC_HPP