BattleNet.ClientlessBot.UsePotion C# (CSharp) Method

UsePotion() public method

public UsePotion ( ) : bool
return bool
        public virtual bool UsePotion()
        {
            Item pot = (from n in BotGameData.Belt.m_items
                    where n.type == "rvl" select n).FirstOrDefault();

            if (pot == default(Item))
            {
                Console.WriteLine("{0}: [D2GS] No potions found in belt!", Account);
                return false;
            }
            SendPacket(0x26, BitConverter.GetBytes(pot.id), GenericServer.nulls, GenericServer.nulls);
            BotGameData.Belt.m_items.Remove(pot);
            return true;
        }