summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-27 03:36:52 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-27 03:36:52 +0200
commit1b57518ca97c670174f89c5af28659b6ad0c3d42 (patch)
tree369c6e2f8cfbd791f252de68c0f85bd1af47c351 /src/inventory.cpp
parent037248d338291529e0c044a80ca8345abe05dd2b (diff)
downloadplus-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.gz
plus-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.bz2
plus-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.xz
plus-1b57518ca97c670174f89c5af28659b6ad0c3d42.zip
Implement receiving item color from server.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 04a8a8962..4544c09be 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -83,13 +83,14 @@ Item *Inventory::findItem(int itemId) const
return 0;
}
-void Inventory::addItem(int id, int quantity, int refine, bool equipment)
+void Inventory::addItem(int id, int quantity, int refine,
+ unsigned char color, bool equipment)
{
- setItem(getFreeSlot(), id, quantity, refine, equipment);
+ setItem(getFreeSlot(), id, quantity, refine, color, equipment);
}
void Inventory::setItem(int index, int id, int quantity,
- int refine, bool equipment)
+ int refine, unsigned char color, bool equipment)
{
if (index < 0 || index >= static_cast<int>(mSize))
{
@@ -107,7 +108,7 @@ void Inventory::setItem(int index, int id, int quantity,
}
else if (id > 0 && mItems[index])
{
- mItems[index]->setId(id);
+ mItems[index]->setId(id, color);
mItems[index]->setQuantity(quantity);
mItems[index]->setRefine(refine);
mItems[index]->setEquipment(equipment);