public void On_LootingEntity(EntityLootEvent ele) { SetHookWorking("On_LootingEntity"); Broadcast(ele.Target.Name + " is being looted by " + ele.Looter.Name); }
/// <summary> /// Called from <c>PlayerLoot.StartLootingEntity(BaseEntity, bool)</c> . /// </summary> public static void On_LootingEntity(PlayerLoot playerLoot) { BasePlayer looter = playerLoot.GetComponent<BasePlayer>(); var ele = new EntityLootEvent(playerLoot, Server.GetPlayer(looter), new Entity(playerLoot.entitySource)); OnNext("On_LootingEntity", ele); if (ele.Cancel) { playerLoot.Clear(); looter.SendConsoleCommand("chat.add", 0, String.Format("{0}: {1}", Server.server_message_name.ColorText("fa5"), ele.cancelReason)); } }
public void OnLootingEntity(EntityLootEvent le) { this.Invoke("On_LootingEntity", le); }