コード例 #1
0
ファイル: BattleNetClient.Clan.cs プロジェクト: Mofsy/jinxbot
        // 0x71
        private void HandleClanInviteMultiple(ParseData pd)
        {
            DataReader dr = new DataReader(pd.Data);
            dr.Seek(4); // cookie
            ClanResponseCode response = (ClanResponseCode)dr.ReadByte();
            ClanFormationEventArgs args = null;
            if (response == ClanResponseCode.Success)
            {
                args = new ClanFormationEventArgs();
            }
            else
            {
                List<string> names = new List<string>();
                int nextByte = dr.Peek();
                while (nextByte > 0)
                {
                    names.Add(dr.ReadCString());
                    nextByte = dr.Peek();
                }
                args = new ClanFormationEventArgs(response == ClanResponseCode.InvitationDeclined, response == ClanResponseCode.Decline, names.ToArray());
            }
            args.EventData = pd;

            OnClanFormationCompleted(args);
        }