[Server] Rename dontRead to avoidReading

pull/199/head
Koncord 8 years ago
parent 47924f5bb0
commit 1d2a6d9056

@ -32,7 +32,7 @@ bool PlayerProcessor::Process(RakNet::Packet &packet) noexcept
PlayerPacket *myPacket = Networking::get().getPlayerController()->GetPacket(packet.data[0]);
myPacket->setPlayer(player);
if(!processor.second->dontRead)
if(!processor.second->avoidReading)
myPacket->Read();
processor.second->Do(*myPacket, *player);

@ -41,8 +41,10 @@ bool WorldProcessor::Process(RakNet::Packet &packet) noexcept
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s from %s", processor.second->strPacketID.c_str(),
player->npc.mName.c_str());
myPacket->setEvent(&baseEvent);
if(!processor.second->dontRead)
if(!processor.second->avoidReading)
myPacket->Read();
processor.second->Do(*myPacket, *player, baseEvent);
return true;
}

@ -17,7 +17,7 @@ namespace mwmp
ProcessorPlayerDeath()
{
BPP_INIT(ID_PLAYER_DEATH)
dontRead = true;
avoidReading = true;
}
void Do(PlayerPacket &packet, Player &player) override

@ -16,7 +16,7 @@ namespace mwmp
ProcessorPlayerResurrect()
{
BPP_INIT(ID_PLAYER_RESURRECT)
dontRead = true;
avoidReading = true;
}
void Do(PlayerPacket &packet, Player &player) override

@ -20,7 +20,7 @@ namespace mwmp
void Do(PlayerPacket &packet, Player &player) override
{
DEBUG_PRINTF(strPacketID.c_str());
Script::Call<Script::CallbackIdentity("OnPlayerSpellbookChange")>(player.getId());
}
};

@ -7,7 +7,7 @@
#include <string>
#define BPP_INIT(packet_id) packetID = packet_id; strPacketID = #packet_id; className = typeid(this).name(); dontRead = false;
#define BPP_INIT(packet_id) packetID = packet_id; strPacketID = #packet_id; className = typeid(this).name(); avoidReading = false;
class BasePacketProcessor
{
@ -30,7 +30,7 @@ protected:
unsigned char packetID;
std::string strPacketID;
std::string className;
bool dontRead;
bool avoidReading;
};

Loading…
Cancel
Save