summaryrefslogtreecommitdiff
path: root/src/game-server/inventory.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-07-27 15:02:05 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-07-27 15:02:05 +0200
commitd49f23c7668418ff4f114ba1ae7164038fae94ae (patch)
treee520ce7a527b02c3809c81878abb75bade1f584b /src/game-server/inventory.cpp
parent8aaa341a8ee51853737eabf52fe369f75be07e93 (diff)
downloadmanaserv-d49f23c7668418ff4f114ba1ae7164038fae94ae.tar.gz
manaserv-d49f23c7668418ff4f114ba1ae7164038fae94ae.tar.bz2
manaserv-d49f23c7668418ff4f114ba1ae7164038fae94ae.tar.xz
manaserv-d49f23c7668418ff4f114ba1ae7164038fae94ae.zip
Changed the protocol a bit to use int16 instead of 8.
This is in preparation of fixes for issues: #373, and 379. Equip and inventory related packets are the only ones changed.
Diffstat (limited to 'src/game-server/inventory.cpp')
-rw-r--r--src/game-server/inventory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp
index 8689f299..4e5bd534 100644
--- a/src/game-server/inventory.cpp
+++ b/src/game-server/inventory.cpp
@@ -493,14 +493,14 @@ bool Inventory::equip(int slot, bool override)
* Clean fit. Equip and apply immediately.
*/
equipMsg.writeInt16(slot); // Inventory slot
- equipMsg.writeInt8(it2->size()); // Equip slot type count
+ equipMsg.writeInt16(it2->size()); // Equip slot type count
for (it3 = it2->begin(),
it3_end = it2->end();
it3 != it3_end;
++it3)
{
- equipMsg.writeInt8(it3->first); // Equip slot
- equipMsg.writeInt8(it3->second); // How many are used
+ equipMsg.writeInt16(it3->first); // Equip slot
+ equipMsg.writeInt16(it3->second); // How many are used
/*
* This bit can be somewhat inefficient, but is far better for
* average case assuming most equip use one slot max for each
@@ -598,7 +598,7 @@ bool Inventory::unequip(unsigned int slot, EquipData::iterator *itp)
{
changeEquipment(mPoss->inventory.at(slot).itemId, 0);
equipMsg.writeInt16(slot);
- equipMsg.writeInt8(0);
+ equipMsg.writeInt16(0);
}
if (equipMsg.getLength() > 2)