Closed ushort closed 5 years ago
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 https://github.com/Tomm0017/rsmod/blob/8cd9240c486585d1c778939a0826af8f65e0608b/game/src/main/kotlin/gg/rsmod/game/model/container/ItemContainer.kt#L213 which only retains item id and amount.
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 https://github.com/Tomm0017/rsmod/blob/266684c974f16049bcd93b27330cfca873c49ef0/game/src/main/kotlin/gg/rsmod/game/model/item/Item.kt#L65
Blocked by #127.
Will be revisited once above system is in place.
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 https://github.com/Tomm0017/rsmod/blob/8cd9240c486585d1c778939a0826af8f65e0608b/game/src/main/kotlin/gg/rsmod/game/model/container/ItemContainer.kt#L213 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 https://github.com/Tomm0017/rsmod/blob/266684c974f16049bcd93b27330cfca873c49ef0/game/src/main/kotlin/gg/rsmod/game/model/item/Item.kt#L65
Steps to Reproduce the Problem