diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-07-27 14:46:41 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-07-27 14:46:41 +0200 |
commit | 8aaa341a8ee51853737eabf52fe369f75be07e93 (patch) | |
tree | 2fe6df6d53955da0f06d175db303df40751faa84 /src/game-server/buysell.cpp | |
parent | 006a213747eb8063ad543211b9776caba027ea4a (diff) | |
download | manaserv-8aaa341a8ee51853737eabf52fe369f75be07e93.tar.gz manaserv-8aaa341a8ee51853737eabf52fe369f75be07e93.tar.bz2 manaserv-8aaa341a8ee51853737eabf52fe369f75be07e93.tar.xz manaserv-8aaa341a8ee51853737eabf52fe369f75be07e93.zip |
Begun Applying the new equipment slot handling design.
now, the equipment slots are independant from the inventory slots
according to the inventory and equipment data.
This will permit to avoid checking the equipment each time
one touches the inventory and vice versa, and make the former
delayed mode useless.
Also, note that equipped items will be removed from inventory
and readded once unequipped.
The design will permit the following, even if not implemented yet:
- To make equipment items stackable again, if wanted.
- Have more than one item with the same id equipped on different
slots using the itemInstance field.
Note: I didn't add the database structure updates yet, to see
whether other changes may later go along with those.
Diffstat (limited to 'src/game-server/buysell.cpp')
-rw-r--r-- | src/game-server/buysell.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game-server/buysell.cpp b/src/game-server/buysell.cpp index a9658546..78c2bfe0 100644 --- a/src/game-server/buysell.cpp +++ b/src/game-server/buysell.cpp @@ -72,9 +72,9 @@ int BuySell::registerPlayerItems() // We parse the player inventory and add all item // in a sell list. - const Possessions &charPoss = mChar->getPossessions(); - for (InventoryData::const_iterator it = charPoss.inventory.begin(), - it_end = charPoss.inventory.end(); it != it_end; ++it) + const InventoryData &inventoryData = mChar->getPossessions().getInventory(); + for (InventoryData::const_iterator it = inventoryData.begin(), + it_end = inventoryData.end(); it != it_end; ++it) { unsigned int nb = it->second.amount; if (!nb) |