Upload from upload_mods.ps1
This commit is contained in:
43
Scripts/Network/Inactive/NetPackageAdjustStats.cs
Normal file
43
Scripts/Network/Inactive/NetPackageAdjustStats.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
public class NetPackageAdjustStats : global::NetPackage
|
||||
{
|
||||
private int _entityId;
|
||||
|
||||
public NetPackageAdjustStats Setup(int entityId)
|
||||
{
|
||||
_entityId = entityId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public override void read(PooledBinaryReader br)
|
||||
{
|
||||
_entityId = br.ReadInt32();
|
||||
}
|
||||
|
||||
public override void write(PooledBinaryWriter bw)
|
||||
{
|
||||
base.write(bw);
|
||||
bw.Write(_entityId);
|
||||
}
|
||||
|
||||
public override int GetLength()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
public override void ProcessPackage(World world, GameManager callbacks)
|
||||
{
|
||||
Log.Out("NetPackageAdjustStats-ProcessPackage START");
|
||||
if (world == null)
|
||||
{
|
||||
Log.Out("NetPackageAdjustStats-ProcessPackage WORLD IS NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
EntityNPCRebirth npc = (EntityNPCRebirth)world.GetEntity(this._entityId);
|
||||
|
||||
if (npc != null)
|
||||
{
|
||||
GameManager.Instance.StartCoroutine(RebirthUtilities.adjustNPCStats(npc));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user