mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-21 19:40:39 +00:00
Fix a few GM issues
* Invert access check when kicking players * Add validation to ensure only GMs can PVP * Account for instance in /teleport2me
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user