summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-12-16 18:49:09 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-12-16 20:09:13 +0100
commitf862b7ecb1fc9c410a693eac0accf5081830ab5e (patch)
tree660f1c07d9260349edf83738825408a598097b4d /src/net
parent6b7833deee20e3abb5856d64d7f359d754fea4ca (diff)
downloadmana-f862b7ecb1fc9c410a693eac0accf5081830ab5e.tar.gz
mana-f862b7ecb1fc9c410a693eac0accf5081830ab5e.tar.bz2
mana-f862b7ecb1fc9c410a693eac0accf5081830ab5e.tar.xz
mana-f862b7ecb1fc9c410a693eac0accf5081830ab5e.zip
Stored the cached config value which says if non-crucial particle effects are enabled or not in a static member of class Particle instead of an instanced member of Being.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/beinghandler.cpp18
-rw-r--r--src/net/ea/protocol.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 1ede1b8d..cba1c984 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -50,6 +50,7 @@ BeingHandler::BeingHandler(bool enableSync):
SMSG_BEING_MOVE,
SMSG_BEING_MOVE2,
SMSG_BEING_REMOVE,
+ SMSG_SKILL_DAMAGE,
SMSG_BEING_ACTION,
SMSG_BEING_SELFEFFECT,
SMSG_BEING_EMOTION,
@@ -290,6 +291,23 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
break;
+ case SMSG_SKILL_DAMAGE:
+ msg.readInt16(); // Skill Id
+ srcBeing = beingManager->findBeing(msg.readInt32());
+ dstBeing = beingManager->findBeing(msg.readInt32());
+ msg.readInt32(); // Server tick
+ msg.readInt32(); // src speed
+ msg.readInt32(); // dst speed
+ param1 = msg.readInt32(); // Damage
+ msg.readInt16(); // Skill level
+ msg.readInt16(); // Div
+ msg.readInt8(); // Skill hit/type (?)
+ if (dstBeing)
+ dstBeing->takeDamage(srcBeing, param1, Being::HIT); // Perhaps a new skill attack type should be created and used?
+ if (srcBeing)
+ srcBeing->handleAttack(dstBeing, param1, Being::HIT);
+ break;
+
case SMSG_BEING_ACTION:
srcBeing = beingManager->findBeing(msg.readInt32());
dstBeing = beingManager->findBeing(msg.readInt32());
diff --git a/src/net/ea/protocol.h b/src/net/ea/protocol.h
index 75d0d30e..f17ded61 100644
--- a/src/net/ea/protocol.h
+++ b/src/net/ea/protocol.h
@@ -95,6 +95,7 @@ static const int STORAGE_OFFSET = 1;
#define SMSG_PLAYER_SKILLS 0x010f
#define SMSG_PLAYER_SKILL_UP 0x010e
#define SMSG_SKILL_FAILED 0x0110
+#define SMSG_SKILL_DAMAGE 0x01de
#define SMSG_ITEM_USE_RESPONSE 0x00a8
#define SMSG_ITEM_VISIBLE 0x009d /**< An item is on the floor */
#define SMSG_ITEM_DROPPED 0x009e /**< An item is dropped */