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
33 lines
973 B
C++
33 lines
973 B
C++
#ifndef __WEIGHT_H__
|
|
#define __WEIGHT_H__
|
|
|
|
const SI32 MAX_WEIGHT = 6553500; // Max weight (This number / 100, thus max actual weight is 65535.00)
|
|
|
|
class CWeight
|
|
{
|
|
private:
|
|
bool CalcAddWeight( CItem *item, SI32 &totalWeight );
|
|
bool CalcSubtractWeight( CItem *item, SI32 &totalWeight );
|
|
bool IsWeightedContainer( CItem *toCheck );
|
|
|
|
public:
|
|
SI32 CalcCharWeight( CChar *mChar );
|
|
SI32 CalcWeight( CItem *pack );
|
|
|
|
bool IsOverloaded( CChar *mChar ) const;
|
|
bool CheckPackWeight( CChar *ourChar, CItem *pack, CItem *item );
|
|
bool CheckCharWeight( CChar *ourChar, CChar *mChar, CItem *item, UI16 amount = 0 );
|
|
|
|
void AddItemWeight( CBaseObject *getObj, CItem *item );
|
|
void AddItemWeight( CChar *mChar, CItem *item );
|
|
void AddItemWeight( CItem *pack, CItem *item );
|
|
|
|
void SubtractItemWeight( CBaseObject *getObj, CItem *item );
|
|
void SubtractItemWeight( CChar *mChar, CItem *item );
|
|
void SubtractItemWeight( CItem *pack, CItem *item );
|
|
};
|
|
|
|
extern CWeight *Weight;
|
|
|
|
#endif
|
|
|