///<summary>Sets the bot players inventory</summary>
        public void SetInventory(PlayerInventory inventory)
        {
            Inventory = inventory ?? new PlayerInventory();

            for (byte i = 0; i < PlayerInventory.InventorySize; i++)
                Client.Send(TerrPacketType.SetInventory, Inventory.InternalItems[i].CreatePayload());
        }
        internal PlayerInventory(PlayerInventory value)
        {
            InternalItems = new GameItem[InventorySize];

            for (byte i = 0; i < InventorySize; i++)
                InternalItems[i] = new GameItem(value.InternalItems[i]);
        }
Example #3
0
 internal Player(PlayerAppearance appearance = null,
     ValPidPair<short> health = null, ValPidPair<short> mana = null,
     BuffList buffs = null, PlayerInventory inventory = null)
 {
     Appearance = appearance ?? new PlayerAppearance();
     Buffs = buffs ?? new BuffList();
     Inventory = inventory ?? new PlayerInventory();
     Health = health ?? new ValPidPair<short>(DefaultHp, DefaultHp);
     Mana = mana ?? new ValPidPair<short>(DefaultMana, DefaultMana);
 }
Example #4
0
 internal Player(Player player)
 {
     Appearance = new PlayerAppearance(player.Appearance);
     Health = new ValPidPair<short>(player.Health);
     Mana = new ValPidPair<short>(player.Mana);
     Buffs = new BuffList(player.Buffs);
     Inventory = new PlayerInventory(player.Inventory);
     PlayerId = player.PlayerId;
 }