Core/Units: SetPower should be signed int

This commit is contained in:
Rat committed 2011-11-27 20:23:48 +01:00
1 parent 521df431d2
commit d27ba7379b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -13634,7 +13634,7 @@ uint32 Unit::GetPowerIndexByClass(uint32 powerId, uint32 classId) const
return 0;
};
void Unit::SetPower(Powers power, uint32 val)
void Unit::SetPower(Powers power, int32 val)
{
uint32 maxPower = GetMaxPower(power);
if (maxPower < val)
+1 -1
View File
@@ -1371,7 +1371,7 @@ class Unit : public WorldObject
void setPowerType(Powers power);
int32 GetPower(Powers power) const { return GetUInt32Value(UNIT_FIELD_POWER1+power); }
uint32 GetMaxPower(Powers power) const { return GetUInt32Value(UNIT_FIELD_MAXPOWER1+power); }
void SetPower(Powers power, uint32 val);
void SetPower(Powers power, int32 val);
void SetMaxPower(Powers power, int32 val);
// returns the change in power
int32 ModifyPower(Powers power, int32 val);