* More UMapManagement
This commit is contained in:
parent
b9a45bf43b
commit
d0557ab86f
|
@ -30,7 +30,7 @@ unit UMapManagement;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, UPacket, UInterfaces, UXmlHelper,
|
||||
Classes, SysUtils, UPacket, UInterfaces, UXmlHelper, UEnhancedMemoryStream,
|
||||
DOM, fgl;
|
||||
|
||||
type
|
||||
|
@ -43,6 +43,7 @@ type
|
|||
FName: String;
|
||||
FPath: String;
|
||||
FDescription: String;
|
||||
procedure WriteToStream(AStream: TEnhancedMemoryStream);
|
||||
public
|
||||
constructor Create(AOwner: IInvalidate);
|
||||
constructor Deserialize(AOwner: IInvalidate; AElement: TDOMElement);
|
||||
|
@ -66,10 +67,25 @@ type
|
|||
function Remove(const Item: TMapState): Integer;
|
||||
end;
|
||||
|
||||
//Network
|
||||
|
||||
{ TMapStateListPacket }
|
||||
|
||||
TMapStateListPacket = class(TPacket)
|
||||
constructor Create(AMapStates: TMapStates);
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TMapState }
|
||||
|
||||
procedure TMapState.WriteToStream(AStream: TEnhancedMemoryStream);
|
||||
begin
|
||||
AStream.WriteStringNull(FName);
|
||||
AStream.WriteStringNull(FPath);
|
||||
AStream.WriteStringNull(FDescription);
|
||||
end;
|
||||
|
||||
constructor TMapState.Create(AOwner: IInvalidate);
|
||||
begin
|
||||
inherited Create;
|
||||
|
@ -149,5 +165,13 @@ begin
|
|||
Invalidate;
|
||||
end;
|
||||
|
||||
{ TMapStateListPacket }
|
||||
|
||||
constructor TMapStateListPacket.Create(AMapStates: TMapStates);
|
||||
begin
|
||||
inherited Create($0F, 0);
|
||||
FStream.WriteByte($01);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
Loading…
Reference in New Issue