public override void OnCast()
		{
			BaseWeapon weapon = Caster.Weapon as BaseWeapon;

			if ( weapon == null || weapon is Fists )
			{
				Caster.SendLocalizedMessage( 1060179 ); // You must be wielding a weapon to use this ability!
			}
			else if ( CheckSequence() )
			{
				Caster.PlaySound( 0x5CA );
				Caster.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Head );
				
				int level = GetFocusLevel( Caster );
				double skill = Caster.Skills[SkillName.Spellweaving].Value;

				TimeSpan duration = TimeSpan.FromSeconds( 10 + Math.Min( (int) ( skill / 24 ), 1 ) + level );
				int damage = 10 + Math.Min( (int) Math.Floor( skill / 24 ), 1 ) + level;
				
				ImmolatingWeaponEntry entry = m_Table[ weapon ] as ImmolatingWeaponEntry;

				if( entry != null )
					entry.Timer.Stop();

				weapon.Immolating = true;

				m_Table[ weapon ] = new ImmolatingWeaponEntry( damage, weapon, duration );
			}

			FinishSequence();
		}
Beispiel #2
0
        public override void OnCast()
        {
            BaseWeapon weapon = this.Caster.Weapon as BaseWeapon;

            if (weapon == null || weapon is Fists || weapon is BaseRanged)
            {
                this.Caster.SendLocalizedMessage(1060179); // You must be wielding a weapon to use this ability!
            }
            else if (this.CheckSequence())
            {
                this.Caster.PlaySound(0x5CA);
                this.Caster.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                if (!IsImmolating(weapon)) // On OSI, the effect is not re-applied
                {
                    double skill = this.Caster.Skills.Spellweaving.Value;

                    int duration = 10 + (int)(skill / 24) + this.FocusLevel;
                    int damage   = 5 + (int)(skill / 24) + this.FocusLevel;

                    Timer stopTimer = Timer.DelayCall <BaseWeapon>(TimeSpan.FromSeconds(duration), StopImmolating, weapon);

                    m_WeaponDamageTable[weapon] = new ImmolatingWeaponEntry(damage, stopTimer, this.Caster);

                    BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.ImmolatingWeapon, 1071028, 1153782, damage));

                    weapon.InvalidateProperties();
                }
            }

            this.FinishSequence();
        }
Beispiel #3
0
        public override void OnCast()
        {
            BaseWeapon weapon = Caster.Weapon as BaseWeapon;

            if (weapon == null || weapon is Fists || weapon is BaseRanged)
            {
                Caster.SendLocalizedMessage(1060179);                   // You must be wielding a weapon to use this ability!
            }
            else if (CheckSequence())
            {
                Caster.PlaySound(0x5CA);
                Caster.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                int focuslevel = GetFocusLevel(Caster);
                int skill      = Caster.Skills[SkillName.Spellweaving].Fixed;

                int duration = 10 + (int)(Math.Floor(skill / 240.0)) + focuslevel;
                int damage   = 5 + (int)(Math.Floor(skill / 240.0)) + focuslevel;

                ImmolatingWeaponEntry iEntry = m_Table[weapon] as ImmolatingWeaponEntry;

                if (iEntry != null)
                {
                    iEntry.m_Timer.Stop();
                }

                weapon.Immolating = true;

                m_Table[weapon] = new ImmolatingWeaponEntry(damage, weapon, Caster, duration);
            }

            FinishSequence();
        }
		public override void OnCast()
		{
			BaseWeapon weapon = Caster.Weapon as BaseWeapon;

			if ( weapon == null || weapon is Fists || weapon is BaseRanged )
			{
				Caster.SendLocalizedMessage( 1060179 ); // You must be wielding a weapon to use this ability!
			}
			else if ( CheckSequence() )
			{
				Caster.PlaySound( 0x5CA );
				Caster.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Head );

				if ( !IsImmolating( weapon ) ) // On OSI, the effect is not re-applied
				{
					double skill = Caster.Skills.Spellweaving.Value;

					int duration = 10 + (int)( skill / 24 ) + FocusLevel;
					int damage = 5 + (int)( skill / 24 ) + FocusLevel;

					Timer stopTimer = Timer.DelayCall<BaseWeapon>( TimeSpan.FromSeconds( duration ), StopImmolating, weapon );

					m_WeaponDamageTable[weapon] = new ImmolatingWeaponEntry( damage, stopTimer, Caster );
					weapon.InvalidateProperties();
				}
			}

			FinishSequence();
		}
        public override void OnCast()
        {
            BaseWeapon weapon = Caster.Weapon as BaseWeapon;

            if (weapon == null || weapon is Fists)
            {
                Caster.SendLocalizedMessage(1060179);                   // You must be wielding a weapon to use this ability!
            }
            else if (CheckSequence())
            {
                Caster.PlaySound(0x5CA);
                Caster.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                int    level = GetFocusLevel(Caster);
                double skill = Caster.Skills[SkillName.Spellweaving].Value;

                TimeSpan duration = TimeSpan.FromSeconds(10 + Math.Min((int)(skill / 24), 1) + level);
                int      damage   = 10 + Math.Min((int)Math.Floor(skill / 24), 1) + level;

                ImmolatingWeaponEntry entry = m_Table[weapon] as ImmolatingWeaponEntry;

                if (entry != null)
                {
                    entry.Timer.Stop();
                }

                weapon.Immolating = true;

                m_Table[weapon] = new ImmolatingWeaponEntry(damage, weapon, duration);
            }

            FinishSequence();
        }
Beispiel #6
0
        public static int GetImmolatingDamage(BaseWeapon w)
        {
            ImmolatingWeaponEntry iEntry = m_Table[w] as ImmolatingWeaponEntry;

            if (iEntry != null)
            {
                return(iEntry.m_Damage);
            }

            return(0);
        }
        public static int GetDamage(BaseWeapon weapon)
        {
            ImmolatingWeaponEntry entry = m_Table[weapon] as ImmolatingWeaponEntry;

            if (entry != null)
            {
                return(entry.Damage);
            }

            return(0);
        }
Beispiel #8
0
        public static void EndImmolating(BaseWeapon weapon, bool playSound)
        {
            ImmolatingWeaponEntry iEntry = m_Table[weapon] as ImmolatingWeaponEntry;

            if (iEntry != null)
            {
                iEntry.m_Timer.Stop();

                if (playSound)
                {
                    iEntry.m_Owner.PlaySound(0x27);
                }
            }

            weapon.Immolating = false;
            m_Table.Remove(weapon);
        }
Beispiel #9
0
        public override void OnCast()
        {
            BaseWeapon weapon = Caster.Weapon as BaseWeapon;

            if ( weapon == null || weapon is Fists || weapon is BaseRanged )
            {
                Caster.SendLocalizedMessage( 1060179 ); // You must be wielding a weapon to use this ability!
            }
            else if ( CheckSequence() )
            {
                Caster.PlaySound( 0x5CA );
                Caster.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Head );

                int focuslevel = GetFocusLevel( Caster );
                int skill = Caster.Skills[SkillName.Spellweaving].Fixed;

                int duration = 10 + (int) ( Math.Floor( skill / 240.0 ) ) + focuslevel;
                int damage = 5 + (int) ( Math.Floor( skill / 240.0 ) ) + focuslevel;

                ImmolatingWeaponEntry iEntry = m_Table[weapon] as ImmolatingWeaponEntry;

                if ( iEntry != null )
                    iEntry.m_Timer.Stop();

                weapon.Immolating = true;

                m_Table[weapon] = new ImmolatingWeaponEntry( damage, weapon, Caster, duration );
            }

            FinishSequence();
        }