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 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 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); }