Ejemplo n.º 1
0
 public void On_LootingEntity(EntityLootEvent ele)
 {
     SetHookWorking("On_LootingEntity");
     Broadcast(ele.Target.Name + " is being looted by " + ele.Looter.Name);
 }
Ejemplo n.º 2
0
        /// <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));
            }
        }
Ejemplo n.º 3
0
 public void OnLootingEntity(EntityLootEvent le)
 {
     this.Invoke("On_LootingEntity", le);
 }