Update buddy warp to new DB

This commit is contained in:
Gent S 2020-12-13 19:54:09 -05:00
parent ec23e72215
commit c8ff130b78

View File

@ -729,11 +729,12 @@ void BuddyManager::emailSend(CNSocket* sock, CNPacketData* data) {
if (pkt->iCash || pkt->aItem[0].ItemInven.iID) { if (pkt->iCash || pkt->aItem[0].ItemInven.iID) {
// if there are item or taro attachments // if there are item or taro attachments
Database::DbPlayer otherPlayerData = Database::getDbPlayerById(pkt->iTo_PCUID); Player otherPlr = {};
if (otherPlayerData.PlayerID != -1 && plr->PCStyle2.iPayzoneFlag != otherPlayerData.PayZoneFlag) { Database::getPlayer(&otherPlr, pkt->iTo_PCUID);
if (otherPlr.iID != 0 && plr->PCStyle2.iPayzoneFlag != otherPlr.PCStyle2.iPayzoneFlag) {
// if the players are not in the same time period // if the players are not in the same time period
INITSTRUCT(sP_FE2CL_REP_PC_SEND_EMAIL_FAIL, resp); INITSTRUCT(sP_FE2CL_REP_PC_SEND_EMAIL_FAIL, resp);
resp.iErrorCode = 9; //error code 9 tells the player they can't send attachments across time resp.iErrorCode = 9; // error code 9 tells the player they can't send attachments across time
resp.iTo_PCUID = pkt->iTo_PCUID; resp.iTo_PCUID = pkt->iTo_PCUID;
sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_SEND_EMAIL_FAIL, sizeof(sP_FE2CL_REP_PC_SEND_EMAIL_FAIL)); sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_SEND_EMAIL_FAIL, sizeof(sP_FE2CL_REP_PC_SEND_EMAIL_FAIL));
return; return;