Inventory question

Discussion in 'Plugin Development' started by raGan., Jul 19, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    raGan.

    Can I get player's inventory to play with and not affect that player's inventory ? I am not interested in getContents(), I'd rather create fake player. Is it possible ?
    Thanks.
     
  2. so basicly, you want a copy of its invventory, or a copy of the player itself?
     
  3. Offline

    raGan.

    Dummy player with given inventory.
     
  4. dummy player as kind of standing in world to, or not that far?
     
  5. Offline

    raGan.

    I need to pass instance of Player to the function, I don't want it to affect gameplay in any way.
     
  6. so, only cloning the inventory is good for the think you want, I recommend that you create an new inventory using Server.CrreateInventory, then iterating over the items from the target player and placing them inside the new inventory (dont forgot to copy them else its may mess up between) then displaying the new inventory to the player
     
  7. Offline

    raGan.

    I need to modify player's inventory multiple times, and I want to see the result of modification before it actually happens. And function that modifies it requires an instance of player and accesses his inventory.
     
Thread Status:
Not open for further replies.

Share This Page