Changeset 282 for trunk/UPlayer.pas
- Timestamp:
- Mar 10, 2019, 4:48:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UPlayer.pas
r274 r282 7 7 uses 8 8 Classes, SysUtils, Graphics, UMap, DOM, fgl, XMLConf, UXMLUtils, Math, 9 UGeometry, UUnit ;9 UGeometry, UUnit, UNation; 10 10 11 11 type … … 120 120 Moves: TUnitMoves; 121 121 Units: TUnits; 122 Nation: TNation; 122 123 function IsAllowedMoveTarget(CellFrom, CellTo: TPlayerCell): Boolean; 123 124 procedure ReduceMovesPower; … … 895 896 Agressivity := Source.Agressivity; 896 897 Defensive := Source.Defensive; 898 Nation := Source.Nation; 897 899 end; 898 900 … … 906 908 Defensive := GetValue(DOMString(Path + '/Defensive'), False); 907 909 Agressivity := TComputerAgressivity(GetValue(DOMString(Path + '/Agressivity'), 0)); 910 Nation := TGame(Game).GameSystem.Nations.FindById(GetValue(DOMString(Path + '/Nation'), 0)); 908 911 end; 909 912 end; … … 918 921 SetValue(DOMString(Path + '/Defensive'), Defensive); 919 922 SetValue(DOMString(Path + '/Agressivity'), Integer(Agressivity)); 923 if Assigned(Nation) then 924 SetValue(DOMString(Path + '/Nation'), Nation.Id) 925 else SetValue(DOMString(Path + '/Nation'), 0) 920 926 end; 921 927 end;
Note:
See TracChangeset
for help on using the changeset viewer.