Пример #1
0
    public List <UpgradeRequire> GetStarUpCost(EquiptType type, int level)
    {
        PlayerStrengthCost cost = m_StarUpCost.SingleOrDefault(c => c.lGoodsSubClass == type && c.GainLevel == level);

        if (cost != null)
        {
            return(cost.UpgradeRequires);
        }
        else
        {
            return(new List <UpgradeRequire>());
        }
    }
Пример #2
0
 public Item(int id, string name, string desc, int attack, int defence, int stamina, ItemType type, string loc, bool equipt, int count, EquiptType etype, int quest, bool comp, int cost)
 {
     this.ID            = id;
     this.Name          = name;
     this.Description   = desc;
     this.AttackStat    = attack;
     this.DefenceStat   = defence;
     this.StaminaStat   = stamina;
     this.Type          = type;
     this.Icon          = Resources.Load(loc) as Sprite;
     this.Equipted      = equipt;
     this.Count         = count;
     this.Etype         = etype;
     this.QuestObstical = quest;
     this.Completed     = comp;
     this.Cost          = cost;
 }
Пример #3
0
 public Item(int id, string name, string desc, int health, int hp, int attack, int defence, int speed, int level, int power, ItemType type, int cost, int item, bool equipted, int count, string iconLocation, EquiptType etype)
 {
     this.ID          = id;
     this.Name        = name;
     this.Description = desc;
     this.HealthPlus  = health;
     this.HPPlus      = hp;
     this.AttackPlus  = attack;
     this.DefencePlus = defence;
     this.SpeedPlus   = speed;
     this.LevelPlus   = level;
     this.PowerPlus   = power;
     this.Type        = type;
     this.Cost        = cost;
     this.EquiptItem  = item;
     this.Equipted    = equipted;
     this.Count       = count;
     this.Icon        = Resources.Load(iconLocation) as Sprite;
     this.Etype       = etype;
 }
Пример #4
0
 public Item(int num, string name, string desc, int attack, int def, int speed, int acc, int hp, int evase, int spdef, int spAtk, string buff, ItemType tpe, int count, bool equipt, int index, EquiptType typ, bool canB, int cost)
 {
     this.itemNumber  = num;
     this.Name        = name;
     this.Description = desc;
     this.Attack      = attack;
     this.Defence     = def;
     this.Speed       = speed;
     this.Accuracy    = acc;
     this.Hp          = hp;
     this.Evasion     = evase;
     this.SpDefence   = spdef;
     this.SpAttack    = spAtk;
     this.BuffType    = buff;
     this.type        = tpe;
     this.Count       = count;
     this.Equipted    = equipt;
     this.Index       = index;
     this.equiptType  = typ;
     this.canBuy      = canB;
     this.Cost        = cost;
 }
Пример #5
0
    public void UpdateResultPane()
    {
        lable_None.gameObject.SetActive(false);
        Title.gameObject.SetActive(true);
        if (EquipmentUpgradeDataManger.Instance.CurrentSelectEquip != null)
        {
            List <UpgradeRequire> UpgradeRequires = new List <UpgradeRequire>();
            attPanel.gameObject.SetActive(true);
            EquiptType type = (EquiptType)EquipmentUpgradeDataManger.Instance.CurrentSelectEquip.LocalItemData._GoodsSubClass;
            switch (EquipmentUpgradeDataManger.Instance.CurrentType)
            {
            case UpgradeType.Strength:
                strengthPanel.gameObject.SetActive(true);
                strengthPanel.Init(EquipmentUpgradeDataManger.Instance.CurrentSelectEquip);
                starUpPanel.gameObject.SetActive(false);
                upgradePanel.gameObject.SetActive(false);

                int currentlevel = PlayerDataManager.Instance.GetEquipmentStrengthLevel((EquiptSlotType)EquipmentUpgradeDataManger.Instance.CurrentSelectEquip.sSyncContainerGoods_SC.nPlace);
                if (currentlevel < CommonDefineManager.Instance.CommonDefine.StrengthLimit)
                {
                    UpgradeRequires = PlayerDataManager.Instance.GetStrengCost(type, currentlevel);
                }
                else
                {
                    lable_None.SetText(LanguageTextManager.GetString("IDS_I3_97"));
                    setMaterialPanelNone();
                }
                break;

            case UpgradeType.StarUp:

                strengthPanel.gameObject.SetActive(false);
                starUpPanel.gameObject.SetActive(true);
                starUpPanel.Init(EquipmentUpgradeDataManger.Instance.CurrentSelectEquip);
                upgradePanel.gameObject.SetActive(false);
                int currentstarlevel = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)EquipmentUpgradeDataManger.Instance.CurrentSelectEquip.sSyncContainerGoods_SC.nPlace);
                if (currentstarlevel < CommonDefineManager.Instance.CommonDefine.StartStrengthLimit)
                {
                    UpgradeRequires = PlayerDataManager.Instance.GetStarUpCost(type, currentstarlevel);
                }
                else
                {
                    lable_None.SetText(LanguageTextManager.GetString("IDS_I3_98"));
                    setMaterialPanelNone();
                }
                break;

            case UpgradeType.Upgrade:
                strengthPanel.gameObject.SetActive(false);
                starUpPanel.gameObject.SetActive(false);
                upgradePanel.gameObject.SetActive(true);
                upgradePanel.Init(EquipmentUpgradeDataManger.Instance.CurrentSelectEquip);
                UpgradeRequires = ContainerInfomanager.Instance.GetUpgradeRequire(EquipmentUpgradeDataManger.Instance.CurrentSelectEquip.LocalItemData as EquipmentData);
                break;
            }
            if (UpgradeRequires.Count == 1)
            {
                MD_MaterialItem.gameObject.SetActive(true);
                LF_MaterialItem.gameObject.SetActive(false);
                RG_MaterialItem.gameObject.SetActive(false);
                MD_MaterialItem.Init(UpgradeRequires[0]);
            }
            else if (UpgradeRequires.Count == 2)
            {
                MD_MaterialItem.gameObject.SetActive(false);
                LF_MaterialItem.gameObject.SetActive(true);
                RG_MaterialItem.gameObject.SetActive(true);
                LF_MaterialItem.Init(UpgradeRequires[0]);
                RG_MaterialItem.Init(UpgradeRequires[1]);
            }
            else
            {
                MD_MaterialItem.gameObject.SetActive(false);
                LF_MaterialItem.gameObject.SetActive(false);
                RG_MaterialItem.gameObject.SetActive(false);
            }

            attPanel.Init(EquipmentUpgradeDataManger.Instance.CurrentSelectEquip, EquipmentUpgradeDataManger.Instance.CurrentType);
        }
        else
        {
            switch (EquipmentUpgradeDataManger.Instance.CurrentType)
            {
            case UpgradeType.Strength:
                UI.MessageBox.Instance.ShowTips(1, LanguageTextManager.GetString("IDS_I3_93"), 1f);
                break;

            case UpgradeType.StarUp:
                UI.MessageBox.Instance.ShowTips(1, LanguageTextManager.GetString("IDS_I3_94"), 1f);
                break;

            case UpgradeType.Upgrade:
                UI.MessageBox.Instance.ShowTips(1, LanguageTextManager.GetString("IDS_I3_95"), 1f);
                break;
            }
            strengthPanel.gameObject.SetActive(false);
            starUpPanel.gameObject.SetActive(false);
            upgradePanel.gameObject.SetActive(false);
            MD_MaterialItem.gameObject.SetActive(false);
            LF_MaterialItem.gameObject.SetActive(false);
            RG_MaterialItem.gameObject.SetActive(false);
            attPanel.gameObject.SetActive(false);
        }
    }