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");
PositionChecks = doPositionChecks;
entitySource = targetEntity;
itemSource = null;
Interface.CallHook("OnLootEntity", GetComponent<BasePlayer>(), targetEntity);
MarkDirty();
if (targetEntity is ILootableEntity lootableEntity)
{
lootableEntity.LastLootedBy = base.baseEntity.userID;
lootableEntity.LastLootedByPlayer = base.baseEntity;
//---