Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retaining item attributes when adding to new container #117

Closed
ushort opened this issue May 11, 2019 · 1 comment
Closed

Retaining item attributes when adding to new container #117

ushort opened this issue May 11, 2019 · 1 comment

Comments

@ushort
Copy link

ushort commented May 11, 2019

Current Behavior

Assigning attributes to item then unequipping (and probably trading) said item would lose attributes. This is due to the fact that unequipping items and trading transfer the item to new container using

fun add(item: Int, amount: Int = 1, assureFullInsertion: Boolean = true, forceNoStack: Boolean = false, beginSlot: Int = -1): ItemTransaction {

which only retains item id and amount.

Expected Behavior

Attributes should carry over when creating the new item and adding to new container. Possibly send the item object itself then when creating new item use

fun copyAttr(other: Item): Item {

Steps to Reproduce the Problem

  1. Assign an attribute to an equippable item such as ItemAttribute.CHARGES
  2. Equip then unequip the item and attributes will dissapear
  3. Fix :^]
@Tomm0017
Copy link
Owner

Blocked by #127.

Will be revisited once above system is in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants