public void How2Dialog(MapCoordinate coor, int windowNum) { //获取当前地图 MoveBiz wbiz = new MoveBiz(windowNum); GameCommonUtil biz = new GameCommonUtil(); MapCoordinate nCoor = wbiz.GetNowMap(); bool flag = biz.CheckIsCloseToNPC(nCoor, coor); if (!flag) { //TODO,记录错误 return; } wbiz.PointPutToGameCoor(coor.coor); //先按F9,在Alt+H wbiz.PingBiPlayer(); WindowAPI.MMouseClick(1); Thread.Sleep(200); //checkDialog //Bitmap bm = PicUtil.GetScreen(); Point po = new Point(); //进入对话框了 if (!biz.HasDialogExist(windowNum, out po)) { Random ra = new Random(); int num = ra.Next(-1, 2); //没进入对话框 wbiz.MMoveRealCoor(num, num); How2Dialog(coor, windowNum); } }
public void ResetPC() { int[] oldpc = AbsolutePC; int[] newpc = new GameCommonUtil().GetPC(WindowNum); RelativePC = new int[2] { newpc[0] - oldpc[0], newpc[1] - oldpc[1] }; AbsolutePC = newpc; Point p1 = Singleton.GetInstance().dicWindows[WindowNum].Point; GameCenterPoint = new Point(p1.X + 320 + AbsolutePC[0], p1.Y - 240 + AbsolutePC[1]); }
public void PreOperate(int windowNum) { GameCommonUtil biz = new GameCommonUtil(); biz.CloseDialogIfExist(windowNum); }