#pragma once /// @brief 아바타에게 Keyboard, Mouse 에서 생성된 메세지를 게임 Input으로 변환 해서 준다. #include "K3DTypes.h" #include //#include /// 입력 namespace GAME_INPUT { const int RQ_IDLE = 0; ///< 기본 요청 const int RQ_MOVE = RQ_IDLE+ 1; ///< 이동 요청 const int RQ_ATTACK = RQ_IDLE+ 2; ///< 공격 요청 const int RQ_THROW_ITEM = RQ_IDLE+ 4; ///< 던지기 요청 const int RQ_CAST = RQ_IDLE+ 5; ///< 캐스트 요청 const int RQ_FIRE = RQ_IDLE+ 6; ///< 발사 요청 const int RQ_SIT = RQ_IDLE+ 7; ///< 앉기 요청 const int RQ_SIT_UP = RQ_IDLE+ 8; ///< 서기 요청 const int RQ_TAKE_ITEM = RQ_IDLE+ 9; ///< 서기 요청 const int RQ_CAST_CANCEL = RQ_IDLE+ 10; ///< 캐스트 요청 const int RQ_MOUNT = RQ_IDLE+ 11; ///< 타기 요청 const int RQ_UNMOUNT = RQ_IDLE+ 12; ///< 내리기 요청 const int RQ_PKMODE = RQ_IDLE+ 13; ///< PK 요청 const int RQ_USE_ITEM = RQ_IDLE+ 14; const int RQ_NONE = RQ_IDLE+ 15; ///< 암것도 아니다 }; class SGameInput { public: SGameInput( int nInputID ); virtual ~SGameInput(); int GetInputID() { return m_nInputID; } protected: int m_nInputID; private: }; ////////////////////////////////////////////////////////////////////////// // Movement Request class SInputMove : public SGameInput { public: SInputMove( K3DVector & targetpos, bool bSpeedSync = true ); ~SInputMove(); K3DVector & GetTargetPos(); bool GetSpeedSync(); protected: K3DVector m_TargetPos; // Destination position bool m_bSpeedSync; }; ////////////////////////////////////////////////////////////////////////// /// 공격 요청 class SInputAttack : public SGameInput { public: SInputAttack( AR_HANDLE attackhandle, bool bChase = false ); ~SInputAttack(); AR_HANDLE GetTargetHandle(); bool IsChase(); protected: AR_HANDLE m_AttackHandle; bool m_bChase; }; ////////////////////////////////////////////////////////////////////////// /// 스킬 취소 class SInputCastCancel : public SGameInput { public: SInputCastCancel(); ~SInputCastCancel(); }; ////////////////////////////////////////////////////////////////////////// /// 스킬 요청 class SInputSkill : public SGameInput { public: /// 2010.10.14 - prodongi SInputSkill( int nSkillID, int nSkill_Lv, AR_HANDLE TargetID, float fCastRange, float fSpellRange, K3DVector const& targetPos, bool isRegionTarget ); SInputSkill( int nSkillID, int nSkill_Lv, AR_HANDLE TargetID, float fCastRange, float fSpellRange ); ~SInputSkill(); int GetSkillID(); int GetSkillLv(); AR_HANDLE GetTargetHandle(); float GetCastRange(); float GetSpellRange(); bool isValidToCorpse() const { return m_isValidToCorpse; } void setIsValidToCorpse(bool is){ m_isValidToCorpse = is; } /// 2010.10.14 - prodongi K3DVector const& getTargetPos() const { return m_targetPos; } /// 2010.10.21 - prodongi bool isRegionTarget() const { return m_isRegionTarget; } protected: int m_nSkillID; int m_nSkill_Lv; AR_HANDLE m_TargetID; float m_fCastRange; float m_fSpellRange; // 2010.05.24 - prodongi bool m_isValidToCorpse; /// 2010.10.14 - prodongi K3DVector m_targetPos; bool m_isRegionTarget; /// 2010.10.21 - prodongi }; //////////////////////////////////////////////////////////////////////////// /// 아이템 줍기 요청 class SInputTakeItem : public SGameInput { public: SInputTakeItem( AR_HANDLE TakeItemHandle, float fDist ); ~SInputTakeItem(); AR_HANDLE GetItemHandle(); float GetDistance(); protected: AR_HANDLE m_TakeItemHandle; float m_fDistance; }; class SInputThrowItem : public SGameInput { public: SInputThrowItem( AR_HANDLE targetHandle, AR_HANDLE throwItemHandle ); ~SInputThrowItem(); AR_HANDLE GetItemHandle(); AR_HANDLE GetTargetHandle(); protected: AR_HANDLE m_TargetHandle; AR_HANDLE m_ThrowItemHandle; }; //////////////////////////////////////////////////////////////////////////// /// 앉기 요청 class SInputSit : public SGameInput { public: SInputSit(); ~SInputSit(); }; //////////////////////////////////////////////////////////////////////////// /// 서기 요청 class SInputSitUp : public SGameInput { public: SInputSitUp(); ~SInputSitUp(); }; //////////////////////////////////////////////////////////////////////////// /// 타기 요청 class SInputMount : public SGameInput { public: SInputMount(); ~SInputMount(); }; //////////////////////////////////////////////////////////////////////////// /// 내리기 요청 class SInputUnMount : public SGameInput { public: SInputUnMount(); ~SInputUnMount(); }; //////////////////////////////////////////////////////////////////////////// /// PK 요청 class SInputPkMode : public SGameInput { public: SInputPkMode(); ~SInputPkMode(); }; //////////////////////////////////////////////////////////////////////////// /// 아이템 사용 요청 class SInputUseItem : public SGameInput { public: AR_HANDLE m_hItemUseTarget; ///< 로그인되고 시야에 없는 타겟에게 아이템 사용 시 사용 AR_HANDLE m_hTargetHandle; ///< 자신이면 0 AR_HANDLE m_hItemHandle; float m_fUseRange; int m_nSkillID; std::string m_strParameter; public: SInputUseItem( AR_HANDLE hTargetHandle, AR_HANDLE hItemHandle, float fUseRange, int nSkillID, AR_HANDLE hItemUseTarget, const char* lpText=NULL ); ~SInputUseItem(); };