2023-11-16 22:31:06 +08:00
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
CScriptTimers::CScriptTimers()
|
|
|
|
{
|
2024-06-24 23:01:04 +08:00
|
|
|
m_dwTimerCount = 0;
|
2023-11-16 22:31:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------
|
2024-01-06 23:33:14 +08:00
|
|
|
|
|
|
|
CScriptTimers::~CScriptTimers()
|
|
|
|
{
|
2024-06-24 23:06:46 +08:00
|
|
|
DwordTimerMap::iterator itor;
|
|
|
|
for (itor = m_Timers.begin(); itor != m_Timers.end(); itor++)
|
|
|
|
{
|
|
|
|
FreeMem(itor->second);
|
|
|
|
SAFE_DELETE(itor->second);
|
|
|
|
}
|
|
|
|
m_Timers.clear();
|
2024-01-06 23:33:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------
|
2024-06-24 23:06:46 +08:00
|
|
|
|
|
|
|
void CScriptTimers::FreeMem(ScriptTimer_s* Timer)
|
|
|
|
{
|
|
|
|
if (Timer->cellParams != NULL)
|
|
|
|
{
|
|
|
|
free(Timer->cellParams);
|
|
|
|
Timer->cellParams = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
|