Пример #1
0
 public static void BuyBuffEffectGlobalEnemies(Viewer viewer, TBuff Buff, int seconds)
 {
     /*
      * if(TConfig.disableGlobalBuffs) { return; }
      * double cost = 0;
      * cost = Buff.Price * seconds;
      */
 }
Пример #2
0
        public static bool DoesBuffexist(string name, out TBuff Buff)
        {
            var item = Bufflist.Find((i) => i.Name.ToLower() == name.ToLower());

            if (item != null)
            {
                Buff = item;
                return(true);
            }

            Buff = null;
            return(false);
        }
Пример #3
0
        public static void BuyPotionEffectCommand(Viewer viewer, TBuff Buff, int seconds)
        {
            if (TConfig.disableBuffs)
            {
                return;
            }
            double cost = 0;

            cost = twitchtestmod.GetBuffprice(Buff.ID) * seconds;
            if (Calls.removecoins(viewer, cost))
            {
                /*if (Main.netMode == NetmodeID.MultiplayerClient)
                 * {
                 *  MainNetworking.BuffAddToQueue(Buff.ID, seconds);
                 *  Calls.sendmessage("@" + viewer.Name + " Your " + seconds + " seconds of " + Buff.Name + " will be applied");
                 *
                 *  return;
                 * }*/

                //buffs are purely clientside it seems lmao

                int duration = seconds * 60;

                Main.player[Main.myPlayer].AddBuff(Buff.ID, duration);

                if (TConfig.ChatBuyAlert)
                {
                    Main.NewText(viewer.Name + " has bought " + seconds + " seconds of " + Buff.Name + " Buff/Debuff", Color.Red);
                }
                Calls.sendmessage("@" + viewer.Name + " Your " + seconds + " seconds of " + Buff.Name + " have been applied");
            }
            else
            {
                Calls.sendmessage("@" + viewer.Name + " you don't have enough Coins for this Buff - it costs " + cost);
            }
        }