mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-25 14:30:14 +00:00
Cleanup indentation. (#10)
This commit is contained in:
parent
7b085e9c8b
commit
e044b4251a
@ -45,7 +45,7 @@ enum SHARDPACKETID {
|
||||
P_FE2CL_NPC_EXIT = 822083596,
|
||||
P_FE2CL_ANNOUNCE_MSG = 822083778,
|
||||
P_FE2CL_GM_REP_PC_SET_VALUE = 822083781,
|
||||
P_FE2CL_REP_SEND_FREECHAT_MESSAGE_SUCC = 822083602,
|
||||
P_FE2CL_REP_SEND_FREECHAT_MESSAGE_SUCC = 822083602,
|
||||
P_FE2CL_REP_PC_AVATAR_EMOTES_CHAT = 822083730,
|
||||
P_FE2CL_REP_PC_EXIT_SUCC = 822083589,
|
||||
P_FE2CL_PC_MOTD_LOGIN = 822083793
|
||||
|
@ -35,9 +35,9 @@ uint64_t getTime();
|
||||
#define CNPROTO_VERSION_0104
|
||||
|
||||
#if defined(CNPROTO_VERSION_0104)
|
||||
#include "structs/0104.hpp"
|
||||
#include "structs/0104.hpp"
|
||||
#elif defined(CNPROTO_VERSION_0728)
|
||||
#include "structs/0728.hpp"
|
||||
#include "structs/0728.hpp"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,20 +4,20 @@
|
||||
#include "PlayerManager.hpp"
|
||||
|
||||
void NanoManager::init() {
|
||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_NANO_ACTIVE, nanoSummonHandler);
|
||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_NANO_ACTIVE, nanoSummonHandler);
|
||||
}
|
||||
|
||||
void NanoManager::nanoSummonHandler(CNSocket* sock, CNPacketData* data) {
|
||||
if (data->size != sizeof(sP_CL2FE_REQ_NANO_ACTIVE))
|
||||
if (data->size != sizeof(sP_CL2FE_REQ_NANO_ACTIVE))
|
||||
return; // malformed packet
|
||||
|
||||
sP_CL2FE_REQ_NANO_ACTIVE* nano = (sP_CL2FE_REQ_NANO_ACTIVE*)data->buf;
|
||||
PlayerView plr = PlayerManager::players[sock];
|
||||
sP_CL2FE_REQ_NANO_ACTIVE* nano = (sP_CL2FE_REQ_NANO_ACTIVE*)data->buf;
|
||||
PlayerView plr = PlayerManager::players[sock];
|
||||
|
||||
// Send to client
|
||||
sP_FE2CL_REP_NANO_ACTIVE_SUCC* resp = (sP_FE2CL_REP_NANO_ACTIVE_SUCC*)xmalloc(sizeof(sP_FE2CL_REP_NANO_ACTIVE_SUCC));
|
||||
resp->iActiveNanoSlotNum = nano->iNanoSlotNum;
|
||||
sock->sendPacket(new CNPacketData((void*)resp, P_FE2CL_REP_NANO_ACTIVE_SUCC, sizeof(sP_FE2CL_REP_NANO_ACTIVE_SUCC), sock->getFEKey()));
|
||||
// Send to client
|
||||
sP_FE2CL_REP_NANO_ACTIVE_SUCC* resp = (sP_FE2CL_REP_NANO_ACTIVE_SUCC*)xmalloc(sizeof(sP_FE2CL_REP_NANO_ACTIVE_SUCC));
|
||||
resp->iActiveNanoSlotNum = nano->iNanoSlotNum;
|
||||
sock->sendPacket(new CNPacketData((void*)resp, P_FE2CL_REP_NANO_ACTIVE_SUCC, sizeof(sP_FE2CL_REP_NANO_ACTIVE_SUCC), sock->getFEKey()));
|
||||
|
||||
std::cout << U16toU8(plr.plr.PCStyle.szFirstName) << U16toU8(plr.plr.PCStyle.szLastName) << " requested to summon nano slot: " << nano->iNanoSlotNum << std::endl;
|
||||
std::cout << U16toU8(plr.plr.PCStyle.szFirstName) << U16toU8(plr.plr.PCStyle.szLastName) << " requested to summon nano slot: " << nano->iNanoSlotNum << std::endl;
|
||||
}
|
Loading…
Reference in New Issue
Block a user