Esempio n. 1
0
        // Thanks to Singular Devs for the CombatLogEventArgs class and SpellImmunityManager.
        private static void HandleCombatLog(object sender, LuaEventArgs args)
        {
            var e = new CombatLogEventArgs(args.EventName, args.FireTimeStamp, args.Args);

            //var missType = Convert.ToString(e.Args[14]);

            switch (e.Event)
            {
            case "SWING_MISSED":
                if (e.Args[11].ToString() == "EVADE")
                {
                    CLULogger.TroubleshootLog("Mob is evading swing. Blacklisting it!");
                    Blacklist.Add(e.DestGuid, TimeSpan.FromMinutes(30));
                    if (StyxWoW.Me.CurrentTargetGuid == e.DestGuid)
                    {
                        StyxWoW.Me.ClearTarget();
                    }

                    BotPoi.Clear("Blacklisting evading mob");
                    StyxWoW.SleepForLagDuration();
                }
                else if (e.Args[11].ToString() == "IMMUNE")
                {
                    WoWUnit unit = e.DestUnit;
                    if (unit != null && !unit.IsPlayer)
                    {
                        CLULogger.TroubleshootLog("{0} is immune to {1} spell school", unit.Name, e.SpellSchool);
                        SpellImmunityManager.Add(unit.Entry, e.SpellSchool);
                    }
                }
                break;

            case "SPELL_MISSED":
            case "RANGE_MISSED":
                if (e.Args[14].ToString() == "EVADE")
                {
                    CLULogger.TroubleshootLog("Mob is evading ranged attack. Blacklisting it!");
                    Blacklist.Add(e.DestGuid, TimeSpan.FromMinutes(30));
                    if (StyxWoW.Me.CurrentTargetGuid == e.DestGuid)
                    {
                        StyxWoW.Me.ClearTarget();
                    }

                    BotPoi.Clear("Blacklisting evading mob");
                    StyxWoW.SleepForLagDuration();
                }
                else if (e.Args[14].ToString() == "IMMUNE")
                {
                    WoWUnit unit = e.DestUnit;
                    if (unit != null && !unit.IsPlayer)
                    {
                        CLULogger.TroubleshootLog("{0} is immune to {1} spell school", unit.Name, e.SpellSchool);
                        SpellImmunityManager.Add(unit.Entry, e.SpellSchool);
                    }
                }
                break;

            case "SPELL_AURA_REFRESH":
                if (e.SourceGuid == StyxWoW.Me.Guid)
                {
                    if (e.SpellId == 1822)
                    {
                        Classes.Druid.Common.RakeMultiplier = 1;

                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                        {
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.15;
                        }

                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                        {
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.3;
                        }

                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                        {
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.25;
                        }
                    }
                    if (e.SpellId == 1079)
                    {
                        Classes.Druid.Common.ExtendedRip   = 0;
                        Classes.Druid.Common.RipMultiplier = 1;

                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                        {
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.15;
                        }

                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                        {
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.3;
                        }

                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                        {
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.25;
                        }
                    }
                }
                break;

            case "SPELL_AURA_APPLIED":
                if (e.SourceGuid == StyxWoW.Me.Guid)
                {
                    if (e.SpellId == 1822)
                    {
                        Classes.Druid.Common.RakeMultiplier = 1;

                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                        {
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.15;
                        }

                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                        {
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.3;
                        }

                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                        {
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.25;
                        }
                    }
                    if (e.SpellId == 1079)
                    {
                        Classes.Druid.Common.ExtendedRip   = 0;
                        Classes.Druid.Common.RipMultiplier = 1;

                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                        {
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.15;
                        }

                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                        {
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.3;
                        }

                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                        {
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.25;
                        }
                    }
                }
                break;

            case "SPELL_AURA_REMOVED":
                if (e.SourceGuid == StyxWoW.Me.Guid)
                {
                    if (e.SpellId == 1822)
                    {
                        Classes.Druid.Common.RakeMultiplier = 0;
                    }
                    if (e.SpellId == 1079)
                    {
                        Classes.Druid.Common.ExtendedRip   = 0;
                        Classes.Druid.Common.RipMultiplier = 0;
                    }
                }
                break;
            }
        }
Esempio n. 2
0
        // Thanks to Singular Devs for the CombatLogEventArgs class and SpellImmunityManager.
        private static void HandleCombatLog(object sender, LuaEventArgs args)
        {
            var e = new CombatLogEventArgs(args.EventName, args.FireTimeStamp, args.Args);
            //var missType = Convert.ToString(e.Args[14]);

            switch (e.Event)
            {
                case "SWING_MISSED":
                    if (e.Args[11].ToString() == "EVADE")
                    {
                        CLULogger.TroubleshootLog("Mob is evading swing. Blacklisting it!");
                        Blacklist.Add(e.DestGuid, TimeSpan.FromMinutes(30));
                        if (StyxWoW.Me.CurrentTargetGuid == e.DestGuid)
                        {
                            StyxWoW.Me.ClearTarget();
                        }

                        BotPoi.Clear("Blacklisting evading mob");
                        StyxWoW.SleepForLagDuration();
                    }
                    else if (e.Args[11].ToString() == "IMMUNE")
                    {
                        WoWUnit unit = e.DestUnit;
                        if (unit != null && !unit.IsPlayer)
                        {
                            CLULogger.TroubleshootLog("{0} is immune to {1} spell school", unit.Name, e.SpellSchool);
                            SpellImmunityManager.Add(unit.Entry, e.SpellSchool);
                        }
                    }
                    break;

                case "SPELL_MISSED":
                case "RANGE_MISSED":
                    if (e.Args[14].ToString() == "EVADE")
                    {
                        CLULogger.TroubleshootLog("Mob is evading ranged attack. Blacklisting it!");
                        Blacklist.Add(e.DestGuid, TimeSpan.FromMinutes(30));
                        if (StyxWoW.Me.CurrentTargetGuid == e.DestGuid)
                        {
                            StyxWoW.Me.ClearTarget();
                        }

                        BotPoi.Clear("Blacklisting evading mob");
                        StyxWoW.SleepForLagDuration();
                    }
                    else if (e.Args[14].ToString() == "IMMUNE")
                    {
                        WoWUnit unit = e.DestUnit;
                        if (unit != null && !unit.IsPlayer)
                        {
                            CLULogger.TroubleshootLog("{0} is immune to {1} spell school", unit.Name, e.SpellSchool);
                            SpellImmunityManager.Add(unit.Entry, e.SpellSchool);
                        }
                    }
                    break;
            case "SPELL_AURA_REFRESH":
            if (e.SourceGuid == StyxWoW.Me.Guid)
                {
                    if (e.SpellId == 1822)
                    {
                        Classes.Druid.Common.RakeMultiplier = 1;
                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.15;
                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.3;
                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.25;
                    }
                    if (e.SpellId == 1079)
                    {
                        Classes.Druid.Common.ExtendedRip = 0;
                        Classes.Druid.Common.RipMultiplier = 1;
                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.15;
                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.3;
                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.25;
                    }
                }
                break;
            case "SPELL_AURA_APPLIED":
                if (e.SourceGuid == StyxWoW.Me.Guid)
                {
                    if (e.SpellId == 1822)
                    {
                        Classes.Druid.Common.RakeMultiplier = 1;
                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.15;
                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.3;
                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                            Classes.Druid.Common.RakeMultiplier = Classes.Druid.Common.RakeMultiplier * 1.25;
                    }
                    if (e.SpellId == 1079)
                    {
                        Classes.Druid.Common.ExtendedRip = 0;
                        Classes.Druid.Common.RipMultiplier = 1;
                        //TF
                        if (StyxWoW.Me.HasAura(5217))
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.15;
                        //Savage Roar
                        if (StyxWoW.Me.HasAura(127538))
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.3;
                        //Doc
                        if (StyxWoW.Me.HasAura(108373))
                            Classes.Druid.Common.RipMultiplier = Classes.Druid.Common.RipMultiplier * 1.25;
                    }
                }
                break;
            case "SPELL_AURA_REMOVED":
                if (e.SourceGuid == StyxWoW.Me.Guid)
                {
                    if (e.SpellId == 1822)
                    {
                        Classes.Druid.Common.RakeMultiplier = 0;
                    }
                    if (e.SpellId == 1079)
                    {
                        Classes.Druid.Common.ExtendedRip = 0;
                        Classes.Druid.Common.RipMultiplier = 0;
                    }
                }
                break;
            }
        }