Jump to content

i need some help


Recommended Posts

@DroidzI previously created a topic https://wrobot.eu/bugtracker/problem-with-the-combat-system-r1528/ it describes the problem. I spent a lot more time and it seems I was able to find the logic. There is 1 more additional faction on my server. Players of this faction can attack the Alliance, Horde, and even players of their own faction. At the moment, everything works as follows => The Alliance can respond to Horde attacks. The Horde can respond to Alliance attacks. However, neither the Alliance nor the Horde will respond to the attacks of the 3rd faction. Also, if the character belongs to the 3rd faction, then he will not respond to any attacks in principle. I tried to find at least similar problems and their solutions on the forum, but to no avail. Playing as a character from the Alliance, I targeted a player from the 3rd faction. Screenshot in attachment.How can I patch this hole?image.png.3235c2d828d5d820f25d175b08d2cd6c.png

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

I'm sorry but WRobot does not support custom game clients.

You can try to change the behavior with a plugin, but it might be complicated, here is an example of code (not tested):

 

using System.Linq;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) =>
        {
            if (state is wManager.Wow.Bot.States.Regeneration)
            {
                var units = wManager.Wow.ObjectManager.ObjectManager.GetObjectWoWUnit();
                units.AddRange(wManager.Wow.ObjectManager.ObjectManager.GetObjectWoWPlayerTargetMe());
                foreach (var unit in units.OrderBy(u => u.GetDistance))
                {
                    if (unit.IsValid &&
                        unit.IsAlive &&
                        unit.GetDistance < 40 &&
                        unit.Reaction <= wManager.Wow.Enums.Reaction.Neutral &&
                        //unit.InCombatFlagOnly &&
                        unit.IsTargetingMe)
                    {
                        var failGuid = wManager.Wow.Helpers.Fight.StartFight(unit.Guid);
                        if (failGuid != 0)
                        {
                            wManager.wManagerSetting.AddBlackList(failGuid, 30*1000);
                        }

                        return;
                    }
                }
            }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...