Example #1
0
 public StatBuff(uint uid, UInt16ReflectedStat statdefinition, uint displayableid, short delta, short duration, int sourceid, short sourcespellid, short realdelta, int delay)
     : base(uid, delta, duration, sourceid, sourcespellid, delay)
 {
     this.StatDefiniton = statdefinition;
     this.DisplayableId = displayableid;
     this.RealDelta     = realdelta;
 }
Example #2
0
 public static void AddRange(Fighter fighter, SpellLevelRecord level, ExtendedSpellEffect effect, List<Fighter> affecteds, short castcellid)
 {
     foreach (var target in affecteds)
     {
         var definition = new UInt16ReflectedStat(StatsRecord.GetFieldInfo("_Range"), target.FighterStats.Stats);
         target.AddBuff(new StatBuff((uint)target.BuffIdProvider.Pop(), definition, (uint)effect.BaseEffect.EffectType, effect.BaseEffect.DiceNum, effect.BaseEffect.Duration, fighter.ContextualId, (short)level.SpellId, effect.BaseEffect.DiceNum, effect.BaseEffect.Delay));
     }
 }
 public static void AddGlobalDamageReduction(Fighter fighter,SpellLevelRecord level,ExtendedSpellEffect effect,List<Fighter> affecteds,short castcellid)
 {
     foreach (var target in affecteds)
     {
         var statdefinition = new UInt16ReflectedStat(StatsRecord.GetFieldInfo("GlobalDamageReduction"),target.FighterStats.Stats);
         StatBuff buff = new StatBuff((uint)target.BuffIdProvider.Pop(), statdefinition, (uint)effect.BaseEffect.EffectId, effect.BaseEffect.DiceNum, effect.BaseEffect.Duration, fighter.ContextualId, (short)level.SpellId, effect.BaseEffect.DiceNum, effect.BaseEffect.Delay);
         target.AddBuff(buff);
     }
 }
Example #4
0
 public static void AddVitalityPercent(Fighter fighter, SpellLevelRecord level, ExtendedSpellEffect effect, List<Fighter> affected, short castcellid)
 {
     short num = (short)((double)fighter.FighterStats.RealStats.LifePoints * ((double)effect.BaseEffect.DiceNum / 100.0));
     foreach (var target in affected)
     {
         var definition = new UInt16ReflectedStat(StatsRecord.GetFieldInfo("LifePoints"), target.FighterStats.Stats);
         target.AddBuff(new StatBuff((uint)target.BuffIdProvider.Pop(), definition, (uint)ActionsEnum.ACTION_CHARACTER_BOOST_VITALITY, num, effect.BaseEffect.Duration, fighter.ContextualId, (short)level.SpellId, num, effect.BaseEffect.Delay));
     }
 }
 public override void SetBuff()
 {
     StatDefinition = GetStatData();
     Fighter.Fight.Send(new GameActionFightDispellableEffectMessage((ushort)EffectsEnum.Eff_Punishment,
                                                                    SourceId, new FightTriggeredEffect(UID, Fighter.ContextualId, Duration, 0, (ushort)SourceSpellId, 0, 0, 0, Delta, Duration, 0)));
 }