Avoid sending some unnecessary group updates.

This commit is contained in:
hunuza 2008-11-21 18:07:05 +01:00
parent cd50762206
commit 809bd7392f
2 changed files with 7 additions and 4 deletions

View file

@ -9673,6 +9673,9 @@ void Unit::SetMaxHealth(uint32 val)
void Unit::SetPower(Powers power, uint32 val)
{
if(GetPower(power) == val)
return;
uint32 maxPower = GetMaxPower(power);
if(maxPower < val)
val = maxPower;