Exemplo n.º 1
0
        private void FillList(LayerEffect effect)
        {
            lsbEffects.Items.Clear();
            ShapeLayer layer = null;

            lsbEffects.Items.Add(LayerEffect.EmptyEffect(layer, EffectType.Emphasis));
            EffectCategory group = GetEffectGroup(EffectType.Emphasis);


            if (group != null)
            {
                LayerEffect selected = null;
                foreach (LayerEffect item in group.Effects)
                {
                    if (item.Name != "WrapAround")
                    {
                        lsbEffects.Items.Add(item);
                        if (effect != null && item.Name == effect.Name)
                        {
                            selected = item;
                        }
                    }
                }

                //
                if (selected != null)
                {
                    lsbEffects.SelectedItem = selected;
                }
                else
                {
                    lsbEffects.SelectedIndex = 0;
                }
            }
        }
Exemplo n.º 2
0
 public Effect(int effect, string effectName, EffectCategory effectCategory, Expression preExpression,
               Expression postExpression, string description, string guid, int?graphic, bool isOffensive,
               bool isAssistance, int?durationAttribute, int?trackingSpeedAttribute, int?dischargeAttribute,
               int?rangeAttribute, int?fallofAttribute, bool disallowAutoRepeat, bool published, string displayName,
               bool isWarpSafe, bool rangeChance, bool electronicChance, bool propulsionChance, int?distribution,
               string sfxName, int?npcUsageChanceAttribute, int?npcActivationChangeAttribute,
               int?fittingUsageChanceAttribute)
 {
     this.EffectID                       = effect;
     this.EffectName                     = effectName;
     this.EffectCategory                 = effectCategory;
     this.PreExpression                  = preExpression;
     this.PostExpression                 = postExpression;
     this.Description                    = description;
     this.GUID                           = guid;
     this.GraphicID                      = graphic;
     this.IsOffensive                    = isOffensive;
     this.IsAssistance                   = isAssistance;
     this.DurationAttributeID            = durationAttribute;
     this.DischargeAttributeID           = dischargeAttribute;
     this.RangeAttributeID               = rangeAttribute;
     this.FallofAttributeID              = fallofAttribute;
     this.DisallowAutoRepeat             = disallowAutoRepeat;
     this.Published                      = published;
     this.DisplayName                    = displayName;
     this.IsWarpSafe                     = isWarpSafe;
     this.RangeChance                    = rangeChance;
     this.ElectronicChance               = electronicChance;
     this.PropulsionChance               = propulsionChance;
     this.Distribution                   = distribution;
     this.SFXName                        = sfxName;
     this.NPCUsageChanceAttributeID      = npcUsageChanceAttribute;
     this.NPCActivationChangeAttributeID = npcActivationChangeAttribute;
     this.FittingUsageChanceAttributeID  = fittingUsageChanceAttribute;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Fill list by effect data
        /// </summary>
        /// <param name="effect"></param>
        private void FillList(LayerEffect effect)
        {
            lsbEffects.Items.Clear();
            lsbEffects.Items.Add(LayerEffect.EmptyEffect(layer, Type));
            EffectCategory group = GetEffectGroup(Type);

            if (group != null)
            {
                LayerEffect selected = null;
                foreach (LayerEffect item in group.Effects)
                {
                    lsbEffects.Items.Add(item);
                    if (effect != null && item.Name == effect.Name)
                    {
                        selected = item;
                    }
                }
                if (selected != null)
                {
                    lsbEffects.SelectedItem = selected;
                }
                else
                {
                    lsbEffects.SelectedIndex = 0;
                }
            }
        }
Exemplo n.º 4
0
 public EffectInfo(string name, EffectCategory effectCategory, bool isTimed = false, bool isShort = false)
 {
     Name           = name;
     EffectCategory = effectCategory;
     IsTimed        = isTimed;
     IsShort        = isShort;
 }
Exemplo n.º 5
0
 public void SetupEffect(EffectCategory category, Dictionary <AttributeEnum, int> atts, Dictionary <StatEnum, int> stats, Dictionary <StatEnum, int> percentStats)
 {
     effectCategory     = category;
     attributeEffects   = atts;
     statEffects        = stats;
     percentStatEffects = percentStats;
 }
Exemplo n.º 6
0
    public void AddEffect(
        EffectCategory category,
        Effect existingEffect)
    {
        Effect addedEffect = effectGameObject.AddComponent <Effect>();

        addedEffect.SetupEffect(existingEffect);
        effectList.Add(addedEffect);
    }
Exemplo n.º 7
0
        public EffectNumber(EffectCategory category, byte subCategory, byte sub2Category, ushort number)
        {
            Category     = category;
            SubCategory  = subCategory;
            Sub2Category = sub2Category;
            Number       = number;

            Id = (uint)((byte)Category * 1000000 + SubCategory * 10000 + Number);
        }
Exemplo n.º 8
0
 private void StopApplyingEffectsByCategory(EffectCategory category, Client forClient = null)
 {
     foreach ((int _, GodmaShipEffect effect) in this.Effects)
     {
         if (effect.Effect.EffectCategory == category && effect.ShouldStart == true)
         {
             this.StopApplyingEffect(effect.Effect, effect, forClient);
         }
     }
 }
Exemplo n.º 9
0
    public void AddEffect(
        EffectCategory category,
        Dictionary <AttributeEnum, int> attributes,
        Dictionary <StatEnum, int> stats,
        Dictionary <StatEnum, int> percentStats)
    {
        Effect addedEffect = effectGameObject.AddComponent <Effect>();

        addedEffect.SetupEffect(category, attributes, stats, percentStats);
        effectList.Add(addedEffect);
    }
Exemplo n.º 10
0
 public EffectInfo(IDataRecord record)
 {
     type          = record.GetValue <EffectType>("id");
     category      = (EffectCategory)record.GetValue <long>("effectcategory");
     _name         = record.GetValue <string>("name");
     duration      = record.GetValue <int>("duration");
     _description  = record.GetValue <string>("description");
     _isPositive   = record.GetValue <bool>("ispositive");
     isAura        = record.GetValue <bool>("isaura");
     auraRadius    = record.GetValue <int>("auraradius");
     _displayFlags = record.GetValue <int>("display");
 }
Exemplo n.º 11
0
    public List <Effect> EffectsOfCategory(EffectCategory targetCategory)
    {
        List <Effect> effectsOfCategory = new List <Effect>();

        foreach (Effect e in effectList)
        {
            if (e.EffectCategory == targetCategory)
            {
                effectsOfCategory.Add(e);
            }
        }
        return(effectsOfCategory);
    }
Exemplo n.º 12
0
        public EffectNumber(uint id)
        {
            Id       = id;
            Category = (EffectCategory)(id / 100000000);

            var tmp = (byte)Category * 100000000;

            SubCategory = (byte)((id - tmp) / 1000000);

            var tmp2 = (byte)SubCategory * 1000000;

            Sub2Category = (byte)((id - (tmp + tmp2)) / 10000);

            var tmp3 = (byte)Sub2Category * 10000;

            Number = (ushort)(id - (tmp + tmp2 + tmp3));
        }
 public void RemoveEffectsByCategory(EffectCategory category)
 {
     RemoveEffects(GetEffectsByCategory(category));
 }
 public IEnumerable <Effect> GetEffectsByCategory(EffectCategory category)
 {
     return(_effects.Where(e => e.Category.HasFlag(category)));
 }
Exemplo n.º 15
0
 public EffectCategoryAttribute(EffectCategory category)
 {
     this.category = category;
 }
Exemplo n.º 16
0
 public Effect(int effectId, EffectCategory effectCategory)
 {
     EffectId = effectId;
     EffectCategory = effectCategory;
 }
Exemplo n.º 17
0
 public EffectCategoryAttribute(EffectCategory category)
 {
     this.Category = category;
 }
 public bool ContainsEffect(EffectCategory category)
 {
     return(Effects.Any(e => e.Category.HasFlag(category)));
 }