Files
7d2dXG/Mods/zzz_REBIRTH__Utils/Scripts/Network/Inactive/NetPackageAdjustStats.cs
Nathaniel Cosford 062dfab2cd Patched
2025-05-30 01:04:40 +09:30

43 lines
1005 B
C#

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));
}
}
}