• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Effects.GameSpellEffect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DOL.GS.Effects.GameSpellEffect的典型用法代码示例。如果您正苦于以下问题:C# GameSpellEffect类的具体用法?C# GameSpellEffect怎么用?C# GameSpellEffect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GameSpellEffect类属于DOL.GS.Effects命名空间,在下文中一共展示了GameSpellEffect类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnEffectStart

		/// <summary>
		/// When an applied effect starts
		/// duration spells only
		/// </summary>
		/// <param name="effect"></param>
		public override void OnEffectStart(GameSpellEffect effect)
		{
			base.OnEffectStart(effect);
			if (effect.Owner.Realm == 0 || Caster.Realm == 0)
			{
				effect.Owner.LastAttackedByEnemyTickPvE = effect.Owner.CurrentRegion.Time;
				Caster.LastAttackTickPvE = Caster.CurrentRegion.Time;
			}
			else
			{
				effect.Owner.LastAttackedByEnemyTickPvP = effect.Owner.CurrentRegion.Time;
				Caster.LastAttackTickPvP = Caster.CurrentRegion.Time;
			}
            effect.Owner.DisarmedTime = effect.Owner.CurrentRegion.Time + CalculateEffectDuration(effect.Owner, Caster.Effectiveness);
			effect.Owner.StopAttack();
			MessageToLiving(effect.Owner, Spell.Message1, eChatType.CT_Spell);
			Message.SystemToArea(effect.Owner, Util.MakeSentence(Spell.Message2, effect.Owner.GetName(0, false)), eChatType.CT_Spell, effect.Owner);
			effect.Owner.StartInterruptTimer(effect.Owner.SpellInterruptDuration, AttackData.eAttackType.Spell, Caster);
			if (effect.Owner is GameNPC)
			{
				IOldAggressiveBrain aggroBrain = ((GameNPC)effect.Owner).Brain as IOldAggressiveBrain;
				if (aggroBrain != null)
					aggroBrain.AddToAggroList(Caster, 1);
			}
		}
开发者ID:boscorillium,项目名称:dol,代码行数:30,代码来源:DisarmSpellHandler.cs


示例2: OnEffectStart

        public override void OnEffectStart(GameSpellEffect effect)
        {
            base.OnEffectStart(effect);
            GameLiving living = effect.Owner as GameLiving;
            living.AbilityBonus[(int)eProperty.Dexterity] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Strength] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Constitution] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Acuity] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Piety] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Empathy] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Quickness] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Intelligence] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Charisma] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.ArmorAbsorption] += (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.MagicAbsorption] += (int)m_spell.Value;

            if (effect.Owner is GamePlayer)
            {
                GamePlayer player = effect.Owner as GamePlayer;
                player.Out.SendCharStatsUpdate();
                player.UpdateEncumberance();
                player.UpdatePlayerStatus();
                player.Out.SendUpdatePlayer();
            }
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:25,代码来源:AllStatsBuff.cs


示例3: OnEffectStart

        public override void OnEffectStart(GameSpellEffect effect)
        {
            base.OnEffectStart(effect);
            //effect.Owner.DebuffCategory[(int)eProperty.Dexterity] += (int)m_spell.Value;
            double percentValue = (m_spell.Value) / 100;
            StrDebuff = (int)((double)effect.Owner.GetModified(eProperty.Strength) * percentValue);
            DexDebuff = (int)((double)effect.Owner.GetModified(eProperty.Dexterity) * percentValue);
            ConDebuff = (int)((double)effect.Owner.GetModified(eProperty.Constitution) * percentValue);
            EmpDebuff = (int)((double)effect.Owner.GetModified(eProperty.Empathy) * percentValue);
            QuiDebuff = (int)((double)effect.Owner.GetModified(eProperty.Quickness) * percentValue);
            IntDebuff = (int)((double)effect.Owner.GetModified(eProperty.Intelligence) * percentValue);
            ChaDebuff = (int)((double)effect.Owner.GetModified(eProperty.Charisma) * percentValue);
            PieDebuff = (int)((double)effect.Owner.GetModified(eProperty.Piety) * percentValue);

            effect.Owner.DebuffCategory[(int)eProperty.Dexterity] += DexDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Strength] += StrDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Constitution] += ConDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Piety] += PieDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Empathy] += EmpDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Quickness] += QuiDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Intelligence] += IntDebuff;
            effect.Owner.DebuffCategory[(int)eProperty.Charisma] += ChaDebuff;

            if (effect.Owner is GamePlayer)
            {
                GamePlayer player = effect.Owner as GamePlayer;
                player.Out.SendCharStatsUpdate();
                player.UpdateEncumberance();
                player.UpdatePlayerStatus();
                player.Out.SendUpdatePlayer();
            }
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:32,代码来源:AllStatsPercentDebuff.cs


示例4: OnEffectStart

        public override void OnEffectStart(GameSpellEffect effect)
        {

            base.OnEffectStart(effect);
            if (effect.Owner is GamePlayer)
            {
                GamePlayer player = effect.Owner as GamePlayer;

                for (int i = (int)eProperty.Skill_First; i <= (int)eProperty.Skill_Last; i++)
                {
                    if (player.GetModifiedSpecLevel(SkillBase.GetPropertyName((eProperty)(i))) != 0)
                    {
                        player.BaseBuffBonusCategory[i] = -player.GetModifiedSpecLevel(SkillBase.GetPropertyName((eProperty)(i)));
                    }
                    //					DOLConsole.WriteWarning("Spec " + SkillBase.GetPropertyName((eProperty)(i)) + " " + player.GetModifiedSpecLevel(SkillBase.GetPropertyName((eProperty)(i))));
                }
                player.PropertiesChanged();
                player.Out.SendCharStatsUpdate();
                player.UpdatePlayerStatus();
                MessageToLiving(effect.Owner, Spell.Message1, eChatType.CT_Spell);
                Message.SystemToArea(effect.Owner, Util.MakeSentence(Spell.Message2, effect.Owner.GetName(0, true)), eChatType.CT_Spell, effect.Owner);

            }

        }
开发者ID:boscorillium,项目名称:dol,代码行数:25,代码来源:VampiirSkillBonusDeBuff.cs


示例5: OnEffectStart

		public override void OnEffectStart(GameSpellEffect effect)
		{

			if (effect.Owner is GamePlayer)
			{
				base.OnEffectStart(effect);
				GamePlayer player = effect.Owner as GamePlayer;
				player.BaseBuffBonusCategory[0] = (int)player.Effectiveness;

				double effectiveness =  player.Effectiveness;
				double valueToAdd = (Spell.Value * effectiveness)/100;
				valueToAdd = effectiveness - valueToAdd;

				if ((valueToAdd) > 0)
				{
					player.Effectiveness = valueToAdd;
				}
				else
				{
					player.Effectiveness = 0;
				}
			

				MessageToLiving(effect.Owner, Spell.Message1, eChatType.CT_Spell);
				Message.SystemToArea(effect.Owner, Util.MakeSentence(Spell.Message2, effect.Owner.GetName(0, true)), eChatType.CT_Spell, effect.Owner);

			}
			
		}
开发者ID:boscorillium,项目名称:dol,代码行数:29,代码来源:VampiirEffectivenessDeBuff.cs


示例6: OnEffectStart

        /// <summary>
        /// When an applied effect starts
        /// duration spells only
        /// </summary>
        /// <param name="effect"></param>
        public override void OnEffectStart(GameSpellEffect effect)
        {
            base.OnEffectStart(effect);

            if (effect.Owner.Realm == 0 || Caster.Realm == 0)
            {
                effect.Owner.LastAttackedByEnemyTickPvE = effect.Owner.CurrentRegion.Time;
                Caster.LastAttackTickPvE = Caster.CurrentRegion.Time;
            }
            else
            {
                effect.Owner.LastAttackedByEnemyTickPvP = effect.Owner.CurrentRegion.Time;
                Caster.LastAttackTickPvP = Caster.CurrentRegion.Time;
            }

            GameSpellEffect mezz = SpellHandler.FindEffectOnTarget(effect.Owner, "Mesmerize");
            if (mezz != null) mezz.Cancel(false);
            effect.Owner.Disease(true);
            effect.Owner.BuffBonusMultCategory1.Set((int)eProperty.MaxSpeed, this, 1.0 - 0.15);
            effect.Owner.BuffBonusMultCategory1.Set((int)eProperty.Strength, this, 1.0 - 0.075);

            SendUpdates(effect);

            MessageToLiving(effect.Owner, Spell.Message1, eChatType.CT_Spell);
            Message.SystemToArea(effect.Owner, Util.MakeSentence(Spell.Message2, effect.Owner.GetName(0, true)), eChatType.CT_System, effect.Owner);

            effect.Owner.StartInterruptTimer(effect.Owner.SpellInterruptDuration, AttackData.eAttackType.Spell, Caster);
            if (effect.Owner is GameNPC)
            {
                IOldAggressiveBrain aggroBrain = ((GameNPC)effect.Owner).Brain as IOldAggressiveBrain;
                if (aggroBrain != null)
                    aggroBrain.AddToAggroList(Caster, 1);
            }
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:39,代码来源:DiseaseSpellHandler.cs


示例7: OnEffectExpires

 public override int OnEffectExpires(GameSpellEffect effect, bool noMessages)
 {
     GamePlayer player = effect.Owner as GamePlayer;
     if (player == null) return base.OnEffectExpires(effect, noMessages);
     GameEventMgr.RemoveHandler((GamePlayer)effect.Owner, GamePlayerEvent.SwimmingStatus, new DOLEventHandler(SwimmingStatusChange));
     return base.OnEffectExpires(effect, noMessages);
 }
开发者ID:mynew4,项目名称:DAoC,代码行数:7,代码来源:AlvarusLeggings.cs


示例8: OnEffectStart

		public override void  OnEffectStart(GameSpellEffect effect)
		{
			//Add the handler for when the target is attacked and we should reduce the damage
			GameEventMgr.AddHandler(FSTarget, GameLivingEvent.AttackedByEnemy, new DOLEventHandler(OnAttacked));

			//Add handlers for the target attacking, casting, etc
			//Don't need to add the handlers twice
			if (FSTarget != Caster)
			{
				GameEventMgr.AddHandler(FSTarget, GameLivingEvent.AttackFinished, new DOLEventHandler(CancelSpell));
				GameEventMgr.AddHandler(FSTarget, GameLivingEvent.CastStarting, new DOLEventHandler(CancelSpell));
			}

			//Send the spell messages
			MessageToLiving(FSTarget, Spell.Message1, eChatType.CT_Spell);
			foreach (GamePlayer player in FSTarget.GetPlayersInRadius(WorldMgr.INFO_DISTANCE))
			{
				if (player != FSTarget)
					MessageToLiving(player, string.Format(Spell.Message3, FSTarget.Name), eChatType.CT_Spell);
			}

			timer = new FSTimer(Caster, this);
			timer.Start(1);

 			base.OnEffectStart(effect);
		}
开发者ID:dudemanvox,项目名称:Dawn-of-Light-Server,代码行数:26,代码来源:FocusShellHandler.cs


示例9: OnEffectExpires

 /// <summary>
 /// When an applied effect expires.
 /// Duration spells only.
 /// </summary>
 /// <param name="effect">The expired effect</param>
 /// <param name="noMessages">true, when no messages should be sent to player and surrounding</param>
 /// <returns>immunity duration in milliseconds</returns>
 public override int OnEffectExpires(GameSpellEffect effect, bool noMessages)
 {
     // http://www.camelotherald.com/more/1749.shtml
     // immunity timer will now be exactly five times the length of the stun
     base.OnEffectExpires(effect, noMessages);
     return Spell.Duration * 5;
 }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:14,代码来源:StyleStun.cs


示例10: IsOverwritable

 /// <summary>
 /// Determines wether this spell is compatible with given spell
 /// and therefore overwritable by better versions
 /// spells that are overwritable cannot stack
 /// </summary>
 /// <param name="compare"></param>
 /// <returns></returns>
 public override bool IsOverwritable(GameSpellEffect compare)
 {
     if (Spell.EffectGroup != 0 || compare.Spell.EffectGroup != 0)
         return Spell.EffectGroup == compare.Spell.EffectGroup;
     if (compare.Spell.SpellType == "Stun") return true;
     return base.IsOverwritable(compare);
 }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:14,代码来源:StyleStun.cs


示例11: OnEffectStart

		public override void OnEffectStart(GameSpellEffect effect)
		{

			effect.Owner.BaseBuffBonusCategory[(int)eProperty.Skill_Stealth]+=(int)m_spell.Value;
			base.OnEffectStart(effect);
	//		effect.Owner.BuffBonusCategory1[(int)eProperty.StealthRange] += (int)m_spell.Value;
		}
开发者ID:boscorillium,项目名称:dol,代码行数:7,代码来源:VampiirStealthDetection.cs


示例12: OnEffectExpires

        public override int OnEffectExpires(GameSpellEffect effect, bool noMessages)
        {
            GameLiving living = effect.Owner as GameLiving;
            living.AbilityBonus[(int)eProperty.Dexterity] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Strength] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Constitution] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Acuity] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Piety] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Empathy] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Quickness] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Intelligence] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.Charisma] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.ArmorAbsorption] -= (int)m_spell.Value;
            living.AbilityBonus[(int)eProperty.MagicAbsorption] -= (int)m_spell.Value;

            if (effect.Owner is GamePlayer)
            {
                GamePlayer player = effect.Owner as GamePlayer;
                player.Out.SendCharStatsUpdate();
                player.UpdateEncumberance();
                player.UpdatePlayerStatus();
                player.Out.SendUpdatePlayer();
            }
            return base.OnEffectExpires(effect, noMessages);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:25,代码来源:AllStatsBuff.cs


示例13: BuffCheckAction

 public BuffCheckAction(GameLiving caster, GameLiving owner, GameSpellEffect effect)
     : base(caster)
 {
     m_caster = caster;
     m_owner = owner;
     m_effect = effect;
 }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:7,代码来源:PropertyChangingSpell.cs


示例14: OnEffectExpires

        /// <summary>
        /// Despawn pet.
        /// </summary>
        /// <param name="effect"></param>
        /// <param name="noMessages"></param>
        /// <returns>Immunity timer (in milliseconds).</returns>
        public override int OnEffectExpires(GameSpellEffect effect, bool noMessages)
        {
            if (Caster.PetCount > 0)
                Caster.PetCount--;

            return base.OnEffectExpires(effect, noMessages);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:13,代码来源:SummonTheurgistPet.cs


示例15: OnEffectPulse

        /// <summary>
        /// When an applied effect pulses
        /// duration spells only
        /// </summary>
        /// <param name="effect"></param>
        public override void OnEffectPulse(GameSpellEffect effect)
        {
            base.OnEffectPulse(effect);

            MessageToLiving(effect.Owner, Spell.Message1, eChatType.CT_YouWereHit);
            Message.SystemToArea(effect.Owner, Util.MakeSentence(Spell.Message2, effect.Owner.GetName(0, false)), eChatType.CT_YouHit, effect.Owner);

            int bleedValue = effect.Owner.TempProperties.getProperty<int>(BLEED_VALUE_PROPERTY);

            AttackData ad = CalculateDamageToTarget(effect.Owner, 1.0);

            SendDamageMessages(ad);

            // attacker must be null, attack result is 0x0A
            foreach (GamePlayer player in ad.Target.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
            {
                player.Out.SendCombatAnimation(null, ad.Target, 0, 0, 0, 0, 0x0A, ad.Target.HealthPercent);
            }
            // send animation before dealing damage else dead livings show no animation
            ad.Target.OnAttackedByEnemy(ad);
            ad.Attacker.DealDamage(ad);

            if (--bleedValue <= 0 || !effect.Owner.IsAlive)
                effect.Cancel(false);
            else effect.Owner.TempProperties.setProperty(BLEED_VALUE_PROPERTY, bleedValue);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:31,代码来源:StyleBleeding.cs


示例16: OnEffectStart

 public override void OnEffectStart(GameSpellEffect effect)
 {
     m_effect = effect;
     base.OnEffectStart(effect);
     GamePlayer player = effect.Owner as GamePlayer;
     if (player == null) return;
     GameEventMgr.AddHandler((GamePlayer)effect.Owner, GamePlayerEvent.SwimmingStatus, new DOLEventHandler(SwimmingStatusChange));
 }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:8,代码来源:AlvarusLeggings.cs


示例17: OnEffectStart

 public override void OnEffectStart(GameSpellEffect effect)
 {
     base.OnEffectStart(effect);
     eChatType toLiving = (Spell.Pulse == 0) ? eChatType.CT_Spell : eChatType.CT_SpellPulse;
     eChatType toOther = (Spell.Pulse == 0) ? eChatType.CT_System : eChatType.CT_SpellPulse;
     MessageToLiving(effect.Owner, Spell.Message1, toLiving);
     Message.SystemToArea(effect.Owner, Util.MakeSentence(Spell.Message2, effect.Owner.GetName(0, false)), toOther, effect.Owner);
 }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:8,代码来源:BladeturnSpellHandler.cs


示例18: OnEffectExpires

 public override int OnEffectExpires(GameSpellEffect effect, bool noMessages)
 {
     GamePlayer player = effect.Owner as GamePlayer;
     if(player == null) return base.OnEffectExpires(effect, noMessages);
     //GameEventMgr.RemoveHandler(player, GamePlayerEvent.TakeDamage, new DOLEventHandler(LivingTakeDamage));
     GameEventMgr.RemoveHandler(player, GamePlayerEvent.AttackedByEnemy, new DOLEventHandler(LivingTakeDamage));
     return base.OnEffectExpires(effect, noMessages);
 }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:8,代码来源:DreamSphere.cs


示例19: IsOverwritable

 public override bool IsOverwritable(GameSpellEffect compare)
 {
     if (Spell.Group != 0)
         return Spell.Group == compare.Spell.Group;
     if (base.IsOverwritable(compare) == false) return false;
     if (compare.Spell.Duration != Spell.Duration) return false;
     return true;
 }
开发者ID:mynew4,项目名称:DAoC,代码行数:8,代码来源:HereticDoTSpellHandler.cs


示例20: OnEffectStart

        public override void OnEffectStart(GameSpellEffect effect)
        {
            base.OnEffectStart(effect);
            if (effect.Owner == null || !effect.Owner.IsAlive)
                return;

            merchant.AddToWorld();
        }
开发者ID:boscorillium,项目名称:dol,代码行数:8,代码来源:Sojourner.cs



注:本文中的DOL.GS.Effects.GameSpellEffect类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Housing.House类代码示例发布时间:2022-05-24
下一篇:
C# GS.SpellLine类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap