This commit is contained in:
lenheart
2024-10-02 21:00:21 +08:00
parent 7f547f5fd4
commit 2d6e633410
16 changed files with 736 additions and 36 deletions

View File

@@ -45,7 +45,6 @@ class ServerControl {
}
constructor() {
//分发来自网关的包
GatewaySocketPackFuncMap.rawset(20240730, function(Jso) {
local UserList = [];
@@ -75,9 +74,25 @@ class ServerControl {
}
}
}.bindenv(this));
//给频道所有玩家分发网关的包
GatewaySocketPackFuncMap.rawset(20240806, function(Jso) {
Jso.op <- Jso.realop;
local Str = Json.Encode(Jso);
Str = removeBackslashes(Str);
local Pack = Packet();
Pack.Put_Header(1, 130);
Pack.Put_Byte(1);
Pack.Put_Int(Str.len());
Pack.Put_Binary(Str);
Pack.Finalize(true);
World.SendAll(Pack);
Pack.Delete();
}.bindenv(this));
//给查询指定uid cid列表的玩家信息
GatewaySocketPackFuncMap.rawset(2023101902, function(Jso) {
local UserList = [];
@@ -172,6 +187,7 @@ class ServerControl {
Cb_Use_Item_Sp_Func[ItemId] <- function(SUser, ItemId) {
local T = {
op = RealOp,
itemId = ItemId,
uid = SUser.GetUID(),
cid = SUser.GetCID()
};
@@ -246,6 +262,14 @@ class ServerControl {
}
});
//给指定玩家下发邮件
GatewaySocketPackFuncMap.rawset(20240928, function(Jso) {
local UID = Jso.uid;
local CID = Jso.cid;
User.SendItemMail(UID, CID, Jso.result, Jso.title, Jso.content);
});
//给指定队伍设置复活币数量
GatewaySocketPackFuncMap.rawset(20240804, function(Jso) {
local UID = Jso.uid;
@@ -396,8 +420,8 @@ class ServerControl {
//给注册玩家通关副本
GatewaySocketPackFuncMap.rawset(2023110704, function(Jso) {
local RealOp = Jso.realop;
Cb_BossDie_Func[RealOp] <- function(SUser) {
local PartyObj = SUser.GetParty();
Cb_ClearDungeon_Enter_Func[RealOp] <- function(arg) {
local PartyObj = Party(arg[0]);
if (PartyObj) {
local Bfobj = PartyObj.GetBattleField();
local DgnObj = Bfobj.GetDgn();