Upload from upload_mods.ps1
This commit is contained in:
43
Scripts/Network/NetPackageEntityLootContainerOpenRebirth.cs
Normal file
43
Scripts/Network/NetPackageEntityLootContainerOpenRebirth.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user