summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipesh Amin <yaypunkrock@gmail.com>2011-08-22 10:49:33 +0100
committerDipesh Amin <yaypunkrock@gmail.com>2011-08-22 10:49:33 +0100
commit3f0c9291baebc09c764a022e69f250689465e44f (patch)
tree6d3da1d8d8896b007724bb99a5cbe73553f5abdc
parent10a88e29dd96066663fe104fe7bcbd7739bbc729 (diff)
downloadmanamarket-3f0c9291baebc09c764a022e69f250689465e44f.tar.gz
manamarket-3f0c9291baebc09c764a022e69f250689465e44f.tar.bz2
manamarket-3f0c9291baebc09c764a022e69f250689465e44f.tar.xz
manamarket-3f0c9291baebc09c764a022e69f250689465e44f.zip
Revert "Move some of the packet handling code."
This reverts commit b75d6a31f83173f7649317c4651473e1c9731362.
-rwxr-xr-xmain.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/main.py b/main.py
index da5b2b8..a6c5a03 100755
--- a/main.py
+++ b/main.py
@@ -34,7 +34,6 @@ from net.packet import *
from net.protocol import *
from net.packet_out import *
from player import *
-import net.packet_handler
import tradey
import utils
@@ -693,7 +692,25 @@ def main():
player_node.y = coord_data[3]
elif packet.is_type(SMSG_PLAYER_STAT_UPDATE_1):
- packet_handler.handle_stat_update_1(packet, player_node, logging)
+ stat_type = packet.read_int16()
+ value = packet.read_int32()
+ if stat_type == 0x0005:
+ player_node.HP = value
+ elif stat_type == 0x0006:
+ player_node.MaxHP = value
+ elif stat_type == 0x0007:
+ player_node.MP = value
+ elif stat_type == 0x0008:
+ player_node.MaxMP = value
+ elif stat_type == 0x000b:
+ player_node.LEVEL = value
+ elif stat_type == 0x0018:
+ logging.info("Weight changed from %s/%s to %s/%s", \
+ player_node.WEIGHT, player_node.MaxWEIGHT, value, player_node.MaxWEIGHT)
+ player_node.WEIGHT = value
+ elif stat_type == 0x0019:
+ logging.info("Max Weight: %s", value)
+ player_node.MaxWEIGHT = value
elif packet.is_type(SMSG_PLAYER_STAT_UPDATE_2):
stat_type = packet.read_int16()