#ifndef THREE_WAY_WAR_EVENT_ #define THREE_WAY_WAR_EVENT_ #include #include struct ForkedSungziMapInfo { int m_iForkedSung; int m_iForkedSungziStartPosition[3][2]; std::string m_stMapName; int m_iBossMobVnum; }; struct ForkedPassMapInfo { int m_iForkedPass[3]; int m_iForkedPassStartPosition[3][2]; std::string m_stMapName[3]; }; class CThreeWayWar : public singleton { public: CThreeWayWar (); virtual ~CThreeWayWar (); void Initialize (); bool LoadSetting (const char* szFileName); int GetKillScore (BYTE empire) const; void SetKillScore (BYTE empire, int count); void SetReviveTokenForPlayer (DWORD PlayerID, int count); int GetReviveTokenForPlayer (DWORD PlayerID); void DecreaseReviveTokenForPlayer (DWORD PlayerID); const ForkedPassMapInfo& GetEventPassMapInfo () const; const ForkedSungziMapInfo& GetEventSungZiMapInfo () const; bool IsThreeWayWarMapIndex (int iMapIndex) const; bool IsSungZiMapIndex (int iMapIndex) const; void RandomEventMapSet (); void RegisterUser (DWORD PlayerID); bool IsRegisteredUser (DWORD PlayerID) const; void onDead (LPCHARACTER pChar, LPCHARACTER pKiller); void SetRegenFlag (int flag) { RegenFlag_ = flag; } int GetRegenFlag () const { return RegenFlag_; } void RemoveAllMonstersInThreeWay () const; private: int KillScore_[3]; int RegenFlag_; std::set MapIndexSet_; std::vector PassInfoMap_; std::vector SungZiInfoMap_; std::unordered_map RegisterUserMap_; std::unordered_map ReviveTokenMap_; }; const char* GetSungziMapPath(); const char* GetPassMapPath( BYTE bEmpire ); int GetPassMapIndex( BYTE bEmpire ); int GetSungziMapIndex(); int GetSungziStartX( BYTE bEmpire ); int GetSungziStartY( BYTE bEmpire ); int GetPassStartX( BYTE bEmpire ); int GetPassStartY( BYTE bEmpire ); #endif /* THREE_WAY_WAR_EVENT_ */