void CDragonEvent::Run()
{
    if ( this->m_bMenualStart != FALSE )
    {
        return;
    }

    if ( this->EventState == 0 )
    {
        return;
    }

    if ( this->EventState == 1 )
    {
        if ( ( GetTickCount() - this->EventStartTime ) > 3000 )
        {
            this->EventState = 2;
            GCMapEventStateSend(this->m_MapNumber , 1, 1 );
            LogAdd("Event Start 1");
            this->DragonActive();
            this->EventStartTime = GetTickCount();
            return;
        }
    }
    else
    {
        if ( this->EventState == 2 )
        {
            if ( (GetTickCount() - this->EventStartTime ) > 300000 )
            {
                this->End();
            }
        }
    }
}
Example #2
0
void CEledoradoEvent::CheckGoldDercon(int MapNumber)
{
	if ( this->EventState == 0 )
		return;

	BOOL EventOn = FALSE;
	int EventClearMapNumber = -1;

	for ( int i=0;i<3;i++)
	{
		if ( this->m_BossGoldDerconMapNumber[i] != -1 )
		{
			if ( this->m_BossGoldDerconMapNumber[i] == MapNumber )
			{
				EventOn = TRUE;
			}
			else
			{
				EventClearMapNumber = this->m_BossGoldDerconMapNumber[i];
			}
		}
	}

	if ( EventClearMapNumber != -1 )
	{
		GCMapEventStateSend(EventClearMapNumber, 0, 3);
	}

	if ( EventOn != FALSE )
	{
		GCMapEventStateSend(MapNumber, 1, 3);
	}
	else
	{
		GCMapEventStateSend(MapNumber, 0, 3);
	}
}
void CDragonEvent::End()
{
    GCMapEventStateSend(this->m_MapNumber, 0, 1 );
    LogAdd("Event 1 End");
    this->EventState=0;
}