Exemplo n.º 1
0
 public SkillAdditionalData(int duration, BuffType buffType, BuffSubType buffSubType, int buffCategory, int maxStack, byte keepCondition)
 {
     Duration      = duration;
     BuffType      = buffType;
     BuffSubType   = buffSubType;
     BuffCategory  = buffCategory;
     MaxStack      = maxStack;
     KeepCondition = keepCondition;
 }
 private bool VerifySkillTypeOf(BuffType buffType, BuffSubType buffSubType)
 {
     if (IsChainSkill())
     {
         SkillAdditionalData skillAdditionalData = GetSkillMetadata()?.SkillLevels.Find(s => s.Level == SkillLevel)?.SkillAdditionalData;
         if (skillAdditionalData != null && skillAdditionalData.BuffType == buffType.GetValue() && skillAdditionalData.BuffSubType == buffSubType.GetValue())
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
    private static SkillAdditionalData ParseSkillData(XmlNode level)
    {
        XmlNode basicProperty = level.SelectSingleNode("BasicProperty");

        int         duration      = int.Parse(basicProperty.Attributes["durationTick"]?.Value ?? "0");
        BuffType    buffType      = (BuffType)int.Parse(basicProperty.Attributes["buffType"]?.Value ?? "0");
        BuffSubType buffSubType   = (BuffSubType)int.Parse(basicProperty.Attributes["buffSubType"]?.Value ?? "0");
        int         buffCategory  = int.Parse(basicProperty.Attributes["buffCategory"]?.Value ?? "0");
        int         maxStack      = int.Parse(basicProperty.Attributes["maxBuffCount"]?.Value ?? "0");
        byte        keepCondition = byte.Parse(basicProperty.Attributes["keepCondition"]?.Value ?? "0");

        return(new(duration, buffType, buffSubType, buffCategory, maxStack, keepCondition));
    }
        private bool VerifySkillTypeOf(SkillType type, SkillSubType subType, BuffType buffType, BuffSubType buffSubType)
        {
            SkillMetadata skillData = GetSkillMetadata();

            if (skillData != null && skillData.Type == type.GetValue() && skillData.SubType == subType.GetValue())
            {
                SkillAdditionalData skillAdditionalData = skillData.SkillLevels.Find(s => s.Level == SkillLevel).SkillAdditionalData;
                if (skillAdditionalData != null && skillAdditionalData.BuffType == buffType.GetValue() && skillAdditionalData.BuffSubType == buffSubType.GetValue())
                {
                    return(true);
                }
            }
            return(false);
        }