Changeset 223 for trunk/Forms/UFormClient.pas
- Timestamp:
- Jul 14, 2018, 7:21:43 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r222 r223 85 85 procedure DoNextPlayer(Sender: TObject); 86 86 procedure DoTurnStart(Sender: TObject); 87 procedure DoMove(CellFrom, CellTo: T Cell; var CountOnce,87 procedure DoMove(CellFrom, CellTo: TPlayerCell; var CountOnce, 88 88 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); 89 89 procedure SetToolbarHints; … … 129 129 end; 130 130 131 procedure TFormClient.DoMove(CellFrom, CellTo: T Cell; var CountOnce,131 procedure TFormClient.DoMove(CellFrom, CellTo: TPlayerCell; var CountOnce, 132 132 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); 133 133 var … … 146 146 FormMove.TrackBarRepeat.Max := FormMove.SpinEditRepeat.MaxValue; 147 147 FormMove.TrackBarRepeat.Position := FormMove.SpinEditRepeat.Value; 148 FormMove.DefendCount := CellTo. Power;148 FormMove.DefendCount := CellTo.MapCell.Power; 149 149 // Attack count from other surrounding cells without current move if already exists 150 150 FormMove.AttackCount := 0; … … 152 152 if TUnitMove(CellTo.MovesTo[I]).CellFrom <> CellFrom then 153 153 FormMove.AttackCount := FormMove.AttackCount + TUnitMove(CellTo.MovesTo[I]).CountOnce; 154 FormMove.ShowWinProbability := CellTo. Player <> CellFrom.Player;154 FormMove.ShowWinProbability := CellTo.MapCell.Player <> CellFrom.MapCell.Player; 155 155 156 156 if FormMove.ShowModal = mrOk then begin … … 456 456 Y: Integer); 457 457 var 458 Cell: T Cell;459 OldCell: T Cell;458 Cell: TPlayerCell; 459 OldCell: TPlayerCell; 460 460 CellPos: TPoint; 461 461 begin … … 473 473 OldCell := Client.View.FocusedCell; 474 474 with Core.Game do 475 Cell := Map.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 475 if Assigned(Client.ControlPlayer) then 476 Cell := Client.ControlPlayer.PlayerMap.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 477 //else Cell := Client.Game.Map.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 476 478 if Assigned(Cell) then begin 477 479 Client.View.FocusedCell := Cell; 478 StatusBar1.Panels[0].Text := '[' + IntToStr(Cell. PosPx.X) + ', ' + IntToStr(Cell.PosPx.Y) +479 '] (' + IntToStr(Cell.MovesFrom.Count) + ', ' + IntToStr(Cell.MovesTo.Count) + ') ' + IntToStr(Cell. Id);480 StatusBar1.Panels[0].Text := '[' + IntToStr(Cell.MapCell.PosPx.X) + ', ' + IntToStr(Cell.MapCell.PosPx.Y) + 481 '] (' + IntToStr(Cell.MovesFrom.Count) + ', ' + IntToStr(Cell.MovesTo.Count) + ') ' + IntToStr(Cell.MapCell.Id); 480 482 end else begin 481 483 Client.View.FocusedCell := nil;
Note:
See TracChangeset
for help on using the changeset viewer.