public static byte[] Create(int param, GuildRequest type) { var msg = new MsgSyndicate { Size = (ushort)sizeof(MsgSyndicate), Id = 1107, Type = type, Param = param }; return(msg); }
public void SendGuildRequestList(Action <bool> call_back) { guildRequestData = null; Protocol.Send(GuildRequestListModel.URL, delegate(GuildRequestListModel ret) { bool obj = false; if (ret.Error == Error.None) { obj = true; guildRequestData = ret.result; } call_back(obj); }, string.Empty); }
public Guild GetGuild(GuildRequest request) { var rosterRequest = this.client.GetGuildRosterAsync( request.Realm, request.Name, this.profile); rosterRequest.Wait(); if (!rosterRequest.IsCompletedSuccessfully || !rosterRequest.Result.Success) { return(null); } var guildRoster = rosterRequest.Result.Value; return(new Guild { Faction = guildRoster.Guild.Faction.Name, Name = guildRoster.Guild.Name, Members = this.GetMembers(guildRoster.Members), }); }
public void OnDiff(BaseModelDiff.DiffGuildRequest diff) { bool flag = false; if (Utility.IsExist(diff.add)) { diff.add.ForEach(delegate(GuildRequestItem data) { if (guildRequestData == null) { guildRequestData = new GuildRequest(); } guildRequestData.guildRequestItemList.Add(data); }); flag = true; } if (Utility.IsExist(diff.update)) { diff.update.ForEach(delegate(GuildRequestItem data) { GuildRequestManager guildRequestManager = this; GuildRequestItem guildRequestItem = guildRequestData.guildRequestItemList.Find((GuildRequestItem list_data) => list_data.slotNo == data.slotNo); guildRequestItem.slotNo = data.slotNo; guildRequestItem.crystalNum = data.crystalNum; guildRequestItem.questId = data.questId; guildRequestItem.num = data.num; guildRequestItem.endAt = data.endAt; guildRequestItem.expiredAt = data.expiredAt; }); flag = true; } if (flag) { Dirty(); } }