#ifndef _CREATURE_STRUCTURE_H_ #define _CREATURE_STRUCTURE_H_ #include #include #include #include // Àü¹æ ÂüÁ¶ struct CreatureStatus; struct CharacterStatus; // ¸Ê À̵¿ Á¤º¸ struct Position { float m_fPointX; // Point X ÁÂÇ¥ float m_fPointY; // Point Y ÁÂÇ¥ float m_fPointZ; // Point Z ÁÂÇ¥ inline Position(); inline Position(const POS& Pos); inline Position(const Position& Pos); inline Position(float fPointX, float fPointY, float fPointZ); inline unsigned int GetDistance(const Position& rhs) const { return (unsigned int)sqrt((m_fPointX - rhs.m_fPointX) * (m_fPointX - rhs.m_fPointX) + (m_fPointY - rhs.m_fPointY) * (m_fPointY - rhs.m_fPointY) + (m_fPointZ - rhs.m_fPointZ) * (m_fPointZ - rhs.m_fPointZ)); } }; typedef Position* LPPosition; inline Position::Position() : m_fPointX(0.0f), m_fPointY(0.0f), m_fPointZ(0.0f) { } inline Position::Position(const POS& Pos) : m_fPointX(Pos.fPointX), m_fPointY(Pos.fPointY), m_fPointZ(Pos.fPointZ) { } inline Position::Position(const Position& Pos) : m_fPointX(Pos.m_fPointX), m_fPointY(Pos.m_fPointY), m_fPointZ(Pos.m_fPointZ) { } inline Position::Position(float fPointX, float fPointY, float fPointZ) : m_fPointX(fPointX), m_fPointY(fPointY), m_fPointZ(fPointZ) { } // µ¿ÀÛ Á¤º¸ struct MotionInfo { float m_fDirection; // ¹Ù¶óº¸´Â ¹æÇâ float m_fVelocity; // ¼Óµµ unsigned short m_wAction; // ÃëÇÏ´Â Çൿ unsigned long m_dwFrame; // ¸ð¼Ç ÇÁ·¹ÀÓ ( ¸ó½ºÅÍ, NPC°¡ »ç¿ë ) MotionInfo(); }; typedef MotionInfo* LPMotionInfo; // ij¸¯ÅÍ ½ºÅ×ÀÌÅͽº Á¤º¸. struct StatusInfo { enum { ATTRIBUTE_FIRE = 0, ATTRIBUTE_LIGHTNING = 1, ATTRIBUTE_COLD = 2, ATTRIBUTE_DRAIN = 3, ATTRIBUTE_POISON = 4, MAX_ATTRIBUTE_NUM = 5 }; short m_nCriticalType; // Å©¸®Æ¼Äà ŸÀÔ ( Ãß°¡ È¿°ú ŸÀÔ ex> °Ë - ºí¸®µù, µµ³¢ - ¹æ¾îÀ² ÀúÇÏ, µÐ±â - ½ºÅÏ ... ) short m_nCriticalPercentage; // Å©¸®Æ¼Äà Ȯ·ü short m_nMinDamage; // ÃÖ¼Ò ´ë¹ÌÁö short m_nMaxDamage; // ÃÖ´ë ´ë¹ÌÁö float m_fDRC; // DRC short m_nOffenceRevision; // °ø°Ý º¸Á¤°ª. short m_nDefence; // ¹æ¾î·Â. short m_nDefenceRevision; // ¹æ¾î º¸Á¤°ª. short m_nMagicResistance; // ¸¶¹ý ÀúÇ×·Â short m_nBlockingPercentage; // ºí·ÏÀ² short m_nAttackSpeed; // °ø°Ý ¼Óµµ. short m_nMoveSpeed; // À̵¿ ¼Óµµ. short m_nAttackRange; // °ø°Ý °Å¸®. // ´ÜÀ§ = cm short m_nRangeAttackDistance; // Àå°Å¸® °ø°Ý °Å¸®. // ´ÜÀ§ = m unsigned short m_nMaxHP; // ÃÖ´ë HP¾ç unsigned short m_nMaxMP; // ÃÖ´ë MP¾ç short m_nHPRegenAmount; // ÀÏÁ¤ ½Ã°£´ç HPÀÇ Regen ¾ç short m_nMPRegenAmount; // ÀÏÁ¤ ½Ã°£´ç MPÀÇ Regen ¾ç short m_nWeaponAttributeLevel[MAX_ATTRIBUTE_NUM]; // ¹«±â ¼Ó¼º ·¹º§ short m_nAttributeResistance[MAX_ATTRIBUTE_NUM]; // ¼Ó¼º ÀúÇ× ·¹º§ StatusInfo(); // »ý¼ºÀÚ. #ifndef _RYL_GAME_CLIENT_ bool CalculateStatus(const CharacterStatus& characterStatus, const unsigned short nLevel, const unsigned short nClass, unsigned char cUsingWeaponType); #endif }; typedef StatusInfo* LPStatusInfo; #pragma pack(8) //------------------------------------------------------------------------------------ // TODO : memory alignment ÁÖÀÇÇÒ °Í. // : 4byte´ÜÀ§·Î alignment °¡ µÇµµ·Ï ÇÒ °Í. // : ¸Þ¸ð¸® ºÎÁ·½Ã¿¡´Â Å©±â°¡ ¸¹ÀÌ ÇÊ¿ä ¾ø´Â ¸â¹ö´Â shortµîÀ¸·Î ÁÙÀÏ °Í. struct CreatureStatus { // ¹«±â³ª µµ±¸¿¡ ÀÇÇØ¼­ ¿µÇâÀ» ¹ÞÀº ´É·ÂÄ¡¸¦ ÀúÀå ( °ÔÀÓ»ó¿¡¼­ ¸ðµç °è»êÀº À̰ÍÀ¸·Î ÇÔ ) __int64 m_nExp; // »ç¶÷ÀÎ °æ¿ì´Â ÀÚ½ÅÀÇ °æÇèÁ¡, ¸ó½ºÅÍÀÎ °æ¿ì´Â ³ª´©¾î ÁÙ °æÇèÁ¡. int m_nLevel; // ·¹º§ unsigned short m_nNowHP; // ÇöÀç HP unsigned short m_nNowMP; // ÇöÀç MP, ¸ó½ºÅÍÀÇ °æ¿ì´Â ¹«Á¶°Ç ÃÖ´ë°ªÀ¸·Î ÃʱâÈ­. StatusInfo m_StatusInfo; // ´ëºÎºÐÀÇ Á¤º¸°¡ À̰÷¿¡ ÀÖÀ½. CreatureStatus(); CreatureStatus(CHAR_INFOST& characterDBData); void Init(CHAR_INFOST& characterDBData); }; typedef CreatureStatus* LPCreatureStatus; #pragma pack() #endif