Skip to content

OnLootEntity

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnLootEntity( PlayerLoot instance, BaseEntity targetEntity )
{
    Puts( "OnLootEntity works!" );
}

Location

  • PlayerLoot::StartLootingEntity(BaseEntity targetEntity, bool doPositionChecks)
csharp
//---
	}
	Assert.IsTrue(targetEntity.isServer, "Assure is server");
	this.PositionChecks = doPositionChecks;
	this.entitySource = targetEntity;
	this.itemSource = null;
	Interface.CallHook("OnLootEntity", this, targetEntity);
	this.MarkDirty();
	ILootableEntity lootableEntity = targetEntity as ILootableEntity;
	if (lootableEntity != null)
	{
		lootableEntity.LastLootedBy = base.baseEntity.userID;
//---

Released under the MIT License.