コード例 #1
0
 private void OnBuySharedStashSlots(RequestBuySharedStashSlotsMessage requestBuySharedStashSlotsMessage)
 {
     // TODO: Take that money away ;)
     _owner.Attributes[GameAttribute.Shared_Stash_Slots] += 14;
     _owner.Attributes.BroadcastChangedIfRevealed();
     _stashGrid.ResizeGrid(_owner.Attributes[GameAttribute.Shared_Stash_Slots] / 7, 7);
 }
コード例 #2
0
        private void OnBuySharedStashSlots(RequestBuySharedStashSlotsMessage requestBuySharedStashSlotsMessage)
        {
            int amount = 2500;

            if (_stashGrid.Rows % 10 == 0)
            {
                amount = _stashBuyValue[_stashGrid.Rows / 10 - 1];
            }
            if (_equipment.ContainsGoldAmount(amount))
            {
                _equipment.RemoveGoldAmount(amount);
                _owner.Attributes[GameAttribute.Shared_Stash_Slots] += 14;
                _owner.Attributes.BroadcastChangedIfRevealed();
                _stashGrid.ResizeGrid(_owner.Attributes[GameAttribute.Shared_Stash_Slots] / 7, 7);
            }
        }
コード例 #3
0
        private void OnBuySharedStashSlots(RequestBuySharedStashSlotsMessage requestBuySharedStashSlotsMessage)
        {
            int amount = 10000;

            if (_stashGrid.Rows % 10 == 0)
            {
                if (_stashGrid.Rows / 10 - 1 >= _stashBuyValue.Length)
                {
                    return;
                }
                amount = _stashBuyValue[_stashGrid.Rows / 10 - 1];
            }
            if (GetGoldAmount() >= amount)
            {
                RemoveGoldAmount(amount);
                _owner.Attributes[GameAttribute.Shared_Stash_Slots] += 14;
                _owner.Attributes.BroadcastChangedIfRevealed();
                _stashGrid.ResizeGrid(_owner.Attributes[GameAttribute.Shared_Stash_Slots] / 7, 7);
            }
        }
コード例 #4
0
ファイル: Inventory.cs プロジェクト: jujuman/mooege
        private void OnBuySharedStashSlots(RequestBuySharedStashSlotsMessage requestBuySharedStashSlotsMessage)
        {
            int amount = 2500;

            if (_stashGrid.Rows % 10 == 0)
            {
                amount = _stashBuyValue[_stashGrid.Rows / 10 - 1];
            }
            if (_equipment.ContainsGoldAmount(amount))
            {
                _equipment.RemoveGoldAmount(amount);
                _owner.Attributes[GameAttribute.Shared_Stash_Slots] += 14;
                _owner.Attributes.BroadcastChangedIfRevealed();
                _stashGrid.ResizeGrid(_owner.Attributes[GameAttribute.Shared_Stash_Slots] / 7, 7);
            }
        }
コード例 #5
0
ファイル: Inventory.cs プロジェクト: ralje/mooege
 private void OnBuySharedStashSlots(RequestBuySharedStashSlotsMessage requestBuySharedStashSlotsMessage)
 {
     // TODO: Take that money away ;)
     _owner.Attributes[GameAttribute.Shared_Stash_Slots] += 14;
     _owner.Attributes.BroadcastChangedIfRevealed();
     _stashGrid.ResizeGrid(_owner.Attributes[GameAttribute.Shared_Stash_Slots] / 7, 7);
 }