-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathZCharacterItem.h
63 lines (53 loc) · 1.37 KB
/
ZCharacterItem.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef _ZCHARACTERITEM_H
#define _ZCHARACTERITEM_H
#include "MMatchItem.h"
#include "ZItem.h"
#include "ZFile.h"
#include <list>
#include <algorithm>
using namespace std;
/// 캐릭터가 장비하고 있는 아이템들
class ZCharacterItem
{
private:
protected:
ZItem m_Items[MMCIP_END];
MMatchCharItemParts m_nSelectedWeapon; // 선택한 Item에 대한 m_Items에 해당하는 인덱스
bool Confirm(MMatchCharItemParts parts, MMatchItemDesc* pDesc);
bool IsWeaponItem(MMatchCharItemParts parts);
public:
ZCharacterItem();
virtual ~ZCharacterItem();
void SelectWeapon(MMatchCharItemParts parts);
bool EquipItem(MMatchCharItemParts parts, int nItemDescID, int nItemCount = 1);
bool Reload();
ZItem* GetItem(MMatchCharItemParts parts)
{
if ((parts < MMCIP_HEAD) || (parts >= MMCIP_END))
{
//_ASSERT(0);
return NULL;
}
return &m_Items[(int)parts];
}
ZItem* GetSelectedWeapon();
MMatchCharItemParts GetSelectedWeaponParts() { return (MMatchCharItemParts)m_nSelectedWeapon; }
MMatchCharItemParts GetSelectedWeaponType() {
return m_nSelectedWeapon;
}
bool Save(ZFile *file);
bool Load(ZFile *file, int nReplayVersion);
void ShiftFugitiveValues();
/*
void SetWarppingItemDesc(DWORD tick)
{
for(int i = 0; i < (int)MMCIP_END; ++i)
{
MMatchItemDesc* pDesc = ((MMatchItem)m_Items[i]).GetDesc();
if(pDesc)
pDesc->m_pMItemName->SetWarpingAdd(tick);
}
}
*/
};
#endif