internal DecrementExpression(CsTokenList tokens, Expression value, DecrementType decrementType) : base(ExpressionType.Decrement, tokens) { this.value = value; this.decrementType = decrementType; base.AddExpression(value); }
/// <summary> /// Initializes a new instance of the DecrementExpression class. /// </summary> /// <param name="tokens">The list of tokens that form the expression.</param> /// <param name="value">The value being decremented.</param> /// <param name="decrementType">The type of decrement being performed.</param> internal DecrementExpression(CsTokenList tokens, Expression value, DecrementType decrementType) : base(ExpressionType.Decrement, tokens) { Param.AssertNotNull(tokens, "tokens"); Param.AssertNotNull(value, "value"); Param.Ignore(decrementType); this.value = value; this.decrementType = decrementType; this.AddExpression(value); }
/// <summary> /// /// </summary> /// <param name="Effect"></param> public AbstractSpellBuff(CastInfos castInfos, AbstractFighter target, ActiveType activeType, DecrementType decrementType) { CastInfos = castInfos; Duration = target.Fight.CurrentFighter == target ? castInfos.Duration + 1 : castInfos.Duration; Caster = castInfos.Caster; Target = target; ActiveType = activeType; DecrementType = decrementType; switch (castInfos.EffectType) { case EffectEnum.ReflectSpell: Target.Fight.Dispatch(WorldMessage.FIGHT_EFFECT_INFORMATION(CastInfos.EffectType, Target.Id, CastInfos.Value2.ToString(), CastInfos.Value2.ToString(), "10", CastInfos.Value2.ToString(), CastInfos.Duration.ToString(), CastInfos.SpellId.ToString())); break; case EffectEnum.EcaflipChance: case EffectEnum.AddChatiment: Target.Fight.Dispatch(WorldMessage.FIGHT_EFFECT_INFORMATION(CastInfos.EffectType, Target.Id, CastInfos.Value1.ToString(), CastInfos.Value2.ToString(), CastInfos.Value3.ToString(), "", CastInfos.Duration.ToString(), CastInfos.SpellId.ToString())); break; case EffectEnum.PandaCarrier: break; default: Target.Fight.Dispatch(WorldMessage.FIGHT_EFFECT_INFORMATION(CastInfos.EffectType, Target.Id, CastInfos.Value1.ToString(), "", "", "", CastInfos.Duration.ToString(), CastInfos.SpellId.ToString())); break; } }
/// <summary> /// /// </summary> /// <param name="Effect"></param> public AbstractSpellBuff(CastInfos castInfos, AbstractFighter target, ActiveType activeType, DecrementType decrementType) { CastInfos = castInfos; Duration = target.Fight.CurrentFighter == target ? castInfos.Duration + 1 : castInfos.Duration; Caster = castInfos.Caster; Target = target; ActiveType = activeType; DecrementType = decrementType; switch (castInfos.EffectType) { case EffectEnum.ReflectSpell: Target.Fight.Dispatch(WorldMessage.FIGHT_EFFECT_INFORMATION(CastInfos.EffectType, Target.Id, CastInfos.Value2.ToString(), CastInfos.Value2.ToString(), "10", CastInfos.Value2.ToString(), CastInfos.Duration.ToString(), CastInfos.SpellId.ToString())); break; case EffectEnum.EcaflipChance: case EffectEnum.AddChatiment: Target.Fight.Dispatch(WorldMessage.FIGHT_EFFECT_INFORMATION(CastInfos.EffectType, Target.Id, CastInfos.Value1.ToString(), CastInfos.Value2.ToString(), CastInfos.Value3.ToString(), "", CastInfos.Duration.ToString(), CastInfos.SpellId.ToString())); break; case EffectEnum.PandaCarrier: break; default: Target.Fight.Dispatch(WorldMessage.FIGHT_EFFECT_INFORMATION(CastInfos.EffectType, Target.Id, CastInfos.Value1.ToString(), "", "", "", CastInfos.Duration.ToString(), CastInfos.SpellId.ToString())); break; } }