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

模拟服务器

开发平台:

Visual C++

  1. /******************************************************************************************************************
  2.                                                                                                                    
  3. 葛碘疙:
  4. 累己磊:
  5. 累己老:
  6. [老磊][荐沥磊] : 荐沥 郴侩
  7.                                                                                                                    
  8. *******************************************************************************************************************/
  9. #ifndef _CMAGIC_H
  10. #define _CMAGIC_H
  11. /******************************************************************************************************************
  12. CMagic Class
  13. *******************************************************************************************************************/
  14. class CMagic
  15. {
  16. private:
  17. protected:
  18. public:
  19. BYTE m_bActiveState; // 付过 劝己拳咯何.(付过家戈矫俊 荤侩等促.)
  20. BOOL m_bRepeat; // 局聪皋捞记狼 馆汗咯何.
  21. BOOL m_bFixed; // 付过狼 捞悼咯何.
  22. BYTE m_bMagicNum; // 付过锅龋.
  23. CActor* m_pxOwner; // 付过惯荤林眉.
  24. CActor* m_pxTarget; // 付过惯荤按眉.
  25. CMapHandler* m_pxMap; // 甘曼炼器牢磐.
  26. // 谅钎沥焊.
  27. SHORT m_shScrnX, m_shScrnY; // 付过胶农赴谅钎.
  28. FLOAT m_fFloatScrnX, m_fFloatScrnY; // 付过胶农赴谅钎.
  29. SHORT m_shTileX, m_shTileY; // 付过鸥老谅钎.
  30. SHORT m_shFireScrnX, m_shFireScrnY; // 付过积己胶农赴谅钎.
  31. SHORT m_shFireTileX, m_shFireTileY; // 付过积己鸥老谅钎.
  32. SHORT m_shTargetScrnX, m_shTargetScrnY; // 格钎痢狼 胶农赴谅钎.
  33. SHORT m_shTargetTileX, m_shTargetTileY; // 格钎痢狼 鸥老谅钎.(函拳瞪荐乐促.)
  34. // 坊歹傅沥焊.
  35. WORD m_wCurrDelay; // 瘤楷矫埃历厘蔼.
  36. WORD m_wCurrLightDelay;
  37. WORD m_wFrmDelay; // 橇饭烙阑 逞扁扁 困茄 瘤楷矫埃蔼.
  38. WORD m_wMagicLife; // 付过捞 角青登绊 乐绰 矫埃.(ms窜困)
  39. BYTE m_bLightRadius[2]; // 堡盔 呈厚.
  40. BYTE m_bLightColor[2][3]; // 堡盔 祸.
  41. BYTE m_bMagicColor[3]; // 祸.
  42. DWORD m_dwFstFrame; // 泅犁 付过狼 矫累橇饭烙.
  43. DWORD m_dwEndFrame; // 泅犁 付过狼 付瘤阜橇饭烙.
  44. DWORD m_dwCurrFrame; // 橇饭烙历厘蔼.
  45. BYTE m_bBlendType; // 付过阑 绢恫屈怕肺 弊副巴牢啊甫 搬沥.
  46. BYTE m_bOpacity; // 0 - 255窜拌. 0篮 肯傈 捧疙(扼捞飘屈怕), 255绰 阂捧疙.
  47. BYTE m_bSwingCnt; // 付过狼 如甸覆 炼扒阑 霖促.
  48. FLOAT m_fGradient;
  49. INT m_nShiftX;
  50. INT m_nShiftY;
  51. INT m_nDistanceX;
  52. INT m_nDistanceY;
  53. INT m_nPrevDistanceX;
  54. INT m_nPrevDistanceY;
  55. BYTE m_bDir16;
  56. BYTE m_bCurrSwing;
  57. BOOL m_bShowLight;
  58. D3DVERTEX m_avMagic[4];
  59. CWHWilImageData* m_pxMagicImg;
  60. INT m_nDuplicateNum; 
  61. LPDIRECTDRAWSURFACE7 m_lpddsMagicTextr[60];
  62. public:
  63. CMagic();
  64. ~CMagic();
  65. virtual BOOL CreateMagic(BYTE bMagicNum, SHORT shFireTileX, SHORT shFireTileY, 
  66.                      SHORT shTargetTileX, SHORT shTargetTileY, CActor* pxOwner = NULL, INT nTarget = 0);
  67. virtual VOID DestoryMagic();
  68. virtual BOOL UpdateMagic(INT nLoopTime);
  69. virtual BOOL DrawMagic();
  70. virtual BOOL DrawLight(CLightFog* xLightFog, INT nLoopTime);
  71. };
  72. // _SKILL_FIRE, _SKILL_SHOOTLIGHTEN 傈侩.
  73. class CMagicStream : public CMagic
  74. {
  75. private:
  76. WORD m_wMagicStart;
  77. POINT m_ptTileGap;
  78. public:
  79. BOOL CreateMagic(BYTE bMagicNum, SHORT shFireTileX, SHORT shFireTileY, 
  80.              SHORT shTargetTileX, SHORT shTargetTileY, CActor* pxOwner, INT nTarget, WORD wStartMagicTime, POINT ptTileGap);
  81. BOOL UpdateMagic(INT nLoopTime);
  82. BOOL DrawMagic();
  83. };
  84. class CElecMagic : public CMagic
  85. {
  86. private:
  87. SHORT m_shEPosX, m_shEPosY;
  88. BOOL m_bArrived;
  89. CElec m_xElec;
  90. public:
  91. virtual BOOL CreateMagic(BYTE bMagicNum, SHORT shFireTileX, SHORT shFireTileY, 
  92.                      SHORT shTargetTileX, SHORT shTargetTileY, CActor* pxOwner = NULL, INT nTarget = 0);
  93. virtual BOOL UpdateMagic(INT nLoopTime);
  94. virtual BOOL DrawMagic();
  95. };
  96. // _SKILL_HOLYSHIELD, _SKILL_EARTHFIRE 傈侩.
  97. class CRepeatMagic : public CMagic
  98. {
  99. private:
  100. public:
  101. DWORD m_dwMagiLifeTotal;
  102. INT m_nEventID; // 捞亥飘肺包府等促.
  103. _inline CRepeatMagic()
  104. {
  105. m_nEventID   = 0;
  106. m_dwMagiLifeTotal = 0;
  107. }
  108. BOOL CreateMagic(INT nEventID, BYTE bMagicNum, SHORT shFireTileX, SHORT shFireTileY, 
  109.                  SHORT shTargetTileX, SHORT shTargetTileY, DWORD dwMagicLifeTotal, CActor* pxOwner = NULL, INT nTarget = 0);
  110. BOOL UpdateMagic(INT nLoopTime);
  111. BOOL DrawMagic();
  112. };
  113. #endif // _CMAGIC_H