*Fix typo, and try to avoid killing the dead..
--HG-- branch : trunk
This commit is contained in:
+3
-1
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user