#ifndef _GUILD_H_ #define _GUILD_H_ #pragma once #include #include #include #include // Àü¹æ ÂüÁ¶ class CAggresiveCreature; class CCharacter; class CCell; class CSession; namespace Guild { // ±æµå À̸§¿¡ ºÎÀûÀýÇÑ ±ÛÀÚ°¡ ÀÖ´ÂÁö »ìÇÉ´Ù. bool CheckGuildName(const char* szGuildName); class CGuild { protected: // ±æµå Ŭ·¡½º´Â ±æµå ¸Å´ÏÀú¿¡¼­¸¸ »ý¼º °¡´É (»èÁ¦´Â À¯Æ¿À» ÀÌ¿ëÇÏ´Â °ü°è·Î public) CGuild(void); CGuild(unsigned long dwGID, unsigned char cNation, char* szName); CGuild(GuildInfoDB& guildInfo); friend class CGuildMgr; public: ~CGuild(void); public: // Ŭ¶óÀÌ¾ðÆ®¿¡°Ô Á¤º¸¸¦ ¹Þ¾Æ üũÇϰí Áß°è ¼­¹ö·Î º¸³»ÁØ´Ù. // (TODO : °¢Á¾ ¿¡·¯µéÀº ÇÊ¿ä½Ã ³Ñ¹ö¸µÇØÁØ´Ù. ÀÏ´ÜÀº ¸ðµÎ SERVER_ERROR.) unsigned short SetMark(unsigned long dwSenderID, char *szMark); bool SetLevel(unsigned long dwMaster, unsigned char cLevel); bool SetRight(unsigned long dwMaster, GuildRight guildRight); bool SetTitle(unsigned long dwSuperior, unsigned long dwFollower, unsigned char cTitle, unsigned short &wError); bool JoinMember(unsigned long dwCID, unsigned char cTitle, unsigned short &wError); bool JoinMemberDB(GuildMemberDB& guildMemberDB); virtual bool JoinMember(MemberInfo& memberInfo); bool TacticsMember(unsigned long dwCID, unsigned char cTitle, unsigned char cType, unsigned short &wError); bool SetTacticsTitle(unsigned long dwSuperior, unsigned long dwFollower, unsigned short wCmd, unsigned char cTitle, unsigned char cType, unsigned short &wError); bool SetTacticsTitle(unsigned long dwCID, unsigned char cTitle); bool IsMember(unsigned long dwCID); bool IsTacticsWaitMember(unsigned long dwCID); bool KickMember(unsigned long dwSuperior, unsigned long dwFollower, unsigned short &wError); bool KickTacticsMember(unsigned long dwSuperior, unsigned long dwFollower, unsigned short wCmd, unsigned short &wError); bool LeaveTacticsMember(unsigned long dwCID, unsigned long dwReferenceID, unsigned short wCmd); bool UpdateMemberInfo(unsigned long dwCID, unsigned long dwValue, unsigned char cCmd); // Áß°è ¼­¹ö·ÎºÎÅÍ Á¤º¸¸¦ ¹Þ¾Æ ó¸®Çϰí Ŭ¶óÀÌ¾ðÆ®¿¡°Ô ¾Ë·ÁÁØ´Ù. unsigned short SetMark(unsigned long dwSenderID, char *szMark, unsigned long dwGold); bool SetLevel(unsigned char cLevel, unsigned long dwGold); bool SetRight(GuildRight guildRight); virtual bool SetTitle(unsigned long dwCID, unsigned char cTitle); bool SetRelation(unsigned long dwTargetGID, unsigned char cRelationType, unsigned char cActorType=Guild::BY_MINE); bool UpdateMemberInfo(unsigned long dwCID, MemberListInfo memberListInfo, MemberDetailInfo memberDetailInfo); // ------------------------------------------------------------------------------------------- MemberInfo GetMaster(void); unsigned char GetTitle(unsigned long dwCID); const unsigned long GetGID(void) { return m_dwGID; } const char* GetName(void) { return m_strName; } const unsigned long GetFame(void) { return m_dwFame; } const GuildRight& GetRight(void) { return m_GuildRight; } const unsigned long GetGold(void) { return m_dwGold; } const unsigned char GetCurrentAllMember(void) const; // ¸ðµç ¸â¹ö. const unsigned char GetTotalMemberNum(void) const; // ¿ëº´À» Æ÷ÇÔÇÑ ¸ðµç ¸â¹ö const unsigned char GetCurrentMemberNum(void) const; // °¡ÀÔ´ë±âÀÚ, ¿ëº´À» Á¦¿ÜÇÑ ¸â¹ö const unsigned char GetMemberNum(void) const; // ¿ëº´À» Á¦¿ÜÇÑ ¸â¹ö¼ö const unsigned char GetTacticsNum(void) const; // ¿ëº´ ¼ö const float GetGuildBonus(unsigned char cRealmPoint, float fPercent = 5.0f); // ±æµå º¸³Ê½º °ü·Ã ÇÔ¼ö const unsigned char GetLoginMemberNum(void) const; // °ÔÀÓÁßÀÎ ±æµå¿ø¼ö const unsigned char GetMaxMemberNum(void) const; // ÃÖ´ë ±æµå¿ø¼ö const unsigned char GetNation(void) const { return m_cInclination; } const bool IsPeaceMode(void); void SetGuildMiles(unsigned long dwGuildMiles); const unsigned long GetGuildMiles() const { return m_dwGuildMiles; } bool AddGold(unsigned long dwGold); bool DeductGold(unsigned long dwGold); void ReleaseGold(unsigned long dwGold); bool AutoRouting(CAggresiveCreature* lpPickkingCreature, Item::CItem* lpItem, unsigned long& dwGold); int GetNearMemberList(CCell *pCell, CCharacter **aryNearCharacterList); void UpgradeMemberRespawnSpeedByEmblem(unsigned char cUpgradeType, unsigned char cUpgradeStep); void DegradeMemberRespawnSpeedByEmblem(); unsigned char GetRelation(unsigned long dwGID, unsigned char cActorType=Guild::BY_MINE); int GetNumOfRelation(unsigned char cRelationType, unsigned char cActorType=Guild::BY_MINE); unsigned long GetRelationGID(unsigned char cRelationType, unsigned char cActorType=Guild::BY_MINE); // Vincent - GetRelationGID() ÇÔ¼ö´Â Àû´ë ¼±¾ðÀ» 1°³ ÀÌ»ó ÇÒ¼ö ÀÖÀ»°æ¿ì¿¡´Â º¯°æµÇ¾î¾ßÇÑ´Ù.!! bool IsEnemyGuild(unsigned long dwGID); bool InviteMember(unsigned long dwMember, unsigned long dwGuest, unsigned short &wError); bool LeaveMember(unsigned long dwCID); bool LogInOutMember(unsigned long dwCID, unsigned long dwServerID); const GuildLargeInfoNode GetLargeInfo(unsigned char cIndexOfPage, unsigned short wRank, CGuild* lpRelationGuild); bool SendGuildSafe(unsigned long dwCID, char* szCharName, unsigned char cCmd); bool SendMemberList(CCharacter* lpCharacter, unsigned char cMemberType, unsigned char cSortCmd, unsigned char cPage); void SendAllMember(const char* szPacket, unsigned long dwPacketSize, unsigned char cCMD_In); void SendCurrentMember(const char* szPacket, unsigned long dwPacketSize, unsigned char cCMD_In); bool SendHostilityList(CCharacter* lpCharacter, unsigned char cCurrentPage, unsigned char cPageState); void ChangeMemberName(unsigned long dwCID, const char* szChangeName); TIME* GetGuildPointTime(void) { return &m_tmGuildPoint; } unsigned char GetGuildPointFlag(void) { return m_cGuildPointFlag; } void SetGuildPointFlag(unsigned char cFlag) { m_cGuildPointFlag = cFlag; } // ±æµå °ü·Ã ¸Þ¼Òµå void SetGuildSafe(char cGuildSafe) { m_cGuildSafe = cGuildSafe; } char GetGuildSafe() { return m_cGuildSafe; } protected: bool InsertRelation(unsigned long dwGID, unsigned long dwTargetGID, unsigned char cRelation); void CalculateGuildFame(void); // ------------------------------------------------------------------ // ¸â¹ö º¯¼ö char m_cGuildSafe; unsigned long m_dwGID; // ±æµå ¾ÆÀ̵ð char m_strName[MAX_GUILD_NAME_LEN]; // ±æµå À̸§ char m_szMark[MAX_MARK_SIZE]; // ±æµå ¸¶Å© unsigned char m_cInclination; // ±æµå ¼ºÇâ (Guild::Inclination Âü°í) unsigned char m_cLevel; // ±æµå ·¹º§ unsigned long m_dwFame; // ±æµå ¸í¼º unsigned long m_dwGold; // ±æµå ±Ý°í unsigned char m_cGuildPointFlag; // ±æµå ÀçÁ¤ºñ °ü·Ã. TIME m_tmLastLogout; /* ÃÖÁ¾ ±æµå¿ø ·Î±×¾Æ¿ô ½Ã°£ (ÀÏÁ¤ ½Ã°£µ¿¾È ±æµå¿øÀÌ ¾Æ¹«µµ ·Î±×ÀÎÇÏÁö ¾ÊÀ¸¸é ±æµå°¡ »èÁ¦µÈ´Ù.) */ TIME m_tmCheckMember; // ±æµå¿ø ¼ö°¡ ÀÏÁ¤ Àοø ¹Ì¸¸À¸·Î ¶³¾îÁ® ±æµå°¡ »èÁ¦µÇ±â±îÁöÀÇ ½Ã°£ TIME m_tmGMLastLogout; /* ±æµå ¸¶½ºÅÍÀÇ ·Î±×¾Æ¿ô ½Ã°£ (ÀÏÁ¤ ½Ã°£µ¿¾È ±æµå ¸¶½ºÅͰ¡ ·Î±×ÀÎÇÏÁö ¾ÊÀ¸¸é ´ÙÀ½ ¼­¿­ÀÇ ±æµå¿øÀÌ ±æµå ¸¶½ºÅͰ¡ µÈ´Ù.) */ TIME m_tmChangeInclination; // ±æµå ¼ºÇâÀ» º¯°æÇÑ ½Ã°£ (24½Ã°£ À̳»¿¡´Â ´Ù½Ã º¯°æÇÒ ¼ö ¾ø´Ù.) TIME m_tmGuildPoint; // ±æµå ÀçÁ¤ºñ °ü·Ã ½Ã°£. GuildRight m_GuildRight; // ±æµå ±ÇÇÑ MemberList m_MemberList; // ±æµå¿ø RelationMap m_Relation[Guild::MAX_RELATION_ACTOR]; // ³»°¡ ¸ÎÀº ±æµå °ü°è / ´Ù¸¥ ±æµå¿¡ ÀÇÇØ ¸Î¾îÁø ±æµå °ü°è unsigned long m_dwGuildMiles; }; }; #endif