diff --git a/gameserver/src/services/misc copy.zig b/gameserver/src/services/misc copy.zig deleted file mode 100644 index 2c32c36..0000000 --- a/gameserver/src/services/misc copy.zig +++ /dev/null @@ -1,42 +0,0 @@ -const std = @import("std"); -const protocol = @import("protocol"); -const Session = @import("../Session.zig"); -const Packet = @import("../Packet.zig"); - -const Allocator = std.mem.Allocator; -const CmdID = protocol.CmdID; - -const B64Decoder = std.base64.standard.Decoder; - -pub fn onPlayerHeartBeat(session: *Session, packet: *const Packet, allocator: Allocator) !void { - const req = try packet.getProto(protocol.PlayerHeartBeatCsReq, allocator); - const lua_code = - \\local function setTextComponent(path, newText) - \\ local obj = CS.UnityEngine.GameObject.Find(path) - \\ if obj then - \\ local textComponent = obj:GetComponentInChildren(typeof(CS.RPG.Client.LocalizedText)) - \\ if textComponent then - \\ textComponent.text = newText - \\ end - \\ end - \\end - \\ - \\setTextComponent("UIRoot/AboveDialog/BetaHintDialog(Clone)", "CipherSR is a free and open source software.") - \\setTextComponent("VersionText", "Visit discord.gg/reversedrooms for more info!") - ; - const data = protocol.ClientDownloadData{ - .version = 51, - .time = @intCast(std.time.milliTimestamp()), - .data = .{ .Owned = .{ - .allocator = allocator, - .str = try allocator.dupe(u8, lua_code), - } }, - }; - const rsp = protocol.PlayerHeartBeatScRsp{ - .retcode = 0, - .client_time_ms = req.client_time_ms, - .server_time_ms = @intCast(std.time.milliTimestamp()), - .download_data = data, - }; - try session.send(CmdID.CmdPlayerHeartBeatScRsp, rsp); -}