aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-03-06 13:14:51 +0100
committerthenecromancer <none@none>2010-03-06 13:14:51 +0100
commit7e99e2f9cc00a341ebd6ba13883d9ec5003a8d18 (patch)
tree77865b9873254be3360b8f6f1c376e238cc7c03d
parent1a4c7c34fe5b6687a57657263cb842c361e52424 (diff)
Send movement packet on creature/player death (expected for animation display, don't ask me why)
Don't bother in case of flying creatures, as there's already something sent --HG-- branch : trunk
-rw-r--r--src/game/Creature.cpp5
-rw-r--r--src/game/Player.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 7aada79974d..4e6891ba5b9 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1487,6 +1487,11 @@ void Creature::setDeathState(DeathState s)
SetHealth(0);
SetPower(getPowerType(),0);
+ // For some reason movement packet is always to be issued on death
+ // send if not going to fall down
+ if (!canFly() && !IsFlying())
+ SendMonsterMove(GetPositionX(), GetPositionY(), GetPositionZ(), 0);
+
if ((canFly() || IsFlying()) && FallGround())
return;
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 884820041b3..342e48d24ff 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1448,6 +1448,11 @@ void Player::setDeathState(DeathState s)
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP, 1);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DEATH, 1);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON, 1);
+
+ // For some reason movement packet is always to be issued on death
+ // send if not going to fall down
+ if (!IsFlying() || GetTransport())
+ SendMonsterMove(GetPositionX(), GetPositionY(), GetPositionZ(), 0);
}
Unit::setDeathState(s);