* Update structure for SMSG_CALENDAR_SEND_CALENDAR and add support for sending raid reset times. Thanks to raczman for helping with the client research.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2010-01-03 14:41:07 +01:00
parent 073235ef1b
commit a6f7a8264e
4 changed files with 82 additions and 16 deletions
+6 -1
View File
@@ -115,6 +115,8 @@ class InstanceSave
bool m_canReset;
};
typedef UNORDERED_MAP<uint32 /*PAIR32(map,difficulty)*/,time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
class TRINITY_DLL_DECL InstanceSaveManager : public Trinity::Singleton<InstanceSaveManager, Trinity::ClassLevelLockable<InstanceSaveManager, ACE_Thread_Mutex> >
{
friend class InstanceSave;
@@ -140,7 +142,6 @@ class TRINITY_DLL_DECL InstanceSaveManager : public Trinity::Singleton<InstanceS
bool operator == (const InstResetEvent& e) { return e.instanceId == instanceId; }
};
typedef std::multimap<time_t /*resetTime*/, InstResetEvent> ResetTimeQueue;
typedef UNORDERED_MAP<uint32 /*PAIR32(map,difficulty)*/,time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
void CleanupInstances();
void PackInstances();
@@ -155,6 +156,10 @@ class TRINITY_DLL_DECL InstanceSaveManager : public Trinity::Singleton<InstanceS
{
m_resetTimeByMapDifficulty[MAKE_PAIR32(mapid,d)] = t;
}
ResetTimeByMapDifficultyMap const& GetResetTimeMap() const
{
return m_resetTimeByMapDifficulty;
}
void ScheduleReset(bool add, time_t time, InstResetEvent event);
void Update();