DragonNest/Server/DNGameServer/RevengeSystem.h
2024-12-20 16:56:44 +08:00

32 lines
No EOL
1.9 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#if defined(PRE_ADD_REVENGE)
class CPvPGameMode;
class CDNUserSession;
class CRevengeSystem : public TBoostMemoryPool<CRevengeSystem> //메모리 풀 필요한가??
{
public:
CRevengeSystem(CPvPGameMode* pGameMode);
virtual ~CRevengeSystem();
bool CheckRevenge( CDNUserSession *pGameSession, CDNUserSession *pHitterSession );
void LeaveUser(UINT nSessionID);
private:
UINT GetRevengeTargetSessionID(UINT nSessionID) { return m_MapRevengeTarget[nSessionID]; }
void SetRevengeTargetSessionID(UINT nSessionID, UINT nTargetSessionID) { m_MapRevengeTarget[nSessionID] = nTargetSessionID; }
int IncreaseRevengeConditionCount(UINT nSessionID, UINT nTargetSessionID);
void ResetRevengeConditionCount(UINT nSessionID);
void ResetRevengeConditionTarget(UINT nSessionID);
void ResetAllRevengeConditionCount();
protected:
CPvPGameMode * m_pGameMode;
std::map<UINT,std::map<UINT,int>> m_MapRevengeConditions;
std::map<UINT, UINT> m_MapRevengeTarget;
};
#endif