Exemple #1
0
    private void ShowContentView2()
    {
        Dictionary <int, DSkillTalent> dict = ReadCfgSkillTalent.Dict;

        Dictionary <int, DSkillTalent> .Enumerator em = dict.GetEnumerator();
        XCharacter role   = RoleModule.Instance.GetCurPlayer();
        ECarrer    carrer = ReadCfgActor.GetDataById(role.Id).Carrer;

        int[] activeArray = new int[mTalents.Count];
        for (int i = 0; i < mTalents.Count; i++)
        {
            ItemTalent tab = mTalents[i];
            tab.talentLevel.text = DSkillTalent.TALENT_LEVELS[i].ToString();
            GTItemHelper.ShowImageBlack(tab.talentLevelBack, role.Level < DSkillTalent.TALENT_LEVELS[i]);
            activeArray[i] = 0;
        }
        while (em.MoveNext())
        {
            if (carrer != em.Current.Value.Carrer)
            {
                continue;
            }
            DSkillTalent db    = em.Current.Value;
            int          layer = em.Current.Value.Layer;
            int          i     = db.Pos - 1;
            ItemTalent   tab   = mTalents[layer - 1];
            GTItemHelper.ShowTexture(tab.talentIcons[i], db.Icon);
            tab.talentNames[i].text = db.Name.ToString();
            tab.talentHighLights[i].SetActive(activeArray[layer - 1] == db.Pos);
        }
        em.Dispose();
    }
 public override void Read(XmlElement element)
 {
     this.Id            = element.GetInt32("Id");
     this.Name          = element.GetString("Name");
     this.Pos           = element.GetInt32("Pos");
     this.Icon          = element.GetString("Icon");
     this.Layer         = element.GetInt32("Layer");
     this.Carrer        = (ECarrer)element.GetInt32("Carrer");
     this.Type          = element.GetInt32("TalentSkillType");
     this.TargetSkillId = element.GetInt32("TargetSkillId");
     this.Desc          = element.GetString("Desc");
 }
Exemple #3
0
    public override void Read(XmlElement element)
    {
        this.Id    = element.GetInt32("Id");
        this.Level = element.GetInt32("Level");
        this.Title = element.GetInt32("Title");
        this.Name  = element.GetString("Name");
        this.Desc  = element.GetString("Desc");
        this.Icon  = element.GetString("Icon");

        this.Race    = (EActorRace)element.GetInt32("Race");
        this.Type    = (EActorType)element.GetInt32("Type");
        this.Sex     = (EActorSex)element.GetInt32("Sex");
        this.Sort    = (EActorSort)element.GetInt32("Sort");
        this.Unit    = (EActorUnit)element.GetInt32("Unit");
        this.Carrer  = (ECarrer)element.GetInt32("Carrer");
        this.Group   = element.GetInt32("Group");
        this.Quality = element.GetInt32("Quality");

        this.RSpeed       = element.GetFloat("RSpeed");
        this.WSpeed       = element.GetFloat("WSpeed");
        this.BornEffectID = element.GetInt32("BornEffectID");
        this.DeadEffectID = element.GetInt32("DeadEffectID");

        this.StagePos   = element.GetString("StagePos").ToVector3(true);
        this.StageScale = element.GetFloat("StageScale");
        this.Skill      = element.GetString("Skill");
        this.Model      = element.GetInt32("Model");
        this.Exp        = element.GetInt32("Exp");
        this.Gold       = element.GetInt32("Gold");

        for (int i = 1; i <= 16; i++)
        {
            int v = element.GetInt32("P" + i.ToString());
            this.Propertys.Add((EAttr)i, v);
        }

        this.Natures[EActorNature.CAN_MOVE]         = element.GetInt32("CanMove") == 1;
        this.Natures[EActorNature.CAN_KILL]         = element.GetInt32("CanKill") == 1;
        this.Natures[EActorNature.CAN_MANUALATTACK] = element.GetInt32("CanManualAttack") == 1;
        this.Natures[EActorNature.CAN_TURN]         = element.GetInt32("CanTurn") == 1;
        this.Natures[EActorNature.CAN_STUN]         = element.GetInt32("CanStun") == 1;
        this.Natures[EActorNature.CAN_BEATBACK]     = element.GetInt32("CanBeatBack") == 1;
        this.Natures[EActorNature.CAN_BEATFLY]      = element.GetInt32("CanBeatFly") == 1;
        this.Natures[EActorNature.CAN_BEATDOWN]     = element.GetInt32("CanBeatDown") == 1;
        this.Natures[EActorNature.CAN_WOUND]        = element.GetInt32("CanWound") == 1;
        this.Natures[EActorNature.CAN_REDUCESPEED]  = element.GetInt32("CanReduceSpeed") == 1;
        this.Natures[EActorNature.CAN_FIXBODY]      = element.GetInt32("CanFixBody") == 1;
        this.Natures[EActorNature.CAN_SLEEP]        = element.GetInt32("CanSleep") == 1;
        this.Natures[EActorNature.CAN_VARISTION]    = element.GetInt32("CanVaristion") == 1;
        this.Natures[EActorNature.CAN_PARALY]       = element.GetInt32("CanParaly") == 1;
        this.Natures[EActorNature.CAN_FEAR]         = element.GetInt32("CanFear") == 1;
    }
Exemple #4
0
    List <DStore> GetProductListByCurRole(List <DStore> pList)
    {
        List <DStore> list   = new List <DStore>();
        DActor        db     = ReadCfgActor.GetDataById(RoleModule.Instance.GetCurPlayer().Id);
        ECarrer       carrer = db.Carrer;

        for (int i = 0; i < pList.Count; i++)
        {
            DItem itemDB = ReadCfgItem.GetDataById(pList[i].ItemID);
            if (itemDB.Carrer == carrer || itemDB.Carrer == ECarrer.O)
            {
                list.Add(pList[i]);
            }
        }
        return(list);
    }
Exemple #5
0
 public override void Read(XmlElement element)
 {
     this.Id           = element.GetInt32("Id");
     this.Name         = element.GetString("Name");
     this.ItemType     = (EItemType)element.GetInt32("ItemType");
     this.BagType      = (EBagType)element.GetInt32("BagType");
     this.Quality      = element.GetInt32("Quality");
     this.Icon         = element.GetString("Icon");
     this.SellMoneyId  = element.GetInt32("SellMoneyId");
     this.SellMoneyNum = element.GetInt32("SellMoneyNum");
     this.Desc         = element.GetString("Desc");
     this.Data1        = element.GetInt32("Data1");
     this.Data2        = element.GetInt32("Data2");
     this.Model_R      = element.GetString("Model_R");
     this.Model_L      = element.GetString("Model_L");
     this.Carrer       = (ECarrer)element.GetInt32("Carrer");
 }