Пример #1
0
        public static void RefreshStacks(NPC npc, int time)
        {
            DebuffHandler dbh = npc.GetGlobalNPC <DebuffHandler>();

            for (int i = 0; i < dbh.BarbedBleeds.Count; i += 1)
            {
                int stacktime = dbh.BarbedBleeds[i].timeLeft;
                dbh.BarbedBleeds[i].timeLeft = Math.Max(time, stacktime);
            }
        }
Пример #2
0
        public static bool ApplyBleedStack(NPC npc, int time, bool refresh = true)
        {
            DebuffHandler dbh = npc.GetGlobalNPC <DebuffHandler>();

            if (dbh.BarbedBleeds.Count < 5)
            {
                dbh.BarbedBleeds.Add(new BleedStack(time));
                return(true);
            }

            if (refresh)
            {
                RefreshStacks(npc, time);
            }

            return(false);
        }