Skip to content

OnCorpsePopulate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnCorpsePopulate( NPCPlayer instance, NPCPlayerCorpse nPCPlayerCorpse )
{
    Puts( "OnCorpsePopulate works!" );
}

Location

  • NPCPlayer::CreateCorpse(BasePlayer/PlayerFlags flagsOnDeath, UnityEngine.Vector3 posOnDeath, UnityEngine.Quaternion rotOnDeath, System.Collections.Generic.List`1<TriggerBase> triggersOnDeath, bool forceServerSide)
csharp
//---
				if (!this.KeepCorpseClothingIntact || i != 1)
				{
					itemContainer.Clear();
				}
			}
			object returnvar = Interface.CallHook("OnCorpsePopulate", this, nPCPlayerCorpse);
			if (returnvar is BaseCorpse)
			{
				return (BaseCorpse)returnvar;
			}
			this.ApplyLoot(nPCPlayerCorpse);
//---

Released under the MIT License.