diff --git a/src/MobManager.cpp b/src/MobManager.cpp index c1c21aa..ec267ae 100644 --- a/src/MobManager.cpp +++ b/src/MobManager.cpp @@ -1048,6 +1048,10 @@ void MobManager::pcAttackChars(CNSocket *sock, CNPacketData *data) { sP_CL2FE_REQ_PC_ATTACK_CHARs* pkt = (sP_CL2FE_REQ_PC_ATTACK_CHARs*)data->buf; Player *plr = PlayerManager::getPlayer(sock); + // only GMs can use this this variant + if (plr->accountLevel > 30) + return; + // Unlike the attack mob packet, attacking players packet has an 8-byte trail (Instead of 4 bytes). if (!validInVarPacket(sizeof(sP_CL2FE_REQ_PC_ATTACK_CHARs), pkt->iTargetCnt, sizeof(int32_t) * 2, data->size)) { std::cout << "[WARN] bad sP_CL2FE_REQ_PC_ATTACK_CHARs packet size\n"; diff --git a/src/PlayerManager.cpp b/src/PlayerManager.cpp index 84191b8..203b171 100644 --- a/src/PlayerManager.cpp +++ b/src/PlayerManager.cpp @@ -1067,7 +1067,7 @@ void PlayerManager::kickPlayer(CNSocket *sock, CNPacketData *data) { Player *otherPlr = getPlayer(otherSock); - if (otherPlr->accountLevel > plr->accountLevel) { + if (plr->accountLevel > otherPlr->accountLevel) { ChatManager::sendServerMessage(sock, "player has higher access level"); return; } @@ -1131,7 +1131,7 @@ void PlayerManager::teleportPlayer(CNSocket *sock, CNPacketData *data) { switch (req->eTeleportType) { case eCN_GM_TeleportMapType__MyLocation: - sendPlayerTo(targetSock, plr->x, plr->y, plr->z); + sendPlayerTo(targetSock, plr->x, plr->y, plr->z, instance); break; case eCN_GM_TeleportMapType__MapXYZ: instance = req->iToMap;