Esempio n. 1
0
    private void OnEquipTattoo(FaustComm.NetResponse msg)
    {
        if (msg.Succeeded)
        {
            TattooEquipResponse myMsg = msg as TattooEquipResponse;

            //if current slot is not empty, move the item into inventory
            if (PlayerInfo.Instance.playerTattoos.tattooDict.ContainsKey(SelectedPart))
            {
                ItemInventory oldItem = PlayerInfo.Instance.playerTattoos.tattooDict[SelectedPart];

                PlayerInfo.Instance.PlayerInventory.AddItemInventory(oldItem);
            }

            UpdateInforResponseData updateData = myMsg.updateData;

            updateData.Broadcast();

            //remove the item from inventory. It may not be there, but call removeItem in any case.
            PlayerInfo.Instance.PlayerInventory.RemoveItem(_focusItem.inventoryItem);

            UIMessageBoxManager.Instance.ShowMessageBox(Localization.instance.Get("IDS_TATTOO_ALREADYEQUIPPED"), null, MB_TYPE.MB_OK, null);

            _uiTattoo.RefreshMainPanel();
            this.Initialize(_selectedPart, _uiTattoo);
        }
        else
        {
            UIMessageBoxManager.Instance.ShowMessageBox(Utils.GetErrorIDS(msg.errorCode), null, MB_TYPE.MB_OK, null);
        }
    }
Esempio n. 2
0
    private void OnReplaceTattoo(FaustComm.NetResponse msg)
    {
        if (msg.Succeeded)
        {
            TattooEquipResponse myMsg = msg as TattooEquipResponse;

            UpdateInforResponseData updateData = myMsg.updateData;

            updateData.Broadcast();

            UIMessageBoxManager.Instance.ShowMessageBox(Localization.instance.Get("IDS_TATTOO_ALREADYEQUIPPED"), null, MB_TYPE.MB_OK, null);

            _uiTattooMain.RefreshMainPanel();
        }
        else
        {
            UIMessageBoxManager.Instance.ShowMessageBox(Utils.GetErrorIDS(msg.errorCode), null, MB_TYPE.MB_OK, null);
        }
    }