Пример #1
0
        public PropertyModifierSet GetModifierSetByIdAndLevel(int skillId, int skillLevel)
        {
            CombatTurn combatTurnByID = this.GetCombatTurnByID(skillId);

            if ((combatTurnByID == null) || (combatTurnByID.type != 5))
            {
                return(null);
            }
            int          id         = combatTurnByID.GetStage(3).value;
            AvatarAction actionById = this.GetActionById(id);

            if (actionById == null)
            {
                return(null);
            }
            AvatarAction.Event event2 = (actionById.events.Count != 0) ? actionById.events[0] : null;
            if ((event2 == null) || (event2.eventType != 4))
            {
                return(null);
            }
            ClientServerCommon.Buff buffById = this.GetBuffById(event2.buffId);
            if (buffById == null)
            {
                return(null);
            }
            return(buffById.GetModifierSetByLevelFilter(skillLevel));
        }
Пример #2
0
 private void AddCombatTurn(CombatTurn combatTurn)
 {
     if (combatTurn != null)
     {
         this.combatTurns.Add(combatTurn);
     }
 }
Пример #3
0
        public CombatTurn GetCombatTurnByID(int ID)
        {
            CombatTurn turn = null;

            if (!this.id_turnMap.TryGetValue(ID, out turn))
            {
                return(null);
            }
            return(turn);
        }
Пример #4
0
        public CombatTurn LoadCombatTurnFromXml(SecurityElement element)
        {
            if (element.Tag != "CombatTurn")
            {
                return(null);
            }
            CombatTurn turn = new CombatTurn();

            turn.id   = StrParser.ParseHexInt(element.Attribute("Id"), turn.id);
            turn.type = TypeNameContainer <CombatTurn._Type> .Parse(element.Attribute("Type"), turn.type);

            turn.costSkillPower = StrParser.ParseDecInt(element.Attribute("CostSkillPower"), turn.costSkillPower);
            turn.castRate       = StrParser.ParseFloat(element.Attribute("CastRate"), turn.castRate);
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    CombatTurn.Stage stage;
                    string           tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "TestType")
                        {
                            int num = TypeNameContainer <CombatTurn._TestType> .Parse(element2.Text, 0);

                            if (num != 0)
                            {
                                turn.testType |= num;
                            }
                        }
                        else if (tag == "Stage")
                        {
                            goto Label_00FA;
                        }
                    }
                    continue;
Label_00FA:
                    stage = this.LoadStageFromXml(element2, turn.id);
                    if (stage != null)
                    {
                        turn.stages.Add(stage);
                    }
                }
            }
            return(turn);
        }