diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-20 01:42:11 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-02-03 14:40:45 +0100 |
commit | 94deb596ae86bfe453c9d88e85266caae26e3980 (patch) | |
tree | afb9f3cc90a832420b28b7cb470078b100e11812 /src/net/manaserv/manaserv_protocol.h | |
parent | 86c4819bee1bcd990b6be20f36dcb26938acac8e (diff) | |
download | mana-client-94deb596ae86bfe453c9d88e85266caae26e3980.tar.gz mana-client-94deb596ae86bfe453c9d88e85266caae26e3980.tar.bz2 mana-client-94deb596ae86bfe453c9d88e85266caae26e3980.tar.xz mana-client-94deb596ae86bfe453c9d88e85266caae26e3980.zip |
Simplified and made generic the way the pickup is handled.
I also made the range be taken from the server type
as for the pickup and npc talk ranges.
Last but no least, I fixed the parameters sent with
PGMSG_PICKUP to send the (item) position where to pickup at
as described in the manaserv protocol.
The pickup is still not 100% functional due certainly
to two problems:
1. The client item coordinates might not be the exact same as in the server.
2. The client seems to try to pick up the item a bit too soon,
probably for the reason given in 1.
I'll investigate this in another patch.
Reviewed-by: Thorbjørn Lindeijer, Erik Schilling.
Diffstat (limited to 'src/net/manaserv/manaserv_protocol.h')
-rw-r--r-- | src/net/manaserv/manaserv_protocol.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/manaserv/manaserv_protocol.h b/src/net/manaserv/manaserv_protocol.h index 2c09aaa4..aa1976f1 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -93,8 +93,8 @@ enum { // Game GPMSG_PLAYER_MAP_CHANGE = 0x0100, // S filename, W x, W y GPMSG_PLAYER_SERVER_CHANGE = 0x0101, // B*32 token, S game address, W game port - PGMSG_PICKUP = 0x0110, // W*2 position - PGMSG_DROP = 0x0111, // B slot, B amount + PGMSG_PICKUP = 0x0110, // W * 2 items position + PGMSG_DROP = 0x0111, // W slot, W amount PGMSG_EQUIP = 0x0112, // W inventory slot PGMSG_UNEQUIP = 0x0113, // W item Instance id PGMSG_MOVE_ITEM = 0x0114, // W slot1, W slot2, W amount @@ -441,6 +441,12 @@ enum BeingGender GENDER_UNSPECIFIED }; +/** The permited range to pick up an item */ +const int PICKUP_RANGE = 32 + 16; + +/** The permited range to to talk to a NPC. */ +const int NPC_TALK_RANGE = 32 * 7; + } // namespace ManaServ #endif // MANASERV_PROTOCOL_H |