Пример #1
0
        public InventoryModEvent(ItemContainer itemContainer, Item item)
        {
            ItemContainer = itemContainer;
            Item = new InvItem(item);

            if (itemContainer.playerOwner != null)
                Player = Server.GetPlayer(itemContainer.playerOwner);

            if (itemContainer.entityOwner != null)
                Entity = new Entity(itemContainer.entityOwner);
        }
Пример #2
0
 public GatherEvent(ResourceDispenser resourceDispenser,
                    BaseEntity from,
                    BaseEntity to,
                    ItemAmount itemAmount,
                    int amount)
 {
     if (to is BasePlayer) {
         ResourceDispenser = resourceDispenser;
         Resource = new Entity(from);
         Gatherer = Server.GetPlayer(to as BasePlayer);
         ItemAmount = itemAmount;
         Amount = (int)(amount * World.GetInstance().ResourceGatherMultiplier);
     }
 }
Пример #3
0
 public ShootRocketEvent(BaseLauncher baseLauncher, BaseEntity.RPCMessage msg, BaseEntity baseEntity)
 {
     BaseLauncher = baseLauncher;
     Entity = new Entity(baseEntity);
     Player = Server.GetPlayer(msg.player);
 }
Пример #4
0
 public CorpseInitEvent(BaseCorpse baseCorpse, BaseEntity baseEntity)
 {
     Corpse = baseCorpse;
     Parent = new Entity(baseEntity);
 }
Пример #5
0
 public DoorUseEvent(Door door, BaseEntity.RPCMessage msg, bool open)
 {
     Door = new Entity(door);
     Player = Server.GetPlayer(msg.player);
     Open = open;
 }