bool MMatchClanMap::CheckTick(u64 nClock) { if (MGetTimeDistance(m_nLastTick, nClock) < MTICK_CLAN_RUN) return false; m_nLastTick = nClock; return true; }
bool MQuestNPCSpawnTrigger::CheckSpawnEnable(int nCurrNPCCount) { unsigned int nNowTime = timeGetTime(); if (MGetTimeDistance(m_nLastTime, nNowTime) < m_Info.nSpawnTickTime) return false; m_nLastTime = nNowTime; if ((nCurrNPCCount >= m_Info.nCurrMinNPCCount) && (nCurrNPCCount <= m_Info.nCurrMaxNPCCount)) { MakeSpawnNPCs(); return true; } return false; }