예제 #1
0
 /// <summary>
 /// 内部调用
 /// </summary>
 /// <param name="c">C.</param>
 internal void OnUpdateCustomData(PVP.MemberCustomData c)
 {
     this.customDataNumber = c.customDataNumber;
     this.custom_data.Clear();
     foreach (KeyValuePair <String, byte[]> item in c.custom_data)// i=0;i<c.custom_data.Count;i++){
     {
         this.custom_data[item.Key] = item.Value;
     }
 }
예제 #2
0
        private void _RaiseRoomUpdateMemberCustomDataBroadcastEvent(ReceivedProtoEventArgs e)
        {
            int errorCode = e.errorCode;
            MemberCustomData customData = null;

            if (e.bytes != null && e.bytes.Length > 0)
            {
                Room_UpdateMemberCustomData_Broadcast b = _Deserialize <Room_UpdateMemberCustomData_Broadcast> (e.bytes);
                customData = new MemberCustomData(b);

                if (errorCode == ErrorCode.SUCCESS)
                {
                    if (PVPGlobal.roomInfo.member_infos.ContainsKey(customData.member_uid))
                    {
                        PVPGlobal.roomInfo.member_infos [customData.member_uid].OnUpdateCustomData(customData);
                    }
                }
            }

            if (ICM.handlerRegister != null && ICM.handlerRegister.roomMemberCustomDataBroadcastHandler != null)
            {
                ICM.handlerRegister.roomMemberCustomDataBroadcastHandler(errorCode, customData);
            }
        }