Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ctrl+map click packet (GM teleport) #4239

Merged
merged 1 commit into from Nov 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/protocolgame.cpp
Expand Up @@ -614,7 +614,14 @@ void ProtocolGame::parsePacket(NetworkMessage& msg)
g_dispatcher.addTask(DISPATCHER_TASK_EXPIRATION,
[playerID = player->getID()]() { g_game.playerTurn(playerID, DIRECTION_WEST); });
break;
// case 0x73: break; // map click(?)
case 0x73:
g_dispatcher.addTask([playerID = player->getID(), pos = msg.getPosition()]() {
Player* player = g_game.getPlayerByID(playerID);
if (player && player->isAccessPlayer()) {
g_game.internalTeleport(player, pos);
}
});
break;
case 0x77:
parseEquipObject(msg);
break;
Expand Down