|
@@ -13,9 +13,9 @@ namespace GFGGame
|
|
|
private ValueBarController _valueBarController;
|
|
|
|
|
|
private List<int> _clothingDatas = new List<int>();
|
|
|
- private Dictionary<int, int> _decomposeData = new Dictionary<int, int>();
|
|
|
+ private Dictionary<int, long> _decomposeData = new Dictionary<int, long>();
|
|
|
|
|
|
- private int _decomposeCount = 0;//要分解物品的数量
|
|
|
+ private long _decomposeCount = 0;//要分解物品的数量
|
|
|
private int _curRarity = 0;
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -112,9 +112,9 @@ namespace GFGGame
|
|
|
item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg.res, ext);
|
|
|
item.m_txtName.text = itemCfg.name;
|
|
|
item.m_imgSelect.visible = false;
|
|
|
- int itemHasCount = DecomposeDataManager.Instance.ItemCanDecomposeCount(itemCfg.id);
|
|
|
+ long itemHasCount = DecomposeDataManager.Instance.ItemCanDecomposeCount(itemCfg.id);
|
|
|
item.m_txtHasCount.text = itemHasCount.ToString();
|
|
|
- int itemCount = _decomposeData.ContainsKey(_clothingDatas[index]) ? _decomposeData[_clothingDatas[index]] : 0;
|
|
|
+ long itemCount = _decomposeData.ContainsKey(_clothingDatas[index]) ? _decomposeData[_clothingDatas[index]] : 0;
|
|
|
item.m_txtCount.text = itemCount.ToString();
|
|
|
item.m_imgSelect.visible = itemCount > 0;
|
|
|
item.m_btnMinus.visible = itemCount > 0;
|
|
@@ -198,15 +198,15 @@ namespace GFGGame
|
|
|
}
|
|
|
private void SelectAll()
|
|
|
{
|
|
|
- int lastCount = DecomposeDataManager.MaxCount - _decomposeCount;
|
|
|
+ long lastCount = DecomposeDataManager.MaxCount - _decomposeCount;
|
|
|
|
|
|
for (int i = 0; i < _clothingDatas.Count; i++)
|
|
|
{
|
|
|
int itemId = _clothingDatas[i];
|
|
|
- int itemHasCount = DecomposeDataManager.Instance.ItemCanDecomposeCount(itemId);
|
|
|
- int itemLastCount = _decomposeData.ContainsKey(itemId) ? itemHasCount - _decomposeData[itemId] : itemHasCount;
|
|
|
+ long itemHasCount = DecomposeDataManager.Instance.ItemCanDecomposeCount(itemId);
|
|
|
+ long itemLastCount = _decomposeData.ContainsKey(itemId) ? itemHasCount - _decomposeData[itemId] : itemHasCount;
|
|
|
|
|
|
- int count = Math.Min(lastCount, itemLastCount);
|
|
|
+ long count = Math.Min(lastCount, itemLastCount);
|
|
|
lastCount -= count;
|
|
|
if (!_decomposeData.ContainsKey(itemId)) _decomposeData[itemId] = 0;
|
|
|
_decomposeData[itemId] = _decomposeData[itemId] + count;
|
|
@@ -270,7 +270,7 @@ namespace GFGGame
|
|
|
PromptController.Instance.ShowFloatTextPrompt("未选择分解服装");
|
|
|
return;
|
|
|
}
|
|
|
- int consumeCount = cfg.consumeCount * _decomposeCount;
|
|
|
+ long consumeCount = cfg.consumeCount * _decomposeCount;
|
|
|
if (consumeCount > ItemDataManager.GetItemNum(cfg.consumeId))
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt(string.Format("{0}不足", itemCfg.name));
|
|
@@ -278,7 +278,7 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
List<int> itemIds = _decomposeData.Keys.ToList<int>();
|
|
|
- List<int> itemNums = _decomposeData.Values.ToList<int>();
|
|
|
+ List<long> itemNums = _decomposeData.Values.ToList<long>();
|
|
|
bool result = await ClothingDecomposeSProxy.ClothingDecompose(itemIds, itemNums);
|
|
|
if (result)
|
|
|
{
|