What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

handling "PLAYER_REGEN_DISABLED"

krisg

New Member
Joined
Dec 12, 2011
Messages
21
Reaction score
0
Hi,
where do you get event "PLAYER_REGEN_DISABLED", to check when your player exits combat?

im experimenting on Singular's Evenhandlers.cs uncommented the Logging so i can see the events fired , but it doesnt display "PLAYER_REGEN_DISABLED"

Code:
Lua.Events.AttachEvent("COMBAT_LOG_EVENT_UNFILTERED", HandleCombatLog);

        private static void HandleCombatLog(object sender, LuaEventArgs args)
        {
            var e = new CombatLogEventArgs(args.EventName, args.FireTimeStamp, args.Args);
            Logging.Write(("[CombatLog] " + e.Event + " - " + e.SourceName + " - " + e.SpellName + "[1]" + e.Args[1].ToString()));
 
Hi,
where do you get event "PLAYER_REGEN_DISABLED", to check when your player exits combat?

im experimenting on Singular's Evenhandlers.cs uncommented the Logging so i can see the events fired , but it doesnt display "PLAYER_REGEN_DISABLED"

Code:
Lua.Events.AttachEvent("COMBAT_LOG_EVENT_UNFILTERED", HandleCombatLog);

        private static void HandleCombatLog(object sender, LuaEventArgs args)
        {
            var e = new CombatLogEventArgs(args.EventName, args.FireTimeStamp, args.Args);
            Logging.Write(("[CombatLog] " + e.Event + " - " + e.SourceName + " - " + e.SpellName + "[1]" + e.Args[1].ToString()));

You'll need to add an extra filter to the register call. Singular registers for the COMBAT_LOG_EVENT_UNFILTERED event, but also includes a secondary filter for that event (to cut down on spam from places like BGs, where it can slow the bot to a crawl)

Code:
                !Lua.Events.AddFilter(                    "COMBAT_LOG_EVENT_UNFILTERED",
                    "return args[2] == 'SPELL_CAST_SUCCESS' or args[2] == 'SPELL_AURA_APPLIED' or args[2] == 'SPELL_MISSED'"))

You'll need another condition there to catch PLAYER_REGEN_DISABLED

Code:
                !Lua.Events.AddFilter(
                    "COMBAT_LOG_EVENT_UNFILTERED",
                    "return args[2] == 'SPELL_CAST_SUCCESS' or args[2] == 'SPELL_AURA_APPLIED' or args[2] == 'SPELL_MISSED' or args[2] == 'PLAYER_REGEN_DISABLED'"))
 
Back
Top