summaryrefslogtreecommitdiff
path: root/src/game-server
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-08-03 22:40:49 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-04 21:50:50 +0200
commitab10088e49785963268fb893e2153857e7f89a09 (patch)
tree988dbc9983b3d21712c1ea125e57e33703f8b344 /src/game-server
parenta3182ee3fc0317e52b6190553b02855b7b031ecd (diff)
downloadmanaserv-ab10088e49785963268fb893e2153857e7f89a09.tar.gz
manaserv-ab10088e49785963268fb893e2153857e7f89a09.tar.bz2
manaserv-ab10088e49785963268fb893e2153857e7f89a09.tar.xz
manaserv-ab10088e49785963268fb893e2153857e7f89a09.zip
Prevent characters from using specials after death
Reviewed-by: Stefan Beller.
Diffstat (limited to 'src/game-server')
-rw-r--r--src/game-server/gamehandler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp
index bbc727a5..8dde8d9a 100644
--- a/src/game-server/gamehandler.cpp
+++ b/src/game-server/gamehandler.cpp
@@ -646,6 +646,9 @@ void GameHandler::handleAttack(GameClient &client, MessageIn &message)
void GameHandler::handleUseSpecialOnBeing(GameClient &client, MessageIn &message)
{
+ if (client.character->getAction() == DEAD)
+ return;
+
const int specialID = message.readInt8();
const int targetID = message.readInt16(); // 0 when no target is selected
Being *being = 0;
@@ -658,6 +661,9 @@ void GameHandler::handleUseSpecialOnBeing(GameClient &client, MessageIn &message
void GameHandler::handleUseSpecialOnPoint(GameClient &client, MessageIn &message)
{
+ if (client.character->getAction() == DEAD)
+ return;
+
const int specialID = message.readInt8();
const int x = message.readInt16();
const int y = message.readInt16();