public static async ETTask <Invite> CreateInvite(this InviteComponent self, InviteData inviteData) { Invite invite = ComponentFactory.CreateWithId <Invite>(IdGenerater.GenerateId()); invite.SetData(inviteData); self._Create(invite); await self.MemorySync.Create(invite); return(invite); }
private static void OnCreated(this InviteComponent self, long id) { //if (self.MemorySync.IsMine(id)) // return; var invite = self.MemorySync.Get <Invite>(id); if (invite == null) { // GG跑到這邊表示有問題 Log.Error($"Invite[{id}] is missing!"); } else { self._Create(invite); } }