Core/Units: SetPower should be signed int
This commit is contained in:
1 parent
521df431d2
commit
d27ba7379b
2 files changed
+2
-2
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user