summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 19:49:18 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 19:49:18 +0300
commit624bd43ad0112ab6010c463727ae722bfba1e668 (patch)
tree0698165d7cade531e03a98a0746d3f73c767dea4 /src/net/eathena
parent4fbc26faae3ea4dbfc6c6346f78c8c5377720b17 (diff)
downloadplus-624bd43ad0112ab6010c463727ae722bfba1e668.tar.gz
plus-624bd43ad0112ab6010c463727ae722bfba1e668.tar.bz2
plus-624bd43ad0112ab6010c463727ae722bfba1e668.tar.xz
plus-624bd43ad0112ab6010c463727ae722bfba1e668.zip
Remove some cards number to constants.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/inventoryrecv.cpp10
-rw-r--r--src/net/eathena/mail2recv.cpp4
-rw-r--r--src/net/eathena/mailrecv.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index 0b411d4ba..ead74ad63 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -187,7 +187,7 @@ void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg)
fromBool(flags.bits.isFavorite, Favorite),
Equipm_true,
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
inventory->setOptions(index, options);
}
delete options;
@@ -354,7 +354,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg)
favorite,
fromBool(equipType, Equipm),
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
inventory->setOptions(index, options);
}
ArrowsListener::distributeEvent();
@@ -437,7 +437,7 @@ void InventoryRecv::processPlayerInventory(Net::MessageIn &msg)
fromBool(flags.bits.isFavorite, Favorite),
Equipm_false,
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
}
}
BLOCK_END("InventoryRecv::processPlayerInventory")
@@ -791,7 +791,7 @@ void InventoryRecv::processPlayerStorageAdd(Net::MessageIn &msg)
Favorite_false,
Equipm_false,
Equipped_false);
- Ea::InventoryRecv::mStorage->setCards(index, cards, 4);
+ Ea::InventoryRecv::mStorage->setCards(index, cards, maxCards);
Ea::InventoryRecv::mStorage->setOptions(index, options);
}
}
@@ -1000,7 +1000,7 @@ void InventoryRecv::processPlayerCartAdd(Net::MessageIn &msg)
Favorite_false,
Equipm_false,
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
inventory->setOptions(index, options);
}
else
diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp
index a2080c88c..fdaf34f1d 100644
--- a/src/net/eathena/mail2recv.cpp
+++ b/src/net/eathena/mail2recv.cpp
@@ -159,7 +159,7 @@ void Mail2Recv::processAddItemResult(Net::MessageIn &msg)
delete options;
return;
}
- inventory->setCards(slot, cards, 4);
+ inventory->setCards(slot, cards, maxCards);
inventory->setOptions(slot, options);
inventory->setTag(slot, index);
mailEditWindow->updateItems();
@@ -431,7 +431,7 @@ void Mail2Recv::processReadMail(Net::MessageIn &msg)
delete options;
continue;
}
- inventory->setCards(slot, cards, 4);
+ inventory->setCards(slot, cards, maxCards);
inventory->setOptions(slot, options);
delete options;
}
diff --git a/src/net/eathena/mailrecv.cpp b/src/net/eathena/mailrecv.cpp
index 898c2f671..5e5f0939a 100644
--- a/src/net/eathena/mailrecv.cpp
+++ b/src/net/eathena/mailrecv.cpp
@@ -150,7 +150,7 @@ void MailRecv::processReadMail(Net::MessageIn &msg)
Equipm_false,
Equipped_false);
if (slot != -1)
- inventory->setCards(slot, cards, 4);
+ inventory->setCards(slot, cards, maxCards);
mailViewWindow->updateItems();
}