*Fix typo, and try to avoid killing the dead..

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-02 01:06:06 -07:00
parent ee8c59baa4
commit 3c270f97ee
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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();
+1 -1
View File
@@ -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);
}