/// <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>
 private static void PlayerLeftWorld(DOLEvent e, object sender, EventArgs args)
 {
     if (sender is GamePlayer player)
     {
         SoldiersBarricadeEffect sbEffect = player.EffectList.GetOfType <SoldiersBarricadeEffect>();
         sbEffect?.Cancel(false);
     }
 }
        /// <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>
        private static void PlayerLeftWorld(DOLEvent e, object sender, EventArgs args)
        {
            GamePlayer player = (GamePlayer)sender;

            SoldiersBarricadeEffect SBEffect = player.EffectList.GetOfType <SoldiersBarricadeEffect>();

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