summaryrefslogtreecommitdiff
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
parent4fbc26faae3ea4dbfc6c6346f78c8c5377720b17 (diff)
downloadplus-624bd43ad0112ab6010c463727ae722bfba1e668.tar.gz
plus-624bd43ad0112ab6010c463727ae722bfba1e668.tar.bz2
plus-624bd43ad0112ab6010c463727ae722bfba1e668.tar.xz
plus-624bd43ad0112ab6010c463727ae722bfba1e668.zip
Remove some cards number to constants.
-rw-r--r--src/net/eathena/inventoryrecv.cpp10
-rw-r--r--src/net/eathena/mail2recv.cpp4
-rw-r--r--src/net/eathena/mailrecv.cpp2
-rw-r--r--src/net/tmwa/inventoryrecv.cpp8
4 files changed, 12 insertions, 12 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();
}
diff --git a/src/net/tmwa/inventoryrecv.cpp b/src/net/tmwa/inventoryrecv.cpp
index b699fe49e..1dcc445d7 100644
--- a/src/net/tmwa/inventoryrecv.cpp
+++ b/src/net/tmwa/inventoryrecv.cpp
@@ -123,7 +123,7 @@ void InventoryRecv::processPlayerEquipment(Net::MessageIn &msg)
Favorite_false,
Equipm_true,
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
}
if (equipType != 0)
@@ -259,7 +259,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg)
Favorite_false,
fromBool(equipType, Equipm),
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
}
ArrowsListener::distributeEvent();
}
@@ -322,7 +322,7 @@ void InventoryRecv::processPlayerInventory(Net::MessageIn &msg)
Favorite_false,
fromBool(isEquipment, Equipm),
Equipped_false);
- inventory->setCards(index, cards, 4);
+ inventory->setCards(index, cards, maxCards);
}
}
BLOCK_END("InventoryRecv::processPlayerInventory")
@@ -495,7 +495,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);
}
}
BLOCK_END("InventoryRecv::processPlayerStorageAdd")