Jump to content

Matenia

Elite user
  • Posts

    2226
  • Joined

  • Last visited

Bug Report Comments posted by Matenia

  1. Would it be a problem if the default was always the current continent id?
    Then for every vector, I can individually decide if I need to change the continent or not. 

    Ideally, I would like to switch the continent within 1 profile. For example, I am in Wetlands. The next quest is in Ashenvale. 
    I just check movement events => if List<Vector3> .Last().ContinentId != Usefuls.ContinentId => () do continent switch.

    You don't have to change the current Vector3 constructor, it will be a non-breaking change. I think it's easiest if vector have the continent id. But if you think something else is better, then setting a continent id for each quester profile would be fine, as long as I can easily check CurrentProfile.ContinentId (or similar).
     

  2. For now, I solved this by manually setting Fight.InFight = true and it will just continue working normally.
    But I have noticed that whenever you crowd control a mob in vanilla (fear, polymorph, repentance) it will un-target you adn the bot will stop fighting it and completely ignore it.

    I'll get back to you with memory info if I find the time.

  3. For anyone wondering, this works:

    EventsLua.AttachEventLua((LuaEventsId)Enum.Parse(typeof(LuaEventsId), "PLAYER_DEAD"), m => {
      LastDeath = DateTime.Now;
      Logging.WriteDebug("Died, set new timestamp for last death");
    });

     

  4. 3ImTerm.png

    For the following code:

    class AntiDrown
    {
        private static DateTime BreathExpires = DateTime.MaxValue;
    
        public static void Start()
        {
            EventsLuaWithArgs.OnEventsLuaWithArgs += AntiDrownEventHandler;
        }
    
        public static void Stop()
        {
            EventsLuaWithArgs.OnEventsLuaWithArgs -= AntiDrownEventHandler;
        }
    
        private static void AntiDrownEventHandler(LuaEventsId id, List<string> args)
        {
            
            if (id == LuaEventsId.MIRROR_TIMER_START)
            {
                Logging.WriteDebug(args[0] + "  " + args[1]);
            }
            if (id == LuaEventsId.MIRROR_TIMER_START && args[0] == "BREATH")
            {
                //sets BreathExpires to be in the future by x milliseconds
                BreathExpires = DateTime.Now.AddMilliseconds(double.Parse(args[1]));
                Logging.WriteDebug("Breath has " + double.Parse(args[1]) + " milliseconds left");
            }
        }
    
        public static void DontDrown()
        {
            //check if we drown in less than 5 seconds
            while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && DateTime.Now.AddSeconds(5) > BreathExpires)
            {
                Move.JumpOrAscend();
                Thread.Sleep(500);
            }
        }
    }

    I call Start and Stop methos from plugin.

  5. public static void Start()
        {
            EventsLuaWithArgs.OnEventsLuaWithArgs += AntiDrownEventHandler;
        }
    
        public static void Stop()
        {
            EventsLuaWithArgs.OnEventsLuaWithArgs -= AntiDrownEventHandler;
        }
    
        private static void AntiDrownEventHandler(LuaEventsId id, List<string> args)
        {
            
            if (id == LuaEventsId.MIRROR_TIMER_START)
            {
                Logging.WriteDebug(args[0] + "  " + args[1]);
            }
            if (id == LuaEventsId.MIRROR_TIMER_START && args[0] == "BREATH")
            {
                //sets BreathExpires to be in the future by x milliseconds
                BreathExpires = DateTime.Now.AddMilliseconds(double.Parse(args[1]));
                Logging.WriteDebug("Breath has " + double.Parse(args[1]) + " milliseconds left");
            }
        }

    This code is also "bugged". Ingame Lua event handler: works perfectly, it shows event id, "BREATH" and even 4 arguments.
    But using this in the bot, it's never called.

    @Droidz maybe you need to add this event manually?

  6. [E] 15:22:22 - SpellInfo GetSpellInfo(uint id): System.MissingMethodException: Method not found: 'SpellRec wManager.Wow.Helpers.DBC`1.GetRowByIndex(Int32)'.
       at wManager.Wow.Helpers.DBC`1..ctor(UInt32 offset)
       at wManager.Wow.Helpers.SpellDBC..ctor(UInt32 id)
       at wManager.Wow.Helpers.SpellManager.SpellInfoCreateCache(List`1 listId)

  7. [E] 15:17:57 - WoWFactionTemplate(uint id): System.MissingMethodException: Method not found: 'FactionTemplateDbcRecord wManager.Wow.Helpers.DBC`1.GetRowByIndex(Int32)'.
       at wManager.Wow.Helpers.DBC`1..ctor(UInt32 offset)
       at wManager.Wow.Helpers.WoWFactionTemplate..ctor(UInt32 id)
    
    [E] 15:15:48 - WoWFactionTemplate(uint id): System.MissingMethodException: Method not found: 'FactionTemplateDbcRecord wManager.Wow.Helpers.DBC`1.GetRowByIndex(Int32)'.
       at wManager.Wow.Helpers.DBC`1..ctor(UInt32 offset)
       at wManager.Wow.Helpers.WoWFactionTemplate..ctor(UInt32 id)

     

×
×
  • Create New...