aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-02 01:06:06 -0700
committermaximius <none@none>2009-10-02 01:06:06 -0700
commit3c270f97ee35d2b8e363c6ac2c9cb0e40a533041 (patch)
tree626e26a01d21b6dbc62c367a593ead899f08cb3a
parentee8c59baa49489dd885037c73ff8a152308c556c (diff)
*Fix typo, and try to avoid killing the dead..
--HG-- branch : trunk
-rw-r--r--src/game/Unit.cpp4
-rw-r--r--src/shared/Database/Database.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e4598ad7c75..de868fd27e6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -11958,8 +11958,10 @@ void Unit::SetLevel(uint32 lvl)
void Unit::SetHealth(uint32 val)
{
- if((getDeathState() & (JUST_DIED | DEAD | DEAD_FALLING)) != 0)
+ if((getDeathState() & JUST_DIED) != 0)
val = 0;
+ else if((getDeathState() & DEAD | DEAD_FALLING) != 0)
+ val = 1;
else
{
uint32 maxHealth = GetMaxHealth();
diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp
index f28e4988989..de53990b5a7 100644
--- a/src/shared/Database/Database.cpp
+++ b/src/shared/Database/Database.cpp
@@ -190,7 +190,7 @@ bool Database::_SetDataBlobValue(const uint32 guid, const uint32 field, const ui
return PExecute(
"UPDATE characters SET data="
"CONCAT(SUBSTRING_INDEX(`data`,' ',%u),' ',"
- "%u,' ',SUBSTRING_INDEX(`data`,' ',%i)),"
+ "%u,' ',SUBSTRING_INDEX(`data`,' ',%i))"
"WHERE guid=%u",
field, value, -int32(PLAYER_END-field)-1, guid);
}