/* ========================================================================== * ÆÄ ÀÏ : ItemMixManager.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2009-01-15 * ÁÖÀÇ»çÇ× : *===========================================================================*/ /// ³×Æ®¿öÅ© ¶ô enum { eLOCK_ITEMMIXNONE, eLOCK_ITEMMIXDELETE, eLOCK_ITEMMIXSTART, eLOCK_ITEMMIXEND, }; /// º¸À¯ ·¹½ÃÇÇ Á¤º¸ struct sKeepRecipe { unsigned long mRestTime; unsigned long mStartTime; unsigned long mNextMakeTime; cStringT mStrNextMakeTime; sKeepRecipe() { mRestTime = 0; mStartTime = 0; mNextMakeTime = 0; } }; class cItemMixManager { public: cItemMixManager(); ~cItemMixManager(); void Close(); /// ½ºÅ³,·¹½ÃÇÇ µî·Ï ¾ÆÀÌÅÛ »ç¿ë bool RegistSkill( unsigned short slot, char type, char subType, unsigned long makeSkillIdx ); bool RegistRecipe( unsigned short slot, unsigned long recipeIdx ); bool RegistRecipeGroup( unsigned short slot, unsigned long recipeGroupIdx ); /// bool ItemMixStart( unsigned char index, unsigned long recipeIdx, int count ); void ItemMixDelete( unsigned char index ); bool ItemMixCancel( bool hide = true ); /// void ItemMixOpen(); /// void NetworkMsgParserLoad( char* msg ); void NetworkMsgParserGame( char* msg ); /// ·¹½ÃÇÇÀ妽º sKeepRecipe* GetKeepMixSkill1( unsigned long recipeIdx ); sKeepRecipe* GetKeepMixSkill2( unsigned long recipeIdx ); unsigned long GetKeepSkillText( unsigned char index ); unsigned long GetTypeText( int index, unsigned long type ); bool IsNetLock() { return mNetLock; } bool IsKeepRecipe( unsigned long recipeIdx ); bool IsKeepMixSkill( unsigned long makeSkillIdx, unsigned char subType ); tPointerHashMap* GetKeepSkillMap1() { return &mKeepSkillMap1; } tPointerHashMap* GetKeepSkillMap2() { return &mKeepSkillMap2; } public: static cItemMixManager* mpSingleton; static cItemMixManager* GetSingleton(); private: bool AddKeepSkill1( unsigned long recipeIdx, unsigned long restTime ); bool AddKeepSkill2( unsigned long recipeIdx, unsigned long restTime ); void DeleteKeepSkill1(); void DeleteKeepSkill2(); /// ¶ô°É±â void NetLock( int lockTry ); void NetUnLock( int lockTry ); private: typedef tPointerHashMap cKeepRecipeMap; cKeepRecipeMap mKeepSkillMap1; // Àü¹®±â¼ú 1 cKeepRecipeMap mKeepSkillMap2; // Àü¹®±â¼ú 2 /// ³×Æ®¿öÅ© °ü·Ã ¶ô bool mNetLock; int mLockTry; // ¹é¾÷ unsigned char mTempIndex; unsigned long mTempRecipeIdx; }; inline cItemMixManager* cItemMixManager::GetSingleton() { return mpSingleton; } #define ITEMMIXMAN cItemMixManager::GetSingleton()