summaryrefslogtreecommitdiff
path: root/src/game-server/state.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-11 02:54:10 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-11 02:54:10 +0200
commit9527d079307454178fea3b2958e301875cecc15a (patch)
tree333ed71036813c9cdec4c8e1de1e058b86275bca /src/game-server/state.cpp
parent0820d6632b0ce5887c49d16929ac7903aa185fe4 (diff)
parent8766149dc12d197205b1632ec6e9fc663de05990 (diff)
downloadmanaserv-9527d079307454178fea3b2958e301875cecc15a.tar.gz
manaserv-9527d079307454178fea3b2958e301875cecc15a.tar.bz2
manaserv-9527d079307454178fea3b2958e301875cecc15a.tar.xz
manaserv-9527d079307454178fea3b2958e301875cecc15a.zip
Merge branch 'master' of git://gitorious.org/~bertram/mana/manaserv-equipment-fix into equipment-fix
Conflicts: src/common/manaserv_protocol.h
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r--src/game-server/state.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp
index 03d4b71c..d8f9b183 100644
--- a/src/game-server/state.cpp
+++ b/src/game-server/state.cpp
@@ -108,8 +108,8 @@ static void updateMap(MapComposite *map)
*/
static void serializeLooks(Character *ch, MessageOut &msg, bool full)
{
- const Possessions &poss = ch->getPossessions();
- unsigned int nb_slots = itemManager->getVisibleSlotCount();
+ const EquipData &equipData = ch->getPossessions().getEquipment();
+ unsigned int nb_slots = itemManager->getVisibleEquipSlotCount();
// Bitmask describing the changed entries.
int changed = (1 << nb_slots) - 1;
@@ -125,8 +125,8 @@ static void serializeLooks(Character *ch, MessageOut &msg, bool full)
// Partially build both kinds of packet, to get their sizes.
unsigned int mask_full = 0, mask_diff = 0;
unsigned int nb_full = 0, nb_diff = 0;
- std::map<unsigned int, unsigned int>::const_iterator it =
- poss.equipSlots.begin();
+ std::map<unsigned int, EquipmentItem>::const_iterator it =
+ equipData.begin();
for (unsigned int i = 0; i < nb_slots; ++i)
{
if (changed & (1 << i))
@@ -135,7 +135,7 @@ static void serializeLooks(Character *ch, MessageOut &msg, bool full)
++nb_diff;
mask_diff |= 1 << i;
}
- if (it == poss.equipSlots.end() || it->first > i) continue;
+ if (it == equipData.end() || it->first > i) continue;
ItemClass *eq;
items[i] = it->first && (eq = itemManager->getItem(it->first)) ?
eq->getSpriteID() : 0;