Exemplo n.º 1
0
        public override void OnEffectStart(GameSpellEffect effect)
        {
            effect.Owner.StartInterruptTimer(effect.Owner.SpellInterruptDuration, AttackData.eAttackType.Spell, Caster);
            player = effect.Owner as GamePlayer;
            if (player == null)
            {
                return;
            }

            int slot = Util.Random(0, 2);

            Slot = slots[slot];
            string msg = GlobalConstants.SlotToName((int)Slot);

            MessageToCaster($"You debuff {effect.Owner.Name}\'s {msg}{string.Empty}", eChatType.CT_Spell);
            foreach (GamePlayer visPlayer in player.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
            {
                visPlayer.Out.SendSpellEffectAnimation(player, player, (ushort)(13180 + slot), 0, false, 0x01);
            }

            item = player.Inventory.GetItem((eInventorySlot)Slot);

            if (item != null)
            {
                old_item_af   = item.DPS_AF;
                old_item_abs  = item.SPD_ABS;
                item.DPS_AF  -= (int)Spell.Value;
                item.SPD_ABS -= Spell.ResurrectMana;
                if (item.DPS_AF < 0)
                {
                    item.DPS_AF = 0;
                }

                if (item.SPD_ABS < 0)
                {
                    item.SPD_ABS = 0;
                }

                player.Client.Out.SendInventoryItemsUpdate(new[] { item });
                player.Out.SendCharStatsUpdate();
                player.UpdatePlayerStatus();
                player.Out.SendUpdatePlayer();
                player.Out.SendUpdateWeaponAndArmorStats();
                player.Out.SendCharResistsUpdate();

                GameEventMgr.AddHandler(player, GamePlayerEvent.Linkdeath, new DOLEventHandler(EventAction));
                GameEventMgr.AddHandler(player, GamePlayerEvent.Quit, new DOLEventHandler(EventAction));
                GameEventMgr.AddHandler(player, GamePlayerEvent.RegionChanged, new DOLEventHandler(EventAction));
                GameEventMgr.AddHandler(player, GameLivingEvent.Dying, new DOLEventHandler(EventAction));
            }

            base.OnEffectStart(effect);
        }
Exemplo n.º 2
0
        public override double GetArmorAbsorb(eArmorSlot slot)
        {
            double abs = GetModified(eProperty.ArmorAbsorption);

            if (this is GuardLord)
            {
                abs += 5;
            }
            else if (this is GuardCaster)
            {
                abs -= 5;
            }

            return(Math.Max(0.0, abs * 0.01));
        }
Exemplo n.º 3
0
		public override void OnEffectStart(GameSpellEffect effect)
		{
			effect.Owner.StartInterruptTimer(effect.Owner.SpellInterruptDuration, AttackData.eAttackType.Spell, Caster);
			player = effect.Owner as GamePlayer;
			if (player == null) return;
			int slot=Util.Random(0, 2);
			m_slot = slots[slot];
			string msg = GlobalConstants.SlotToName((int)m_slot);
			MessageToCaster("You debuff " + effect.Owner.Name + "'s " + msg+"", eChatType.CT_Spell);
			foreach (GamePlayer visPlayer in player.GetPlayersInRadius((ushort)WorldMgr.VISIBILITY_DISTANCE))
				visPlayer.Out.SendSpellEffectAnimation(player, player, (ushort)(13180+slot), 0, false, 0x01);

			item = player.Inventory.GetItem((eInventorySlot)m_slot);
			
			if(item!=null)
			{
				old_item_af=item.DPS_AF;
				old_item_abs=item.SPD_ABS;
				item.DPS_AF -= (int)Spell.Value;
				item.SPD_ABS -= (int)Spell.ResurrectMana;
				if(item.DPS_AF<0) item.DPS_AF=0;
				if(item.SPD_ABS<0) item.SPD_ABS=0;
			
				player.Client.Out.SendInventoryItemsUpdate(new InventoryItem[] { item });
				player.Out.SendCharStatsUpdate();
				player.UpdatePlayerStatus();
				player.Out.SendUpdatePlayer();
				player.Out.SendUpdateWeaponAndArmorStats();
				player.Out.SendCharResistsUpdate();
				
				GameEventMgr.AddHandler(player,GamePlayerEvent.Linkdeath, new DOLEventHandler(EventAction));
				GameEventMgr.AddHandler(player,GamePlayerEvent.Quit, new DOLEventHandler(EventAction));
				GameEventMgr.AddHandler(player,GamePlayerEvent.RegionChanged, new DOLEventHandler(EventAction));
				GameEventMgr.AddHandler(player,GameLivingEvent.Dying, new DOLEventHandler(EventAction));
			}

			base.OnEffectStart(effect);
		}
Exemplo n.º 4
0
 public override double GetArmorAbsorb(eArmorSlot slot)
 {
     // 85% ABS is cap.
     return 0.85 * DragonDifficulty / 100;
 }
Exemplo n.º 5
0
 public override double GetArmorAF(eArmorSlot slot)
 {
     return 1000 * DragonDifficulty / 100;
 }
Exemplo n.º 6
0
		public override double GetArmorAbsorb(eArmorSlot slot)
		{
			double abs = GetModified(eProperty.ArmorAbsorption);

			if (this is GuardLord)
			{
				abs += 5;
			}
			else if (this is GuardCaster)
			{
				abs -= 5;
			}

			return Math.Max(0.0, abs * 0.01);
		}
Exemplo n.º 7
0
		public override double GetArmorAbsorb(eArmorSlot slot)
		{
			// 85% ABS is cap.
			return 0.85 * DragonDifficulty / 100;
		}
Exemplo n.º 8
0
		public override double GetArmorAF(eArmorSlot slot)
		{
			return 1000 * DragonDifficulty / 100;
		}
Exemplo n.º 9
0
 public override double GetArmorAbsorb(eArmorSlot slot)
 {
     return(base.GetArmorAbsorb(slot) - 0.05);
 }