Jump to content
This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

  • 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



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...