Exemplo n.º 1
0
 public void OnPlayerGathering(Player player, GatherEvent evt)
 {
     Invoke("On_PlayerGathering", player, evt);
 }
Exemplo n.º 2
0
 public static void PlayerGather(Inventory rec, ResourceTarget rt, ResourceGivePair rg, ref int amount)
 {
     try
     {
         Fougerite.Player player = Fougerite.Player.FindByNetworkPlayer(rec.networkView.owner);
         GatherEvent ge = new GatherEvent(rt, rg, amount);
         if (OnPlayerGathering != null)
         {
             OnPlayerGathering(player, ge);
         }
         amount = ge.Quantity;
         if (!ge.Override)
         {
             amount = Mathf.Min(amount, rg.AmountLeft());
         }
         rg._resourceItemDatablock = ge.Item;
         rg.ResourceItemName = ge.Item;
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
     }
 }
Exemplo n.º 3
0
 public static void PlayerGatherWood(IMeleeWeaponItem rec, ResourceTarget rt, ref ItemDataBlock db, ref int amount, ref string name)
 {
     try
     {
         Fougerite.Player player = Fougerite.Player.FindByNetworkPlayer(rec.inventory.networkView.owner);
         GatherEvent ge = new GatherEvent(rt, db, amount);
         ge.Item = "Wood";
         if (OnPlayerGathering != null)
         {
             OnPlayerGathering(player, ge);
         }
         db = Fougerite.Server.GetServer().Items.Find(ge.Item);
         amount = ge.Quantity;
         name = ge.Item;
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
     }
 }
Exemplo n.º 4
0
 void OnPlayerGathering(Fougerite.Player param0, GatherEvent param1)
 {
     foreach (KeyValuePair<string, V8Plugin> plugin in plugins)
     {
         plugin.Value.Invoke("On_PlayerGathering", param0, param1); // Deprecated
         plugin.Value.Invoke("OnPlayerGathering", param0, param1);
     }
 }