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); }
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); } }
public ShootRocketEvent(BaseLauncher baseLauncher, BaseEntity.RPCMessage msg, BaseEntity baseEntity) { BaseLauncher = baseLauncher; Entity = new Entity(baseEntity); Player = Server.GetPlayer(msg.player); }
public CorpseInitEvent(BaseCorpse baseCorpse, BaseEntity baseEntity) { Corpse = baseCorpse; Parent = new Entity(baseEntity); }
public DoorUseEvent(Door door, BaseEntity.RPCMessage msg, bool open) { Door = new Entity(door); Player = Server.GetPlayer(msg.player); Open = open; }