Esempio n. 1
0
 public AffectEffectProperty(AffectEffect type, int skillId, int subSkillId, float hitRate, EffectTarget target, EffectNumbers effectNumbers, int[] intValue, float[] floatValue, bool useDrain, PowerType powerType, TechniqueType techniqueType, global::Attribute attribute, bool isMissThrough)
 {
     this._type          = type;
     this.skillId        = skillId;
     this.subSkillId     = subSkillId;
     this.hitRate        = hitRate;
     this._techniqueType = techniqueType;
     this._attribute     = attribute;
     this.target         = target;
     this._effectNumbers = effectNumbers;
     this._powerType     = powerType;
     this._floatValue    = floatValue;
     this._intValue      = intValue;
     this.useDrain       = useDrain;
     this.isMissThrough  = isMissThrough;
 }
    private static int CompareAttributeBase(CharacterStateControl x, CharacterStateControl y, global::Attribute attribute)
    {
        if (x == y)
        {
            return(0);
        }
        int num  = 0;
        int num2 = 0;

        foreach (SkillStatus skillStatus2 in x.skillStatus)
        {
            num += skillStatus2.AttributeMachLevel(attribute);
        }
        foreach (SkillStatus skillStatus4 in y.skillStatus)
        {
            num2 += skillStatus4.AttributeMachLevel(attribute);
        }
        if (num > num2)
        {
            return(-1);
        }
        if (num < num2)
        {
            return(1);
        }
        return(0);
    }
Esempio n. 3
0
    public Sprite GetAttributeSprite(global::Attribute attribute, bool enable = true, bool onNormal = false)
    {
        switch (attribute)
        {
        case global::Attribute.None:
            if (enable && !onNormal && this.attributeSprites[0] != null)
            {
                return(this.attributeSprites[0]);
            }
            if (enable && this.attributeSpritesNormal[0] != null)
            {
                return(this.attributeSpritesNormal[0]);
            }
            if (this.attributeSpritesDisable[0] != null)
            {
                return(this.attributeSpritesDisable[0]);
            }
            break;

        case global::Attribute.Red:
            if (enable && !onNormal && this.attributeSprites[1] != null)
            {
                return(this.attributeSprites[1]);
            }
            if (enable && this.attributeSpritesNormal[1] != null)
            {
                return(this.attributeSpritesNormal[1]);
            }
            if (this.attributeSpritesDisable[1] != null)
            {
                return(this.attributeSpritesDisable[1]);
            }
            break;

        case global::Attribute.Blue:
            if (enable && !onNormal && this.attributeSprites[2] != null)
            {
                return(this.attributeSprites[2]);
            }
            if (enable && this.attributeSpritesNormal[2] != null)
            {
                return(this.attributeSpritesNormal[2]);
            }
            if (this.attributeSpritesDisable[2] != null)
            {
                return(this.attributeSpritesDisable[2]);
            }
            break;

        case global::Attribute.Yellow:
            if (enable && !onNormal && this.attributeSprites[3] != null)
            {
                return(this.attributeSprites[3]);
            }
            if (enable && this.attributeSpritesNormal[3] != null)
            {
                return(this.attributeSpritesNormal[3]);
            }
            if (this.attributeSpritesDisable[3] != null)
            {
                return(this.attributeSpritesDisable[3]);
            }
            break;

        case global::Attribute.Green:
            if (enable && !onNormal && this.attributeSprites[4] != null)
            {
                return(this.attributeSprites[4]);
            }
            if (enable && this.attributeSpritesNormal[4] != null)
            {
                return(this.attributeSpritesNormal[4]);
            }
            if (this.attributeSpritesDisable[4] != null)
            {
                return(this.attributeSpritesDisable[4]);
            }
            break;

        case global::Attribute.White:
            if (enable && !onNormal && this.attributeSprites[5] != null)
            {
                return(this.attributeSprites[5]);
            }
            if (enable && this.attributeSpritesNormal[5] != null)
            {
                return(this.attributeSpritesNormal[5]);
            }
            if (this.attributeSpritesDisable[5] != null)
            {
                return(this.attributeSpritesDisable[5]);
            }
            break;

        case global::Attribute.Black:
            if (enable && !onNormal && this.attributeSprites[6] != null)
            {
                return(this.attributeSprites[6]);
            }
            if (enable && this.attributeSpritesNormal[6] != null)
            {
                return(this.attributeSpritesNormal[6]);
            }
            if (this.attributeSpritesDisable[6] != null)
            {
                return(this.attributeSpritesDisable[6]);
            }
            break;
        }
        return(null);
    }
 private static int CompareToleranceAttributeBase(CharacterStateControl x, CharacterStateControl y, global::Attribute attribute)
 {
     return(CharacterStateControlSorter.CompareToleranceBase(x.tolerance.GetAttributeStrength(attribute), y.tolerance.GetAttributeStrength(attribute)));
 }