44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
public class NetPackageEntityLootContainerOpenRebirth : NetPackage
|
|
{
|
|
public NetPackageEntityLootContainerOpenRebirth Setup(int _entityId)
|
|
{
|
|
//Log.Out("NetPackageEntityLootContainerOpenRebirth-Setup START");
|
|
this.entityId = _entityId;
|
|
return this;
|
|
}
|
|
|
|
public override void read(PooledBinaryReader _reader)
|
|
{
|
|
this.entityId = _reader.ReadInt32();
|
|
}
|
|
|
|
public override void write(PooledBinaryWriter _writer)
|
|
{
|
|
base.write(_writer);
|
|
_writer.Write(this.entityId);
|
|
}
|
|
|
|
public override void ProcessPackage(World _world, GameManager _callbacks)
|
|
{
|
|
//Log.Out("NetPackageEntityLootContainerOpenRebirth-ProcessPackage START");
|
|
if (_world == null)
|
|
{
|
|
//Log.Out("NetPackageEntityLootContainerOpenRebirth-ProcessPackage 1");
|
|
return;
|
|
}
|
|
EntityAlive entityAlive = (EntityAlive)_world.GetEntity(this.entityId);
|
|
if (entityAlive != null)
|
|
{
|
|
//Log.Out("NetPackageEntityLootContainerOpenRebirth-ProcessPackage 2");
|
|
entityAlive.FireEvent(MinEventTypes.onSelfLootContainer, true);
|
|
}
|
|
}
|
|
|
|
public override int GetLength()
|
|
{
|
|
return 4;
|
|
}
|
|
|
|
protected int entityId;
|
|
}
|