SA-MP/bot/scrtimers.cpp

37 lines
779 B
C++
Raw Normal View History

2023-10-31 21:31:16 +08:00
2024-01-30 21:52:00 +08:00
#include "main.h"
2023-10-31 21:31:16 +08:00
//----------------------------------------------------------------------------------
2023-10-31 21:31:16 +08:00
CScriptTimers::CScriptTimers()
{
2024-01-30 21:52:00 +08:00
m_dwTimerCount = 0;
2023-10-31 21:31:16 +08:00
}
//----------------------------------------------------------------------------------
CScriptTimers::~CScriptTimers()
{
DwordTimerMap::iterator itor;
for (itor = m_Timers.begin(); itor != m_Timers.end(); itor++)
{
FreeMem(itor->second);
SAFE_DELETE(itor->second);
}
m_Timers.clear();
}
//----------------------------------------------------------------------------------
void CScriptTimers::FreeMem(ScriptTimer_s* Timer)
{
if (Timer->cellParams != NULL)
{
free(Timer->cellParams);
Timer->cellParams = NULL;
}
}
//----------------------------------------------------------------------------------