InventoryWnd.h
上传用户:cydong117
上传日期:2009-11-10
资源大小:638k
文件大小:3k
源码类别:

模拟服务器

开发平台:

Visual C++

  1. #ifndef _INVENTORYWND_H
  2. #define _INVENTORYWND_H
  3. #pragma pack(1)
  4. typedef struct tagITEMSET
  5. {
  6. BOOL bSetted;
  7. CItem xItem;
  8. }ITEMSET, *LPITEMSET;
  9. typedef struct tagCOMMONITEMSET
  10. {
  11. BOOL bSetted; // 酒捞袍捞 技泼登菌绰瘤狼 咯何.
  12. BOOL bWaitResponse; // 泅犁 酒捞袍捞 冈芭唱, 馒侩登绢辑 辑滚狼 览翠阑 扁促府绰瘤狼 咯何.
  13. BOOL bIsEquipItem; // 泅犁 酒捞袍捞 厘馒芒栏肺何磐 吭绰瘤狼 咯何.
  14. BOOL bIsBeltItem; // 泅犁 酒捞袍捞 骇飘芒栏肺何磐 吭绰瘤狼 咯何.
  15. BOOL bIsHideItem; // 付快胶惑怕狼 酒捞袍阑 焊咯临巴牢啊?.
  16. CItem xItem; // 酒捞袍.
  17. }COMMONITEMSET, *LPCOMMONITEMSET;
  18. #pragma pack(8)
  19. class CInventoryWnd : public CGameWnd
  20. protected:
  21. INT m_nStartLineNum; // 牢亥配府芒狼 贸澜 扼牢狼 锅龋. (醚 10临捞绊 拳搁俊绰 4临 鳖瘤 杭荐 乐促.)
  22. RECT m_rcInvenCell[_INVEN_MAX_CELL]; // 牢亥配府芒狼 阿伎甸狼 康开.
  23. RECT m_rcBeltCell[_BELT_MAX_CELL];
  24. CGameBtn m_xInventoryBtn[_MAX_INVEN_BTN];
  25. CScrlBar m_xInvenScrlBar;
  26. public:
  27. ITEMSET m_stInventoryItem[_MAX_INVEN_ITEM];
  28. ITEMSET m_stBeltItem[_MAX_BELT_ITEM];
  29. public:
  30. CInventoryWnd();
  31. ~CInventoryWnd();
  32. virtual VOID Init();
  33. virtual VOID Destroy();
  34. VOID CreateInventoryWnd(INT nID, CWHWilImageData* pxWndImage, INT nFrameImgIdx, INT nStartX, INT nStartY, INT nWidth, INT nHeight, BOOL bCanMove);
  35. VOID ShowInventoryWnd();
  36. VOID ShowItemStatus(LPCLIENTITEMRCD pstItemInfo);
  37. VOID ShowInvenItemState();
  38. VOID SetInvenBtnInit();
  39. public:
  40. BOOL CheckItemPos(CHAR* szName);
  41. BOOL SaveItemPos(CHAR* szName);
  42. VOID DeleteBeltItem(INT nBeltInventoryNum);
  43. VOID DeleteInvenItem(INT nInventoryNum);
  44. VOID DeleteInvenItem(INT nMakeIndex, CHAR* szName);
  45. VOID DeleteAllBeltItem();
  46. VOID DeleteAllInvenItem();
  47. BOOL AddInvenItem(CItem xItem, INT nInvenNum, BOOL bUseInvenNum = TRUE);
  48. BOOL AddBeltItem(CItem xItem, INT nBeltNum, BOOL bUseBeltNum = TRUE);
  49. INT GetInvenNum(POINT ptMouse);
  50. INT GetBeltNum(POINT ptMouse);
  51. BOOL ExtractInvenItem(CItem* pxItem, INT nInventoryNum);
  52. BOOL ExtractBeltItem(CItem* pxItem, INT nBeltInventoryNum);
  53. VOID ChangeInvenWithCommon(INT nInventoryNum, LPCOMMONITEMSET pstCommonItemSet);
  54. VOID ChangeBeltWithCommon(INT nBeltInventoryNum, LPCOMMONITEMSET pstCommonItemSet);
  55. VOID SetCommonFromInven(INT nInventoryNum, LPCOMMONITEMSET pstCommonItemSet);
  56. VOID SetCommonFromBelt(INT nBeltInventoryNum, LPCOMMONITEMSET pstCommonItemSet);
  57. VOID SetInvenFromCommon(INT nInventoryNum, LPCOMMONITEMSET pstCommonItemSet);
  58. VOID SetBeltFromCommon(INT nBeltInventoryNum, LPCOMMONITEMSET pstCommonItemSet);
  59. VOID AddNewBeltItem(LPCOMMONITEMSET pstCommonItemSet);
  60. BOOL OnKeyUp(LPCOMMONITEMSET pstCommonItemSet, WPARAM wParam, LPARAM lParam);
  61. BOOL OnLButtonDoubleClick(LPCOMMONITEMSET pstCommonItemSet, POINT ptMouse);
  62. BOOL OnLButtonDown(LPCOMMONITEMSET pstCommonItemSet, POINT ptMouse);
  63. BOOL OnLButtonUp(LPCOMMONITEMSET pstCommonItemSet, POINT ptMouse);
  64. VOID OnMouseMove(POINT ptMouse);
  65. VOID OnScrollDown();
  66. VOID OnScrollUp();
  67. };
  68. #endif // _INVENTORYWND_H