private static async Task OnPlayerCreate(INode node, Nuid id, INList args) { await node.SetFieldInt(id, Player.Fields.LEVEL, 1100); await node.SetFieldString(id, "nick_name", "1sadasdasd"); await node.AddHeartbeat(id, "test", 10000, 10, OnHeartbeat); await node.AddKeyValue(id, Player.Tables.QuestTable.TABLE_NAME, 1001, NList.New().Add(1).Add(TimeUtils.NowMilliseconds)); await node.AddKeyValue(id, Player.Tables.QuestTable.TABLE_NAME, 2002, NList.New().Add(2).Add(TimeUtils.NowMilliseconds)); await node.AddKeyValue(id, Player.Tables.QuestTable.TABLE_NAME, 3003, NList.New().Add(3).Add(TimeUtils.NowMilliseconds)); await node.Create("item", id, NList.New().Add(20001).Add(1)); await node.Create("item", id, NList.New().Add(20002).Add(2)); await node.Create("item", id, NList.New().Add(20003).Add(3)); await node.Create("item", id, NList.New().Add(20004).Add(4)); await node.Create("item", id, NList.New().Add(20005).Add(5)); await node.Create("item", id, NList.New().Add(20006).Add(6)); int status = await node.GetColInt(id, Player.Tables.QuestTable.TABLE_NAME, 1001, Player.Tables.QuestTable.COL_STATUS); }
private static async Task OnHeartbeat(INode node, Nuid id, INList args) { string timer_name = args.Get <string>(0); long now_ticks = args.Get <long>(1); int RemainBeatCount = args.Get <int>(2); await node.Error(string.Format("{0} beat {1}", timer_name, RemainBeatCount)); }
private static async Task OnCommand_Test(INode node, Nuid id, INList args) { Nuid target_id = args.Get <Nuid>(0); int level = await node.GetField <int>(id, "level"); level++; await node.SetField(target_id, "level", level); }
private static async Task OnCommand_Test(INode node, Nuid id, INList args) { Nuid target_id = args.Get <Nuid>(0); int level = await node.GetFieldInt(id, Player.Fields.LEVEL); level++; await node.SetFieldInt(target_id, Player.Fields.LEVEL, level); }
private async Task OnItemCreate(INode node, Nuid id, INList args) { int item_entry = args.Get <int>(0); int item_count = args.Get <int>(1); await node.SetFieldInt(id, Item.Fields.ENTRY, item_entry); await node.SetFieldInt(id, Item.Fields.COUNT, item_count); await node.AddKeyValue(id, Item.Tables.StarTable.TABLE_NAME, 1001, NList.New().Add(1)); await node.AddKeyValue(id, Item.Tables.StarTable.TABLE_NAME, 101, NList.New().Add(1)); }
private static async Task OnPlayerCreate(INode node, Nuid id, INList args) { await node.SetField(id, "level", 1100); await node.SetField(id, "nick_name", "1sadasdasd"); await node.AddHeartbeat(id, "test", 10000, 10, OnHeartbeat); await node.AddRow(id, Player.Tables.QuestTable.TABLE_NAME, NList.New().Add(1001).Add(1).Add(TimeUtils.Now)); await node.AddRow(id, Player.Tables.QuestTable.TABLE_NAME, NList.New().Add(2002).Add(2).Add(TimeUtils.Now)); await node.Create("item", id, NList.New()); }
public void Test() { NList <UserType> ulist = new NList <UserType>(); ulist.Add(new UserType() { B = 1, U = 2 }); INList <BaseType> blist = ulist; BaseType bi = blist[0]; UserType ui = ulist[0]; }
private static async Task OnLevelChange(INode node, Nuid id, INList args) { int level = await node.GetFieldInt(id, "level"); }
private static Task OnCountdown(INode node, Nuid id, INList args) { return(Task.CompletedTask); }
private Task OnSyncEntity(INode node, Nuid id, INList args) { return(Task.CompletedTask); }