unlock more stage for operation

This commit is contained in:
Naruse
2026-04-29 00:47:21 +08:00
parent ee79486748
commit 5af23a8113
5 changed files with 111 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
using MikuSB.Database.Character;
using MikuSB.Database.Inventory;
using MikuSB.GameServer.Game.Inventory;
using MikuSB.GameServer.Game.Player;
using MikuSB.Proto;
using MikuSB.TcpSharp;
@@ -84,4 +84,33 @@ public class PacketNtfCallScript : BasePacket
proto.ExtraSync = extraSync;
SetData(proto);
}
public PacketNtfCallScript(PlayerInstance Player) : base(CmdIds.NtfScript)
{
Player.BuildPlayerAttr();
var proto = new NtfCallScript
{
Api = "",
Arg = "{}"
};
var sync = new NtfSyncPlayer();
foreach (var x in Player.Data.Attrs)
{
uint gid = x.Gid;
uint sid = x.Sid;
uint val = x.Val;
if (gid == 0)
{
sync.Custom[sid] = val;
continue;
}
sync.Custom[Player.ToPackedAttrKey(gid, sid)] = val;
sync.Custom[Player.ToShiftedAttrKey(gid, sid)] = val;
}
proto.ExtraSync = sync;
SetData(proto);
}
}