|
@@ -46,7 +46,6 @@ public class Pack : SkillRoot
|
|
|
public string Flower;
|
|
|
|
|
|
public string[] Flowers;
|
|
|
- public string[] Diamonds;
|
|
|
|
|
|
public Current BuyCur;
|
|
|
|
|
@@ -110,7 +109,6 @@ public class Pack : SkillRoot
|
|
|
if (!string.IsNullOrEmpty(Flower))
|
|
|
{
|
|
|
Flowers = Flower.Split(' ')[0].Split(',');
|
|
|
- Diamonds = Flower.Split(' ')[1].Split(',');
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -158,14 +156,6 @@ public class Pack : SkillRoot
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (Application.platform == RuntimePlatform.IPhonePlayer) //todo 暂时关闭
|
|
|
- {
|
|
|
- if (BuyCur == Current.Cash)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
Level = int.Parse(attribute[3].Value);
|
|
|
ItemStatus_ = (SkillStatus)Enum.Parse(typeof(SkillStatus), attribute[2].Value);
|
|
|
|
|
@@ -188,29 +178,8 @@ public class Pack : SkillRoot
|
|
|
ItemStatus = ItemStatus;
|
|
|
}
|
|
|
|
|
|
- public override void RegistReference()
|
|
|
- {
|
|
|
- if (Application.platform == RuntimePlatform.IPhonePlayer) //todo 暂时关闭
|
|
|
- {
|
|
|
- if (BuyCur == Current.Cash)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- base.RegistReference();
|
|
|
- }
|
|
|
-
|
|
|
public override void UpdateStatus()
|
|
|
{
|
|
|
- if (Application.platform == RuntimePlatform.IPhonePlayer) //todo 暂时关闭
|
|
|
- {
|
|
|
- if (BuyCur == Current.Cash)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (!ManaCenter.Complete)
|
|
|
{
|
|
|
return;
|
|
@@ -250,23 +219,6 @@ public class Pack : SkillRoot
|
|
|
|
|
|
protected void UseA()
|
|
|
{
|
|
|
- if (!string.IsNullOrEmpty(Flower))
|
|
|
- {
|
|
|
- for (int i = 0; i < Flowers.Length; i++)
|
|
|
- {
|
|
|
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[int.Parse(Flowers[i])];
|
|
|
-
|
|
|
- if (!flowerInfo.Unlock)
|
|
|
- {
|
|
|
- flowerInfo.Unlock = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ManaCenter.AddDiamond(int.Parse(Diamonds[i]), StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.Charge);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
ManaCenter.SkillPlus += Plus;
|
|
|
ManaCenter.SkillPerson += Person;
|
|
|
ManaCenter.SkillPersonBuff += PersonBuff;
|
|
@@ -328,6 +280,7 @@ public class Pack : SkillRoot
|
|
|
|
|
|
protected void PurchaseResult()
|
|
|
{
|
|
|
+ int tempCoin = 0;
|
|
|
int tempDiamond = (int) DiamondOnce;
|
|
|
|
|
|
string tempFlower = "";
|
|
@@ -340,11 +293,24 @@ public class Pack : SkillRoot
|
|
|
|
|
|
if (flowerInfo.Unlock == false)
|
|
|
{
|
|
|
+ flowerInfo.Unlock = true;
|
|
|
+
|
|
|
tempFlower += string.Format("{0}{1}{2} ", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tempDiamond += int.Parse(Diamonds[i]);
|
|
|
+ if (flowerInfo.UnlockCur == Current.Coin)
|
|
|
+ {
|
|
|
+ tempCoin = flowerInfo.UnlockAmt/5;
|
|
|
+
|
|
|
+ ManaCenter.AddCoin(flowerInfo.UnlockAmt / 5, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Charge);
|
|
|
+ }
|
|
|
+ else if (flowerInfo.UnlockCur == Current.Diamond)
|
|
|
+ {
|
|
|
+ tempDiamond += flowerInfo.UnlockAmt/5;
|
|
|
+
|
|
|
+ ManaCenter.AddDiamond(flowerInfo.UnlockAmt/5, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.Charge);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -354,7 +320,16 @@ public class Pack : SkillRoot
|
|
|
|
|
|
if (!string.IsNullOrEmpty(CoinFml))
|
|
|
{
|
|
|
- sb.AppendFormat("{0}{1}{2} ", Language.GetStr("UI", "J_Info0"), "<(金币)>", Auxiliary.FmlParse(CoinFml, "l", ManaCenter.Level.ToString(), "c", ManaCenter.CoinPerson.ToString("0.000")).ToString("0"));
|
|
|
+ int coin = (int) Auxiliary.FmlParse(CoinFml, "l", ManaCenter.Level.ToString(), "c", ManaCenter.CoinPerson.ToString("0.000"));
|
|
|
+
|
|
|
+ ManaCenter.AddCoin(coin, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Charge);
|
|
|
+
|
|
|
+ tempCoin += coin;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!tempCoin.Equal(0))
|
|
|
+ {
|
|
|
+ sb.AppendFormat("{0}{1}{2} ", Language.GetStr("UI", "J_Info0"), "<(金币)>", tempCoin);
|
|
|
}
|
|
|
|
|
|
if (!tempDiamond.Equal(0))
|
|
@@ -461,18 +436,18 @@ public class Pack : SkillRoot
|
|
|
{
|
|
|
#region MyRegion
|
|
|
|
|
|
- if (!string.IsNullOrEmpty(Flower))
|
|
|
- {
|
|
|
- for (int j = 0; j < Diamonds.Length; j++)
|
|
|
- {
|
|
|
- stringBuilder.Append(int.Parse(Diamonds[j]));
|
|
|
-
|
|
|
- if (j != Diamonds.Length - 1)
|
|
|
- {
|
|
|
- stringBuilder.Append(",");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //if (!string.IsNullOrEmpty(Flower))
|
|
|
+ //{
|
|
|
+ // for (int j = 0; j < Diamonds.Length; j++)
|
|
|
+ // {
|
|
|
+ // stringBuilder.Append(int.Parse(Diamonds[j]));
|
|
|
+
|
|
|
+ // if (j != Diamonds.Length - 1)
|
|
|
+ // {
|
|
|
+ // stringBuilder.Append(",");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
#endregion
|
|
|
}
|