-
Notifications
You must be signed in to change notification settings - Fork 1
/
weight.h
38 lines (27 loc) · 976 Bytes
/
weight.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __WEIGHT_H__
#define __WEIGHT_H__
namespace UOX
{
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 );
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