Jump to content

Matenia

Elite user
  • Posts

    2226
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Matenia got a reaction from Droidz in [All] ItemsManager.GetItemCountByNameLua is incorrect   
    I get it with GetItemCountByNameLUA and on vanilla + tbc. But I noticed on TBC.
  2. Like
    Matenia got a reaction from sith500 in Wrong Lua events   
    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?
  3. Like
    Matenia reacted to Droidz in [All] GetDistance getter method for WoWUnit   
    GetDistance is good it is distance from the center of player to the center of the unit.
    I use PositionWithoutType to avoid useless step (check if fly or swimming) (for performance, but that does not change the result).
    I'll add: 
    public float GeHitBoxtDistance { get { try { var d = PositionWithoutType.DistanceTo(ObjectManager.Me.PositionWithoutType) - CombatReach - ObjectManager.Me.CombatReach; if (d < 0) d = 0; return d; } catch (Exception e) { Logging.WriteError("WoWUnit > GeHitBoxtDistance: " + e); return 0; } } } Current, for spell.isgooddistance I use:
    public bool IsDistanceGood { get { try { if (ObjectManager.ObjectManager.Target.IsValid) { float combatReach = 0; if (wManagerSetting.CurrentSetting.CalcuCombatRange) combatReach = ObjectManager.ObjectManager.Target.CombatReach; if (ObjectManager.ObjectManager.Target.GetDistance <= MaxRange + combatReach && (ObjectManager.ObjectManager.Target.GetDistance >= MinRange - combatReach)) { return true; } } return false; } catch (Exception exception) { Logging.WriteError("Spell > IsDistanceGood: " + exception); return true; } } } And to get player combat range (from fightcalss settings):
    public static float GetRange { get { try { if (_instanceFromOtherAssembly != null) { float range; if (_instanceFromOtherAssembly.Range < 6.5f) { range = 2.7f; if (wManagerSetting.CurrentSetting.CalcuCombatRange && ObjectManager.ObjectManager.Target.IsValid) { range += ObjectManager.ObjectManager.Target.CombatReach; } if (range < 3.5) range = 3.5f; } else { range = _instanceFromOtherAssembly.Range; if (wManagerSetting.CurrentSetting.CalcuCombatRange && ObjectManager.ObjectManager.Target.IsValid) { range += ObjectManager.ObjectManager.Target.CombatReach - 1; } } return range; } return 4.5f; } catch (Exception exception) { Logging.WriteError("CustomClass > GetRange: " + exception); return 5.0f; } } } I will check that (GetRange and isgooddistance), I take note
  4. Like
    Matenia got a reaction from y2krazy in Add mapId (ContinentId) to Vector3   
    Sneak peek at what I'm working on:
     
  5. Like
    Matenia reacted to Droidz in [Vanilla] Deeprun Tram not updating correctly in ObjectManager   
    Hello, wait next update
  6. Like
    Matenia reacted to Droidz in [Vanilla] EquippedItems.GetEquippedItem(WoWInventorySlot.Waist) broken   
    I'll remove GetEquippedItem, this method is useless and broken.
  7. Like
    Matenia reacted to kergudu in Settings support for XML fight classes   
    It tricky but possible 
    This is additional C#, nothing special, only proof (with egyptian brackets, because i am Java programmer )
    And this is fight class: testClass.xml 
    Load it, open Settings and type any known spell. For example, "Steady Shot" for hunter. Then go to target dumy and check.
    Just want to use the same "legally", without special names for settings class. Maybe one more property in fight class
  8. Like
    Matenia reacted to Droidz in [TBC] WoWItem is missing property MaxDurability   
    wait next update
  9. Like
    Matenia reacted to Droidz in EventsLuaWithArgs.OnEventsLuaWithArgs not firing some events   
    It is that I think, Event id change frequently, and when you compile DLL, compiler put id in dll (not the enum name).
    To fix it, try to (by sample) replace:
    if (id == LuaEventsId.MIRROR_TIMER_START) by
    if (id.ToString() == "MIRROR_TIMER_START")  
  10. Like
    Matenia reacted to Droidz in Error since last update 1.12   
    problem resolved, update again wrobot.
  11. Like
    Matenia reacted to Droidz in EventsLuaWithArgs.OnEventsLuaWithArgs not firing some events   
    Hello, run this lua code and check if you have "SPELLCAST_STOP" in wow chat:
    local frame = CreateFrame('Frame') frame:RegisterAllEvents() frame:SetScript('OnEvent', function() DEFAULT_CHAT_FRAME:AddMessage(tostring(event)) end ) This seem to be in wow bug: http://forum.nostalrius.org/viewtopic.php?t=12765&f=38
  12. Like
    Matenia got a reaction from Droidz in Lock Frame never unlocking on Win10   
    Hey,
    I use slightly different code (Hook.IsLockAllowed) now and UnlockFrame(true).
    It seems to work on Win10, I will get back to you, if it bugs again and send you my VS project
×
×
  • Create New...