[General] Rename unused PlayerRegionChange packet into PlayerKillCount

This commit is contained in:
David Cernat 2017-06-10 12:01:37 +03:00
parent ee5c9b65c5
commit 5b23da8e1c
10 changed files with 50 additions and 52 deletions

View file

@ -121,9 +121,9 @@ set(PROCESSORS_PLAYER
processors/player/ProcessorPlayerCharGen.hpp processors/player/ProcessorPlayerDeath.hpp processors/player/ProcessorPlayerCharGen.hpp processors/player/ProcessorPlayerDeath.hpp
processors/player/ProcessorPlayerDisposition.hpp processors/player/ProcessorPlayerEquipment.hpp processors/player/ProcessorPlayerDisposition.hpp processors/player/ProcessorPlayerEquipment.hpp
processors/player/ProcessorPlayerFaction.hpp processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerFaction.hpp processors/player/ProcessorPlayerInventory.hpp
processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorPlayerKillCount.hpp
processors/player/ProcessorPlayerMap.hpp processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerMap.hpp
processors/player/ProcessorPlayerRegionChange.hpp processors/player/ProcessorPlayerRest.hpp processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerRest.hpp
processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerSkill.hpp
processors/player/ProcessorPlayerSpeech.hpp processors/player/ProcessorPlayerSpellbook.hpp processors/player/ProcessorPlayerSpeech.hpp processors/player/ProcessorPlayerSpellbook.hpp
processors/player/ProcessorPlayerStatsDynamic.hpp processors/player/ProcessorPlayerTopic.hpp processors/player/ProcessorPlayerStatsDynamic.hpp processors/player/ProcessorPlayerTopic.hpp

View file

@ -27,10 +27,10 @@
#include "processors/player/ProcessorPlayerFaction.hpp" #include "processors/player/ProcessorPlayerFaction.hpp"
#include "processors/player/ProcessorPlayerInventory.hpp" #include "processors/player/ProcessorPlayerInventory.hpp"
#include "processors/player/ProcessorPlayerJournal.hpp" #include "processors/player/ProcessorPlayerJournal.hpp"
#include "processors/player/ProcessorPlayerKillCount.hpp"
#include "processors/player/ProcessorPlayerLevel.hpp" #include "processors/player/ProcessorPlayerLevel.hpp"
#include "processors/player/ProcessorPlayerMap.hpp" #include "processors/player/ProcessorPlayerMap.hpp"
#include "processors/player/ProcessorPlayerPosition.hpp" #include "processors/player/ProcessorPlayerPosition.hpp"
#include "processors/player/ProcessorPlayerRegionChange.hpp"
#include "processors/player/ProcessorPlayerRest.hpp" #include "processors/player/ProcessorPlayerRest.hpp"
#include "processors/player/ProcessorPlayerResurrect.hpp" #include "processors/player/ProcessorPlayerResurrect.hpp"
#include "processors/player/ProcessorPlayerSkill.hpp" #include "processors/player/ProcessorPlayerSkill.hpp"
@ -94,10 +94,10 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorPlayerFaction()); PlayerProcessor::AddProcessor(new ProcessorPlayerFaction());
PlayerProcessor::AddProcessor(new ProcessorPlayerInventory()); PlayerProcessor::AddProcessor(new ProcessorPlayerInventory());
PlayerProcessor::AddProcessor(new ProcessorPlayerJournal()); PlayerProcessor::AddProcessor(new ProcessorPlayerJournal());
PlayerProcessor::AddProcessor(new ProcessorPlayerKillCount());
PlayerProcessor::AddProcessor(new ProcessorPlayerLevel()); PlayerProcessor::AddProcessor(new ProcessorPlayerLevel());
PlayerProcessor::AddProcessor(new ProcessorPlayerMap()); PlayerProcessor::AddProcessor(new ProcessorPlayerMap());
PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); PlayerProcessor::AddProcessor(new ProcessorPlayerPosition());
PlayerProcessor::AddProcessor(new ProcessorPlayerRegionChange());
PlayerProcessor::AddProcessor(new ProcessorPlayerRest()); PlayerProcessor::AddProcessor(new ProcessorPlayerRest());
PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect()); PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect());
PlayerProcessor::AddProcessor(new ProcessorPlayerSkill()); PlayerProcessor::AddProcessor(new ProcessorPlayerSkill());

View file

@ -126,7 +126,7 @@ public:
{"OnPlayerDeath", Function<void, unsigned short>()}, {"OnPlayerDeath", Function<void, unsigned short>()},
{"OnPlayerResurrect", Function<void, unsigned short>()}, {"OnPlayerResurrect", Function<void, unsigned short>()},
{"OnPlayerCellChange", Function<void, unsigned short>()}, {"OnPlayerCellChange", Function<void, unsigned short>()},
{"OnPlayerRegionChange", Function<void, unsigned short>()}, {"OnPlayerKillCount", Function<void, unsigned short>()},
{"OnPlayerAttribute", Function<void, unsigned short>()}, {"OnPlayerAttribute", Function<void, unsigned short>()},
{"OnPlayerSkill", Function<void, unsigned short>()}, {"OnPlayerSkill", Function<void, unsigned short>()},
{"OnPlayerLevel", Function<void, unsigned short>()}, {"OnPlayerLevel", Function<void, unsigned short>()},

View file

@ -0,0 +1,25 @@
#ifndef OPENMW_PROCESSORPLAYERKILLCOUNT_HPP
#define OPENMW_PROCESSORPLAYERKILLCOUNT_HPP
#include "apps/openmw-mp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerKillCount : public PlayerProcessor
{
public:
ProcessorPlayerKillCount()
{
BPP_INIT(ID_PLAYER_KILL_COUNT)
}
void Do(PlayerPacket &packet, Player &player) override
{
DEBUG_PRINTF(strPacketID.c_str());
Script::Call<Script::CallbackIdentity("OnPlayerKillCount")>(player.getId());
}
};
}
#endif //OPENMW_PROCESSORPLAYERKILLCOUNT_HPP

View file

@ -1,25 +0,0 @@
#ifndef OPENMW_PROCESSORPLAYERREGIONCHANGE_HPP
#define OPENMW_PROCESSORPLAYERREGIONCHANGE_HPP
#include "apps/openmw-mp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerRegionChange : public PlayerProcessor
{
public:
ProcessorPlayerRegionChange()
{
BPP_INIT(ID_PLAYER_REGION_CHANGE)
}
void Do(PlayerPacket &packet, Player &player) override
{
DEBUG_PRINTF(strPacketID.c_str());
Script::Call<Script::CallbackIdentity("OnPlayerRegionChange")>(player.getId());
}
};
}
#endif //OPENMW_PROCESSORPLAYERREGIONCHANGE_HPP

View file

@ -27,11 +27,11 @@
#include "../Packets/Player/PacketPlayerFaction.hpp" #include "../Packets/Player/PacketPlayerFaction.hpp"
#include "../Packets/Player/PacketPlayerInventory.hpp" #include "../Packets/Player/PacketPlayerInventory.hpp"
#include "../Packets/Player/PacketPlayerJournal.hpp" #include "../Packets/Player/PacketPlayerJournal.hpp"
#include "../Packets/Player/PacketPlayerKillCount.hpp"
#include "../Packets/Player/PacketPlayerLevel.hpp" #include "../Packets/Player/PacketPlayerLevel.hpp"
#include "../Packets/Player/PacketPlayerMap.hpp" #include "../Packets/Player/PacketPlayerMap.hpp"
#include "../Packets/Player/PacketPlayerPosition.hpp" #include "../Packets/Player/PacketPlayerPosition.hpp"
#include "../Packets/Player/PacketPlayerRegionAuthority.hpp" #include "../Packets/Player/PacketPlayerRegionAuthority.hpp"
#include "../Packets/Player/PacketPlayerRegionChange.hpp"
#include "../Packets/Player/PacketPlayerRest.hpp" #include "../Packets/Player/PacketPlayerRest.hpp"
#include "../Packets/Player/PacketPlayerResurrect.hpp" #include "../Packets/Player/PacketPlayerResurrect.hpp"
#include "../Packets/Player/PacketPlayerSkill.hpp" #include "../Packets/Player/PacketPlayerSkill.hpp"
@ -78,11 +78,11 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
AddPacket<PacketPlayerFaction>(&packets, peer); AddPacket<PacketPlayerFaction>(&packets, peer);
AddPacket<PacketPlayerInventory>(&packets, peer); AddPacket<PacketPlayerInventory>(&packets, peer);
AddPacket<PacketPlayerJournal>(&packets, peer); AddPacket<PacketPlayerJournal>(&packets, peer);
AddPacket<PacketPlayerKillCount>(&packets, peer);
AddPacket<PacketPlayerLevel>(&packets, peer); AddPacket<PacketPlayerLevel>(&packets, peer);
AddPacket<PacketPlayerMap>(&packets, peer); AddPacket<PacketPlayerMap>(&packets, peer);
AddPacket<PacketPlayerPosition>(&packets, peer); AddPacket<PacketPlayerPosition>(&packets, peer);
AddPacket<PacketPlayerRegionAuthority>(&packets, peer); AddPacket<PacketPlayerRegionAuthority>(&packets, peer);
AddPacket<PacketPlayerRegionChange>(&packets, peer);
AddPacket<PacketPlayerRest>(&packets, peer); AddPacket<PacketPlayerRest>(&packets, peer);
AddPacket<PacketPlayerResurrect>(&packets, peer); AddPacket<PacketPlayerResurrect>(&packets, peer);
AddPacket<PacketPlayerSkill>(&packets, peer); AddPacket<PacketPlayerSkill>(&packets, peer);

View file

@ -39,11 +39,11 @@ enum GameMessages
ID_PLAYER_FACTION, ID_PLAYER_FACTION,
ID_PLAYER_INVENTORY, ID_PLAYER_INVENTORY,
ID_PLAYER_JOURNAL, ID_PLAYER_JOURNAL,
ID_PLAYER_KILL_COUNT,
ID_PLAYER_LEVEL, ID_PLAYER_LEVEL,
ID_PLAYER_MAP, ID_PLAYER_MAP,
ID_PLAYER_POSITION, ID_PLAYER_POSITION,
ID_PLAYER_REGION_AUTHORITY, ID_PLAYER_REGION_AUTHORITY,
ID_PLAYER_REGION_CHANGE,
ID_PLAYER_RESURRECT, ID_PLAYER_RESURRECT,
ID_PLAYER_REST, ID_PLAYER_REST,
ID_PLAYER_SKILL, ID_PLAYER_SKILL,

View file

@ -0,0 +1,14 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketPlayerKillCount.hpp"
mwmp::PacketPlayerKillCount::PacketPlayerKillCount(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_PLAYER_KILL_COUNT;
}
void mwmp::PacketPlayerKillCount::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
// Placeholder to be filled in later
}

View file

@ -5,10 +5,10 @@
namespace mwmp namespace mwmp
{ {
class PacketPlayerRegionChange : public PlayerPacket class PacketPlayerKillCount : public PlayerPacket
{ {
public: public:
PacketPlayerRegionChange(RakNet::RakPeerInterface *peer); PacketPlayerKillCount(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, bool send); virtual void Packet(RakNet::BitStream *bs, bool send);
}; };

View file

@ -1,16 +0,0 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketPlayerRegionChange.hpp"
mwmp::PacketPlayerRegionChange::PacketPlayerRegionChange(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_PLAYER_REGION_CHANGE;
priority = IMMEDIATE_PRIORITY;
reliability = RELIABLE_ORDERED;
}
void mwmp::PacketPlayerRegionChange::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
// Placeholder to be filled in later
}