StatusWnd.h
上传用户:cydong117
上传日期:2009-11-10
资源大小:638k
文件大小:3k
- #ifndef _CSTATUSWND_H
- #define _CSTATUSWND_H
- #pragma pack(1)
- typedef struct tagSTANDARDMAGIC
- {
- WORD wMagicID;
- char szMagicName[13];
- BYTE bEffectType;
- BYTE bEffect;
- WORD wSpell;
- WORD wMinPower;
- BYTE btNeed[4];
- INT nTrain[4];
- BYTE btMaxTrainLevel;
- BYTE btJob;
- INT nDelayTime;
- BYTE bDefSpell;
- BYTE btDefMinPower;
- WORD wMaxPower;
- BYTE btDefMaxPower;
- char szDesc[16];
- }STANDARDMAGIC, *LPSTANDARDMAGIC;
- typedef struct tagCLIENTMAGICRCD
- {
- INT nCurrTrain;
- CHAR bUseKey;
- BYTE bLevel;
- STANDARDMAGIC stStdMagic;
- }CLIENTMAGICRCD, *LPCLIENTMAGICRCD;
- #pragma pack(8)
- class CStatusWnd : public CGameWnd
- {
- private:
- protected:
- BYTE m_bType; // 0 : 厘馒芒. 1 : 某腐磐 惑怕芒. 2 : 某腐磐 付过 汲沥芒.
- CGameBtn m_xStatusBtn[_MAX_STAUTS_BTN];
- RECT m_rcCell[_EQUIP_MAX_CELL]; // 牢亥配府芒狼 阿伎甸狼 康开.
- RECT m_rcMagicCell[_MAGIC_MAX_CELL]; // 付过技泼芒狼 阿伎甸狼 康开.
- INT m_nStartLineNum; // 付过芒狼 贸澜 扼牢狼 锅龋. (付过府胶飘俊 甸绢乐绰俺荐父怒 胶农费且荐乐促..)
- BYTE m_bMagicIdxTable[_MAX_MAGIC_SKILL];
- CGameBtn m_xMagicScrlBtn[2];
- public:
- CHAR m_szEquipItemIdx[_EQUIP_MAX_CELL][12];
- ITEMSET m_stEquipItem[_EQUIP_MAX_CELL];
- ITEMSET m_stTakeOnItemSet; // 厘馒矫懦酒捞袍阑 馒侩咯何 皋矫瘤甫 罐阑锭鳖瘤 烙矫利栏肺 历厘茄促.
- BYTE m_bMyMagicCnt;
- LPCLIENTMAGICRCD m_pstMyMagic;
- public:
- CStatusWnd();
- ~CStatusWnd();
- virtual VOID Init();
- virtual VOID Destory();
- __inline VOID SetStatusWndType(BYTE bType)
- {
- m_bType = bType;
- switch ( m_bType )
- {
- case _TYPE_EQUIP:
- ResetWndImg(_WNDIMGIDX_ITEMSET);
- break;
- case _TYPE_STATUS:
- ResetWndImg(_WNDIMGIDX_STATUS);
- m_rcWnd.left -= 250;
- m_rcWnd.right-= 250;
- break;
- case _TYPE_SETMAGIC:
- ResetWndImg(_WNDIMGIDX_SKILLSET);
- break;
- }
- }
- __inline BYTE GetStatusWndType()
- {
- return m_bType;
- }
- VOID CreateStatusWnd(INT nID, CWHWilImageData* pxWndImage, INT nFrameImgIdx, INT nStartX, INT nStartY, INT nWidth, INT nHeight, BOOL bCanMove);
- VOID ShowStatusWnd();
- VOID SetStatusBtnInit();
- public:
- VOID ShowCharEquipWnd();
- VOID ShowEquipItemState();
- BOOL CheckEquipItem(CItem* pxItem, BYTE bEquipCell, POINT ptMouse);
- INT GetEquipNum(POINT ptMouse);
- BOOL CheckIsItemExisted(INT nEquipNum);
- VOID DeleteEquipItem(INT nEquipNum);
- VOID DeleteEquipItem(INT nMakeIndex, CHAR* szName);
- VOID DeleteAllEquipItem();
- BOOL AddEquipItem(CItem xItem, INT nEquipNum, BOOL bUseEquipNum = TRUE);
- BOOL ExtractEquipItem(CItem* pxItem, INT nEquipNum);
- VOID ChangeEquipWithCommon(INT nEquipNum, LPCOMMONITEMSET pstCommonItemSet);
- VOID SetEquipFromCommon(INT nEquipNum, LPCOMMONITEMSET pstCommonItemSet);
- VOID SetCommonFromEquip(INT nEquipNum, LPCOMMONITEMSET pstCommonItemSet);
- VOID SetTakeOnFromEquip(INT nEquipNum);
- VOID SetTakeOnFromCommon(INT nEquipNum, LPCOMMONITEMSET pstCommonItemSet);
- VOID SetEquipFromTakeOn();
- VOID ShowCharStatus();
- VOID ShowCharSetMagicWnd();
- INT SetMagicKey(POINT ptMouse, BYTE bKey);
- LPCLIENTMAGICRCD GetMagicByKey(BYTE bKey);
- BOOL OnLButtonDown(LPCOMMONITEMSET pstItemSet, POINT ptMouse);
- BOOL OnLButtonUp(LPCOMMONITEMSET pstItemSet, POINT ptMouse);
- BOOL OnKeyDown(WPARAM wParam, LPARAM lParam, POINT ptMouse);
- VOID OnMouseMove(POINT ptMouse);
- VOID OnScrollDown();
- VOID OnScrollUp();
- };
- #endif // _CSTATUSWND_H