|
@@ -18,13 +18,13 @@ namespace GFGGame
|
|
|
public static void ExchangeItemById(int itemId, long num, bool showTips = true, Action onSuccess = null, bool openSource = false, int maxCount = 9990, bool showTxtBuyTips = false, string prefix = "")
|
|
|
{
|
|
|
|
|
|
- if (!BuyCurrency(itemId, onSuccess))
|
|
|
+ if (!BuyCurrency(itemId, num, onSuccess))
|
|
|
{
|
|
|
BuyItemConteoller.Show(itemId, num, ConstBuyType.TYPE_ITEM, onSuccess, showTips, openSource, maxCount);
|
|
|
BuyItemConteoller.showTxtBuyTips = showTxtBuyTips;
|
|
|
}
|
|
|
}
|
|
|
- public static bool BuyCurrency(int itemId, Action onSuccess = null)
|
|
|
+ public static bool BuyCurrency(int itemId, long num, Action onSuccess = null)
|
|
|
{
|
|
|
switch (itemId)
|
|
|
{
|
|
@@ -35,7 +35,7 @@ namespace GFGGame
|
|
|
AddPower();
|
|
|
return true;
|
|
|
case ConstItemID.DIAMOND_RED:
|
|
|
- AddDiamondRed();
|
|
|
+ AddDiamondRed(num);
|
|
|
return true;
|
|
|
case ConstItemID.DIAMOND_PURPLE:
|
|
|
ItemUtil.AddDiamondPurple();
|
|
@@ -72,7 +72,7 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
//红钻(鲛绡)
|
|
|
- public static void AddDiamondRed(int value = 0, Action onSuccess = null)
|
|
|
+ public static void AddDiamondRed(long value = 0, Action onSuccess = null)
|
|
|
{
|
|
|
|
|
|
ItemExchangeCfg currencyRatioCfg = ItemExchangeCfgArray.Instance.GetCfg(ConstItemID.DIAMOND_RED);// GetCurrencyRatioCfgById(ConstItemID.DIAMOND_RED);
|