forgottenserver/data/scripts/network/bug_report.lua
Ranieri Althoff cf1c4856d7
Move player bug report to Lua (#4768)
Co-authored-by: Xmish <95135755+xmish@users.noreply.github.com>
2024-07-16 16:17:05 +02:00

20 lines
415 B
Lua

local handler = PacketHandler(0xE6)
local BUG_CATEGORY_MAP = 0
local BUG_CATEGORY_TYPO = 1
local BUG_CATEGORY_TECHNICAL = 2
local BUG_CATEGORY_OTHER = 3
function handler.onReceive(player, msg)
local category = msg:getByte()
local message = msg:getString()
local position
if category == BUG_CATEGORY_MAP then
position = msg:getPosition()
end
player:onReportBug(message, position)
end
handler:register()