mirror of
https://github.com/UOX3DevTeam/UOX3
synced 2026-08-13 12:27:04 -04:00
Misc cleanup and standardization of style and naming conventions in code and scripts Added missing code for showing race in paperdoll based on ini setting Players can no longer use Polymorph spell while incognitoed, or while under effect of tribal paint Players can no longer use Incognito spell while polymorphed, or while under the effects of tribal paint Facial hair is now removed from players who are under the effects of Incognito spell that changes their gender for female
26 lines
711 B
C++
26 lines
711 B
C++
#ifndef __POWER_H__
|
|
#define __POWER_H__
|
|
#include <cstdint>
|
|
//o------------------------------------------------------------------------------------------------o
|
|
//| Function - power()
|
|
//o------------------------------------------------------------------------------------------------o
|
|
//| Purpose - Integer based version of the pow() function
|
|
//o------------------------------------------------------------------------------------------------o
|
|
inline std::uint32_t power( std::uint32_t base, std::uint32_t exponent )
|
|
{
|
|
if( exponent == 0 )
|
|
return 1;
|
|
|
|
if( exponent > 0 )
|
|
{
|
|
auto total = base;
|
|
for( std::uint32_t i = 1; i < exponent; ++i )
|
|
{
|
|
total *= base;
|
|
}
|
|
return total;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
#endif
|