#pragma once namespace MasterSystem { class CRewardSystem:public TBoostMemoryPool { public: struct TCountInfo { TCountInfo() { Clear(); } TCountInfo( int iMaster, int iPupil, int iClassmate ) { iMasterCount = iMaster; iPupilCount = iPupil; iClassmateCount = iClassmate; } bool bIsAllZero() { return (iMasterCount == 0 && iPupilCount == 0 && iClassmateCount == 0); } bool operator == ( const TCountInfo& rhs ) { return (iMasterCount == rhs.iMasterCount && iPupilCount == rhs.iPupilCount && iClassmateCount == rhs.iClassmateCount); } bool operator != ( const TCountInfo& rhs ) { return (iMasterCount != rhs.iMasterCount || iPupilCount != rhs.iPupilCount || iClassmateCount != rhs.iClassmateCount); } void Clear() { iMasterCount = 0; iPupilCount = 0; iClassmateCount = 0; } int iMasterCount; int iPupilCount; int iClassmateCount; }; CRewardSystem( CDNGameRoom* pGameRoom ); void Update( CDNUserSession* pSession, TAGetMasterSystemCountInfo* pPacket ); void RequestRefresh(); void RequestDungeonClear( CDNUserSession* pSession ); void GetCountInfo( CDNUserSession* pSession, TCountInfo& CountInfo ); const TCountInfo* GetCountInfo( CDNUserSession* pSession ); int GetMasterSystemAddExp( CDNUserSession* pSession, float fExp, bool bStageClear); void UpdateFavor( CDNUserSession* pSession, INT64 biPupilCharacterDBID, int nAddFavor); bool bIsDurabilityReward( CDNUserSession* pSession ); // ³»±¸µµ º¸»ó ¹Þ³Ä? bool bIsFatigueReward( CDNUserSession* pSession ); // ÇǷεµ º¸»ó ¹Þ³Ä? float GetExpRewardRate( CDNUserSession* pSession ); // °æÇèÄ¡ º¸»ó ¾ó¸¶¹Þ³Ä? float GetTreasureBoxRewardRate( CDNUserSession* pSession ); // º¸»ó»óÀÚ º¸»ó ¾ó¸¶¹Þ³Ä? private: CDNGameRoom* m_pGameRoom; std::map m_mCountRepository; }; }