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