mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Compare commits
1 Commits
4e0db77c9d
...
c354c526b2
Author | SHA1 | Date | |
---|---|---|---|
|
c354c526b2 |
@ -186,36 +186,6 @@ static void tradeOfferRefusal(CNSocket* sock, CNPacketData* data) {
|
|||||||
otherSock->sendPacket((void*)&resp, P_FE2CL_REP_PC_TRADE_OFFER_REFUSAL, sizeof(sP_FE2CL_REP_PC_TRADE_OFFER_REFUSAL));
|
otherSock->sendPacket((void*)&resp, P_FE2CL_REP_PC_TRADE_OFFER_REFUSAL, sizeof(sP_FE2CL_REP_PC_TRADE_OFFER_REFUSAL));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tradeOfferCancel(CNSocket* sock, CNPacketData* data) {
|
|
||||||
sP_CL2FE_REQ_PC_TRADE_OFFER_CANCEL* pacdat = (sP_CL2FE_REQ_PC_TRADE_OFFER_CANCEL*)data->buf;
|
|
||||||
|
|
||||||
CNSocket* otherSock = PlayerManager::getSockFromID(pacdat->iID_From);
|
|
||||||
|
|
||||||
if (otherSock == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
INITSTRUCT(sP_FE2CL_REP_PC_TRADE_OFFER_CANCEL, resp);
|
|
||||||
resp.iID_Request = pacdat->iID_Request;
|
|
||||||
resp.iID_From = pacdat->iID_From;
|
|
||||||
resp.iID_To = pacdat->iID_To;
|
|
||||||
otherSock->sendPacket((void*)&resp, P_FE2CL_REP_PC_TRADE_OFFER_CANCEL, sizeof(sP_FE2CL_REP_PC_TRADE_OFFER_CANCEL));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void tradeOfferAbort(CNSocket* sock, CNPacketData* data) {
|
|
||||||
sP_CL2FE_REQ_PC_TRADE_OFFER_ABORT* pacdat = (sP_CL2FE_REQ_PC_TRADE_OFFER_ABORT*)data->buf;
|
|
||||||
|
|
||||||
CNSocket* otherSock = PlayerManager::getSockFromID(pacdat->iID_From);
|
|
||||||
|
|
||||||
if (otherSock == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
INITSTRUCT(sP_FE2CL_REP_PC_TRADE_OFFER_ABORT, resp);
|
|
||||||
resp.iID_Request = pacdat->iID_Request;
|
|
||||||
resp.iID_From = pacdat->iID_From;
|
|
||||||
resp.iID_To = pacdat->iID_To;
|
|
||||||
otherSock->sendPacket((void*)&resp, P_FE2CL_REP_PC_TRADE_OFFER_ABORT, sizeof(sP_FE2CL_REP_PC_TRADE_OFFER_ABORT));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void tradeConfirm(CNSocket* sock, CNPacketData* data) {
|
static void tradeConfirm(CNSocket* sock, CNPacketData* data) {
|
||||||
sP_CL2FE_REQ_PC_TRADE_CONFIRM* pacdat = (sP_CL2FE_REQ_PC_TRADE_CONFIRM*)data->buf;
|
sP_CL2FE_REQ_PC_TRADE_CONFIRM* pacdat = (sP_CL2FE_REQ_PC_TRADE_CONFIRM*)data->buf;
|
||||||
|
|
||||||
@ -460,8 +430,6 @@ void Trading::init() {
|
|||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER, tradeOffer);
|
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER, tradeOffer);
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER_ACCEPT, tradeOfferAccept);
|
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER_ACCEPT, tradeOfferAccept);
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER_REFUSAL, tradeOfferRefusal);
|
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER_REFUSAL, tradeOfferRefusal);
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER_CANCEL, tradeOfferCancel);
|
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_OFFER_ABORT, tradeOfferAbort);
|
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_CONFIRM, tradeConfirm);
|
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_CONFIRM, tradeConfirm);
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_CONFIRM_CANCEL, tradeConfirmCancel);
|
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_CONFIRM_CANCEL, tradeConfirmCancel);
|
||||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_ITEM_REGISTER, tradeRegisterItem);
|
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_TRADE_ITEM_REGISTER, tradeRegisterItem);
|
||||||
|
Loading…
Reference in New Issue
Block a user