/* ========================================================================== * ÆÄ ÀÏ : MakeSkill_Common.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ¹Ú°æÈñ * ÀÛ ¼º ÀÏ : 2009-01-05 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "CommonNetworkMsgStruct.h" #pragma pack(push,1) const int MIN_MAKESKILL = 1; const int MAX_MAKESKILL = 2; const int MAKESKILL_MAKE_ITEM_CNT = 3; const int MAKESKILL_GROUP_MAX = 100000; /// ÃÖ´ë Á¶ÇÕ ¼÷·Ãµµ #define MIXSKILL_EXP1 70 #define MIXSKILL_EXP2 200 #define MIXSKILL_EXP3 320 #define MIXSKILL_EXP4 450 /// unsigned char enum eMAKESKILL { eMAKESKILL_NONE = 0, eMAKESKILL_COOK, /// ¿ä¸® eMAKESKILL_PAINTCARD, /// Ä«µå±×¸®±â eMAKESKILL_AlCHEMY, /// ¿¬±Ý¼ú }; /// Á¦Á¶½ºÅ³ struct sMakeSkillScript { unsigned long mRecipeIdx; /// ·¹½ÃÇÇidx unsigned char mMakeSkill; /// Àü¹® ±â¼ú eMAKESKILL unsigned char mMakeStep; /// ´Ü°è unsigned short mMinExp; /// ÃÖ¼Ò¼÷·Ãµµ unsigned short mMinDefaultExp; /// ±âº»ÃÖ¼Ò¼÷·Ãµµ unsigned short mMaxDefaultExp; /// ±âº»ÃÖ´ë¼÷·Ãµµ unsigned short mMaxExp; /// ÃÖ´ë¾÷°¡´É¼÷·Ãµµ unsigned long mType; /// ºÐ·ù ŸÀÔ unsigned long mGroupIdx; /// ½Àµæ ±×·ì unsigned long mMakeItemIdx[MAKESKILL_MAKE_ITEM_CNT]; /// ¿Ï¼ºµÈ ¾ÆÀÌÅÛ unsigned char mMakeCnt[MAKESKILL_MAKE_ITEM_CNT]; /// ¿Ï¼ºµÈ ¼ö·® unsigned short mMakeRate[MAKESKILL_MAKE_ITEM_CNT]; /// ¼±Åà Ȯ·ü(ºñÀ²) unsigned long mMakeTime; /// Á¶Çսð£ unsigned long mNextMakeTime; /// ÀçÁ¶Çսð£ /// tArray tArray* mpMaterial; /// Àç·á¾ÆÀÌÅÛ sMakeSkillScript() { memset( this, 0, sizeof(sMakeSkillScript) ); } }; /// Àç·á¾ÆÀÌÅÛ struct sMaterialScript { unsigned long mItemIdx; /// Àç·á¾ÆÀÌÅÛ unsigned char mItemCnt; /// º¸À¯¼ö·® }; struct sRecipeInfo { unsigned long mRecipeIdx; unsigned long mCoolTime; }; struct sRecipeGroupInfo { unsigned long mRecipeIdx; unsigned char mMakeSkill; }; struct sGroupInfo { unsigned char mStep; unsigned long mExp; tArray mRecipeArr; }; /// Á¦Á¶½ºÅ³ struct MSG_RES_MAKESKILL_LIST : public MSGROOT { unsigned short mCount; sRecipeInfo mRecipeInfo[1]; unsigned long GetMsgLength() { return sizeof(MSG_RES_MAKESKILL_LIST) - sizeof(mRecipeInfo) + (mCount * sizeof(sRecipeInfo)); } }; #define ERROR_MAKESKILL_ADD_SUCCESS 0 #define ERROR_MAKESKILL_ADD_DBUSED 1 #define ERROR_MAKESKILL_ADD_DBERROR 2 #define ERROR_MAKESKILL_ADD_STATE 3 #define ERROR_MAKESKILL_ADD_ITEM 4 #define ERROR_MAKESKILL_ADD_NOTEMPTY 5 /// 2°³ÀÇ º¸Á¶Á÷¾÷À» ¸ðµÎ ¹è¿üÀ½. #define ERROR_MAKESKILL_ADD_ALREADY 6 #define ERROR_MAKESKILL_ADD_STEP 7 #define ERROR_MAKESKILL_ADD_LICENSE 8 /// ¹ÌÀÎÁõ ¾ÆÀÌÅÛ »ç¿ë struct MSG_REQ_MAKESKILL_ADD : public MSGROOT { unsigned short mSlotNum; /// Àκ¥½½·Ô ¹øÈ£ }; struct MSG_RES_MAKESKILL_ADD : public MSG_ERROR { unsigned char mMakeSkill; unsigned char mMakeSkillStep; }; #define ERROR_MAKESKILL_DEL_DBUSED 0 #define ERROR_MAKESKILL_DEL_SUCCESS 1 #define ERROR_MAKESKILL_DEL_DBERROR 2 #define ERROR_MAKESKILL_DEL_NOTHAVE 3 struct MSG_REQ_MAKESKILL_DELETE : public MSGROOT { unsigned char mMakeSkill; }; struct MSG_RES_MAKESKILL_DELETE : public MSG_ERROR { unsigned char mMakeSkill; }; #define ERROR_MAKESKILL_RECIPE_ADD_SUCCESS 0 #define ERROR_MAKESKILL_RECIPE_ADD_DBUSED 1 #define ERROR_MAKESKILL_RECIPE_ADD_DBERROR 2 #define ERROR_MAKESKILL_RECIPE_ADD_STATE 3 #define ERROR_MAKESKILL_RECIPE_ADD_ITEM 4 #define ERROR_MAKESKILL_RECIPE_ADD_SCRIPT 5 #define ERROR_MAKESKILL_RECIPE_ADD_ALREADY 6 #define ERROR_MAKESKILL_RECIPE_ADD_NOTHAVE 7 /// ½ÀµæÇÑ º¸Á¶Á÷¾÷ÀÌ ¾øÀ½ #define ERROR_MAKESKILL_RECIPE_ADD_STEP 8 #define ERROR_MAKESKILL_RECIPE_ADD_EXP 9 #define ERROR_MAKESKILL_RECIPE_ADD_LICENSE 10 /// ¹ÌÀÎÁõ ¾ÆÀÌÅÛ »ç¿ë struct MSG_REQ_MAKESKILL_RECIPE_ADD : public MSG_REQ_MAKESKILL_ADD {}; struct MSG_RES_MAKESKILL_RECIPE_ADD : public MSG_ERROR { unsigned short mCount; sRecipeGroupInfo mGroupInfo[1]; unsigned long GetMsgLength() { return sizeof(MSG_RES_MAKESKILL_RECIPE_ADD) - sizeof(mGroupInfo) + (mCount * sizeof(sRecipeGroupInfo)); } }; #define ERROR_MAKESKILL_START_SUCCESS 0 #define ERROR_MAKESKILL_START_SCRIPT 1 #define ERROR_MAKESKILL_START_COOLTIME 2 #define ERROR_MAKESKILL_START_HAVESKILL 3 #define ERROR_MAKESKILL_START_STATE 4 #define ERROR_MAKESKILL_START_DBERROR 5 #define ERROR_MAKESKILL_START_COUNT 6 #define ERROR_MAKESKILL_START_STEP 7 #define ERROR_MAKESKILL_START_EXP 8 /// MSG_REQ_MAKESKILL_ITEMMIX_START = MSG_ERROR struct MSG_REQ_MAKESKILL_ITEMMIX_START : public MSGROOT { unsigned char mMakeSkill; unsigned long mRecipeIdx; unsigned short mMakeCnt; }; struct MSG_SYN_MAKESKILL_ITEMMIX_START : public MSGROOT { unsigned long mCharacterIdx; }; /// MSG_RES_MAKESKILL_ITEMMIX_END : public MSG_ERROR #define ERROR_MAKESKILL_END_SUCCESS 0 #define ERROR_MAKESKILL_END_ITEM 1 #define ERROR_MAKESKILL_END_STATE 2 #define ERROR_MAKESKILL_END_TIME 3 #define ERROR_MAKESKILL_END_MAX_ITEM 4 // ÃÖ´ë º¸À¯°¹¼ö °¹¼ö Ãʰú struct MSG_SYN_MAKESKILL_ITEMMIX_MIDDLEEND : public MSGROOT { unsigned long mCharacterIdx; }; struct MSG_SYN_MAKESKILL_ITEMMIX_END : public MSG_ERROR { unsigned long mCharacterIdx; }; #define ERROR_MAKESKILL_CANCEL_SUCCESS 0 #define ERROR_MAKESKILL_CANCEL_DBWORK 1 struct MSG_SYN_MAKESKILL_ITEMMIX_CANCEL : public MSGROOT { unsigned long mCharacterIdx; }; struct MSG_SYN_MAKESKILL_ITEMMIX_CANCELFORCE : public MSGROOT {}; struct MSG_SYN_MAKESKILL_ITEMMIX_EXP : public MSGROOT { unsigned char mMakeSkill; unsigned long mMakeSkillExp; }; #pragma pack(pop)