diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 4 | ||||
-rw-r--r-- | src/shared/Database/Database.cpp | 2 |
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); } |