Exemplo n.º 1
0
	private void CharacterDeleteResult( byte[] _packet)
	{
		body_GC_CHAR_DELETE_RESULT result = new body_GC_CHAR_DELETE_RESULT();
		result.PacketBytesToClass( _packet);

		Debug.Log( "CharacterDeleteResult : " + result.eResult);

		GameObject go = GameObject.Find( "CharacterSlotManager");
		if( null == go)
			Debug.LogError( "CharacterSlotManager is not found!");

		AsCharacterSlotManager slotMng = go.GetComponent<AsCharacterSlotManager>();
		if( null == slotMng)
			Debug.LogError( "null == slotMng");

		switch( result.eResult)
		{
		case eRESULTCODE.eRESULT_SUCC:
			{
				if( 1 == result.nActionType)
				{
					StringBuilder sb = new StringBuilder();
					sb.AppendFormat( AsTableManager.Instance.GetTbl_String(16), result.nMonthDeleteCount);
					AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(366), sb.ToString(), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
				}

				slotMng.UpdateSlotState( result, true);
			}
			break;
		case eRESULTCODE.eRESULT_FAIL_CHAR_DELETE_GUILDMASTER:
			AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(240), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_ERROR);
			slotMng.UpdateSlotState( result, false);
			break;
		case eRESULTCODE.eRESULT_FAIL_CHAR_DELETE_MONTHCOUNTOVER:
			{
				StringBuilder sb = new StringBuilder();
				sb.AppendFormat( AsTableManager.Instance.GetTbl_String(15), result.nMonthDeleteCount);
				AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(366), sb.ToString(), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
				slotMng.UpdateSlotState( result, false);
			}
			break;
		default:
			AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(4086), AsTableManager.Instance.GetTbl_String(398), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_ERROR);
			slotMng.UpdateSlotState( result, false);
			break;
		}
	}
Exemplo n.º 2
0
	public void SetDeleteState( body_GC_CHAR_DELETE_RESULT data)
	{
		AsCharacterSlot slot = slotArray[ data.nCharSlot] as AsCharacterSlot;
		slot.SetDeleteState( data.nRemainTime);

		sCHARVIEWDATA viewData = new sCHARVIEWDATA();
		viewData = AsUserInfo.Instance.GetCharacter( data.nCharSlot) as sCHARVIEWDATA;
		viewData.nRemainTime = data.nRemainTime;
		AsUserInfo.Instance.ReplaceSlotData( viewData);
	}