Esempio n. 1
0
        /// <summary>
        /// Start the stag on player
        /// </summary>
        /// <param name="living">The living object the effect is being started on</param>
        public override void Start(GameLiving living)
        {
            base.Start(living);

            m_originalModel = living.Model;

            if (living is GamePlayer)
            {
                if ((living as GamePlayer).Race == (int)eRace.Lurikeen)
                {
                    living.Model = 859;
                }
                else
                {
                    living.Model = 583;
                }
            }


            double m_amountPercent = (m_level + 0.5 + Util.RandomDouble()) / 10;             //+-5% random

            if (living is GamePlayer)
            {
                m_amount = (int)((living as GamePlayer).CalculateMaxHealth(living.Level, living.GetModified(eProperty.Constitution)) * m_amountPercent);
            }
            else
            {
                m_amount = (int)(living.MaxHealth * m_amountPercent);
            }

            living.BaseBuffBonusCategory[(int)eProperty.MaxHealth] += m_amount;
            living.Health += (int)(living.GetModified(eProperty.MaxHealth) * m_amountPercent);
            if (living.Health > living.MaxHealth)
            {
                living.Health = living.MaxHealth;
            }

            living.Emote(eEmote.StagFrenzy);

            if (living is GamePlayer)
            {
                (living as GamePlayer).Out.SendUpdatePlayer();
                (living as GamePlayer).Out.SendMessage(LanguageMgr.GetTranslation((living as GamePlayer).Client, "Effects.StagEffect.HuntsSpiritChannel"), eChatType.CT_YouHit, eChatLoc.CL_SystemWindow);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Start the berserk on a living
        /// </summary>
        public override void Start(GameLiving living)
        {
            base.Start(living);
            m_startModel = living.Model;

            if (living is GamePlayer)
            {
                (living as GamePlayer).Out.SendMessage(LanguageMgr.GetTranslation((living as GamePlayer).Client, "Effects.BerserkEffect.GoBerserkerFrenzy"), eChatType.CT_System, eChatLoc.CL_SystemWindow);
                living.Emote(eEmote.MidgardFrenzy);
                if ((living as GamePlayer).Race == (int)eRace.Dwarf)
                {
                    living.Model = 2032;
                }
                else
                {
                    living.Model = 582;
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Start the berserk on a living
        /// </summary>
        public override void Start(GameLiving living)
        {
            base.Start(living);
            m_startModel = living.Model;

            if (living is GamePlayer)
            {
                (living as GamePlayer).Out.SendMessage(LanguageMgr.GetTranslation((living as GamePlayer).Client, "Effects.BerserkEffect.GoBerserkerFrenzy"), eChatType.CT_System, eChatLoc.CL_SystemWindow);
                living.Emote(eEmote.MidgardFrenzy);
                if ((living as GamePlayer).Race == (int)eRace.Dwarf)
                {
                    living.Model = 2032;
                }
                else
                {
                    living.Model = 582;
                }
            }
        }
Esempio n. 4
0
		/// <summary>
		/// Start the stag on player
		/// </summary>
		/// <param name="living">The living object the effect is being started on</param>
		public override void Start(GameLiving living)
		{
			base.Start(living);

			m_originalModel = living.Model;

			if (living is GamePlayer)
			{
				if ((living as GamePlayer).Race == (int)eRace.Lurikeen)
					living.Model = 859;
				else living.Model = 583;
			}			


			double m_amountPercent = (m_level + 0.5 + Util.RandomDouble()) / 10; //+-5% random
			if (living is GamePlayer)
				m_amount = (int)((living as GamePlayer).CalculateMaxHealth(living.Level, living.GetModified(eProperty.Constitution)) * m_amountPercent);
			else m_amount = (int)(living.MaxHealth * m_amountPercent);

			living.BaseBuffBonusCategory[(int)eProperty.MaxHealth] += m_amount;
			living.Health += (int)(living.GetModified(eProperty.MaxHealth) * m_amountPercent);
			if (living.Health > living.MaxHealth) living.Health = living.MaxHealth;

			living.Emote(eEmote.StagFrenzy);

			if (living is GamePlayer)
			{
				(living as GamePlayer).Out.SendUpdatePlayer();
				(living as GamePlayer).Out.SendMessage(LanguageMgr.GetTranslation((living as GamePlayer).Client, "Effects.StagEffect.HuntsSpiritChannel"), eChatType.CT_YouHit, eChatLoc.CL_SystemWindow);
			}
		}