Exemplo n.º 1
0
 /// <summary>
 /// Called when a player leaves the game
 /// </summary>
 /// <param name="e">The event which was raised</param>
 /// <param name="sender">Sender of the event</param>
 /// <param name="args">EventArgs associated with the event</param>
 protected void PlayerLeftWorld(DOLEvent e, object sender, EventArgs args)
 {
     if (sender is GamePlayer player)
     {
         BloodDrinkingEffect bloodDrinking = player.EffectList.GetOfType <BloodDrinkingEffect>();
         bloodDrinking?.Cancel(false);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Called when a player leaves the game
        /// </summary>
        /// <param name="e">The event which was raised</param>
        /// <param name="sender">Sender of the event</param>
        /// <param name="args">EventArgs associated with the event</param>
        protected void PlayerLeftWorld(DOLEvent e, object sender, EventArgs args)
        {
            GamePlayer player = sender as GamePlayer;

            BloodDrinkingEffect BloodDrinking = (BloodDrinkingEffect)player.EffectList.GetOfType <BloodDrinkingEffect>();

            if (BloodDrinking != null)
            {
                BloodDrinking.Cancel(false);
            }
        }