#pragma once #include "ScoreSystem.h" #if defined( _GAMESERVER ) class CDNDBConnection; class CPvPGameMode; #endif // #if defined( _GAMESERVER ) class CPvPScoreSystem:public IScoreSystem { public: CPvPScoreSystem(); virtual ~CPvPScoreSystem(){} virtual bool IsPvPScoreSystem(){ return true; } virtual void ClearAllScore(); virtual void OnFinishRound( DnActorHandle hActor, const bool bIsWin ); virtual bool AddUserScore( DnActorHandle hActor, const void* pData ); #if !defined( _GAMESERVER ) virtual bool SetCount( DnActorHandle hActor, const void* pData ); #endif virtual IPVPGameModeScoreSystem* CreatePvPGameModeScoreSystem( const UINT uiGameMode ); // Count °ü·Ã virtual UINT GetKillCount( DnActorHandle hActor ); virtual UINT GetKillCount( const WCHAR * pName ); virtual UINT GetDeathCount( DnActorHandle hActor ); // Score°ü·Ã virtual UINT GetTotalScore( DnActorHandle hActor ); virtual UINT GetKillScore( DnActorHandle hActor ); virtual UINT GetAssistScore( DnActorHandle hActor ); virtual UINT GetXPScore( DnActorHandle hActor, const UINT uiWinTeam ); virtual const void* GetScoreStruct( const WCHAR* pwszCharName ); virtual UINT GetOccupationAcquireScore(DnActorHandle hActor) { return 0; } virtual bool GetOccupationTeamScore(int nTeam, int &nTeamScore) { return false; } virtual UINT GetOccupationStealScore(DnActorHandle hActor ) { return 0; } virtual bool GetOccupationTeamScore(int nTeam, TPvPOccupationTeamScoreInfo &TeamScore) { return false; }; // virtual void OnDamage( DnActorHandle hActor, DnActorHandle hHitter, const INT64 iDamage ); virtual void OnDie( DnActorHandle hActor, DnActorHandle hHitter ); virtual void OnCmdAddStateEffect( const CDnSkill::SkillInfo* pSkillInfo ); virtual void OnLeaveUser( DnActorHandle hActor ); virtual void OnNotify( DnActorHandle hActor, const UINT uiScoreType, const UINT uiScore ); virtual void OnStartRound(); virtual bool OnTryAcquirePoint(DnActorHandle hActor, int AreaID, LOCAL_TIME Localtime) { return false; } virtual bool OnAcquirePoint(int nTeam, const WCHAR * pName, bool bSnatched = false, bool bBreakInto = false) { return false; } virtual void OnOccupationTeamScore(int nTeam, int nType) {} #if defined(PRE_ADD_REVENGE) && defined(_GAMESERVER) void OnRevengeSuccess(DnActorHandle hHitter); #endif #ifdef _GAMESERVER virtual void SendScore( CDNUserSession* pGameSession ); virtual void SendXPScore( CDNGameRoom* pGameRoom, CDNUserSession* pGameSession ); virtual bool QueryUpdatePvPData( const UINT uiWinTeam, CDNUserSession* pGameSession, PvPCommon::QueryUpdatePvPDataType::eCode Type ); virtual int GetModeExp( DnActorHandle hActor ){ return 0; } #if defined(PRE_MOD_PVP_LADDER_XP) virtual UINT CalcXPScore( CDNUserSession* pGameSession, const UINT uiWinTeam, PvPCommon::QueryUpdatePvPDataType::eCode Type ); #endif #endif #ifdef _CLIENT virtual bool IsRedBossKill() { return false; } virtual bool IsBlueBossKill() { return false; } #endif //#ifdef _CLIENT #if defined (_GAMESERVER) virtual bool InitializeOccupationSystem(TBattleGourndModeInfo * pModeInfo) { return true; } #endif //#if defined (_GAMESERVER) #if defined(_CLIENT) virtual void InitializeOccupationSystem() { return; } #endif // #if defined(_CLIENT) private: typedef struct tagClassScore { UINT uiScore[PvPCommon::Common::MaxClass]; tagClassScore() { for( UINT i=0 ; i m_mScore; std::map m_mCount; #ifdef _GAMESERVER bool m_bCreateXPScorePacket; SCPVP_XPSCORE m_XPScorePacket; std::list m_listQueryCharacterDBID; #endif private: void _UpdateCount( DnActorHandle hActor, DnActorHandle hHitter ); #if defined( _GAMESERVER ) void _UpdateAssistPoint( DnActorHandle hActor, DnActorHandle hHitter ); bool _QueryUpdatePvPData( CDNDBConnection* pDBCon, CDNUserSession* pGameSession, UINT uiWinTeam, PvPCommon::QueryUpdatePvPDataType::eCode Type ); bool _QueryUpdateLadderData( CDNDBConnection* pDBCon, CDNUserSession* pGameSession, UINT uiWinTeam, PvPCommon::QueryUpdatePvPDataType::eCode Type ); void _QueryPvPEndLog( CDNDBConnection* pDBCon, CDNUserSession* pGameSession, CPvPGameMode* pPvPGameMode, SMyScore* pMyScore, PvPCommon::QueryUpdatePvPDataType::eCode Type ); #endif // #if defined( _GAMESERVER ) UINT _GetDieCount( DnActorHandle hActor ); UINT _GetContinuousKillCount( DnActorHandle hActor ); }; class IBoostPoolPvPScoreSystem : public CPvPScoreSystem, public TBoostMemoryPool { public : // };