Jump to content
  • wManager.wManagerSetting.AddBlackList


    camelot10
    • Version: All Product: WRobot General Type: Bug Status: Fixed

    got log exception on this pulse

    		var minDist = 4f;
    		var maxDist = 7.9f;
    		var hotspots = new List<Vector3>()
    		{
    			new Vector3(638.8924, 3873.87, 5.704087),
    			new Vector3(606.0243, 3977.057, 1.479222),
    			new Vector3(627.6233, 3990.815, 1.493116),
    			new Vector3(576.6996, 4140.164, 6.446392),
    			new Vector3(498.8184, 4082.349, 1.641463),
    			new Vector3(428.8905, 3868.308, 1.493321),
    			new Vector3(458.507, 3796.811, 1.493484),
    			new Vector3(478.5104, 3816.078, 1.493527),
    		};
    		var deltas = new List<Vector3>()
    		{
    			new Vector3(0, 0, 0) * minDist,
    			new Vector3(1, 0, 0) * minDist,
    			new Vector3(-1, 0, 0) * minDist,
    			new Vector3(0, 1, 0) * minDist,
    			new Vector3(0, -1, 0) * minDist,
    			new Vector3(1, 1, 0) * minDist,
    			new Vector3(-1, 1, 0) * minDist,
    			new Vector3(1, -1, 0) * minDist,
    			new Vector3(-1, -1, 0) * minDist,
    		};
    		var notice = ObjectManager.GetNearestWoWGameObject(ObjectManager.GetWoWGameObjectByEntry(266285));
    		if (notice != null && notice.IsValid)
    		{
    			if (notice.GetDistance < maxDist)
    			{
    				Logging.WriteDebug("[Help on the Way] use notice " + notice.Name);
    				MountTask.DismountMount();
    				Thread.Sleep(Usefuls.Latency * 2);
    				Interact.InteractGameObject(notice.GetBaseAddress, true, false);
    				if (!wManager.wManagerSetting.IsBlackListed(notice.Guid))
    					wManager.wManagerSetting.AddBlackList(notice.Guid, 5 * 60 * 1000, true);
    
    				return true;
    			}
    			var result = false;
    			foreach (var delta in deltas)
    			{
    				var p = notice.Position + delta;
    				var path = PathFinder.FindPath(p, out result);
    				if (result)
    				{
    					Logging.WriteDebug("[Help on the Way] found good notice landpoint " + notice.Position.ToStringNewVector()+" + "+ delta.ToStringNewVector() );
    					GoToTask.ToPosition(p);
    					return true;
    				}
    			}
    			if (!wManager.wManagerSetting.IsBlackListed(notice.Guid))
    			{
    				Logging.WriteDebug("[Help on the Way] blacklist " + notice.Name + " at " +notice.Position.ToStringNewVector() );
    				wManager.wManagerSetting.AddBlackList(notice.Guid, 5 * 60 * 1000, true);
    			}
    			return true;
    		}
    		var p0 = hotspots[Others.Random(0, hotspots.Count - 1)];
    		Logging.WriteDebug("[Help on the Way] searching notices at " + p0.ToStringNewVector());
    		GoToTask.ToPosition(p0);
    		return true;

    log:

    [E] 00:51:58 - AddBlackList(Int128 guid, int timeInMilisec = -1): System.ArgumentException: Элемент с тем же ключом уже был добавлен.
       в System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       в System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       в wManager.wManagerSetting.AddBlackList(Int128 guid, Int32 timeInMilisec, Boolean isSessionBlacklist)

    what im doing wrong ?



    User Feedback

    Recommended Comments



    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...