Пример #1
0
VOID WINAPI	TimerProcQueue2(LPVOID lpParametar, BOOL TimerOrWaitFired)
{
	if (g_MuTimer.GetTimerEnd() == TRUE)
	{
		return;
	}
	
	g_MuTimer.m_QueueTimer2.SyncLock();
		
	int nEventID = *(DWORD*)lpParametar;
	
	switch (nEventID)
	{
		case WM_FIRST_MSG_PROCESS:
		{
			int n;

			if (gDoPShopOpen != FALSE)
			{
				for (n=OBJ_STARTUSERINDEX; n<OBJMAX; n++)
				{
					PShop_ViewportListRegenarate(n);
				}
				
				for (n=OBJ_STARTUSERINDEX; n<OBJMAX; n++)
				{
					if (gObjIsConnected(n) != PLAYER_EMPTY)
					{
						gObj[n].m_bPShopItemChange = false;
					}
				}
			}
			
			for (n=OBJ_STARTUSERINDEX; n<OBJMAX; n++)
			{
				gObjUnionUpdateProc(n);
			}
			
			gObjSetState();

			GameServerInfoSend();

		} break;
		
		case WM_VIEWPORT_UPDATE:
		{
			for (int n = 0; n < OBJMAX; n++)
			{
				gObjStateSetCreate(n);
				gObjViewportListDestroy(n);
				gObjViewportListCreate(n);
				gObjViewportListProtocol(n);
			}
		} 
		break;
	}
		
	g_MuTimer.m_QueueTimer2.SyncUnlock();
}
Пример #2
0
BOOL CRaklionSelupan::CreateSelupan()
{
	int m_Type = -1;

	for ( int n=0;n<gMSetBase.m_Count;n++)
	{
		if( gMSetBase.m_Mp[n].m_Type == 459 )
		{
			m_Type = n;
		}
	}

	LPOBJ lpObj = NULL;
	int result = 0;


	result = gObjAddMonster(MAP_INDEX_RAKLION_BOSS);

	if ( result < 0 )
	{
		LogAddTD("[RAKLION] CreateSelupan error");
		return FALSE;
	}
	
	lpObj = &gObj[result];
	
	gObjSetPosMonster(result, m_Type);
	
	gObjSetMonster(result, 459); 
	
	LogAddTD("[RAKLION] Create Selupan : X (%d) / Y(%d)",lpObj->X,lpObj->Y);

	LPOBJ lpTargetObj = NULL;

	for(int n=0;n<OBJMAX;n++){

		lpTargetObj = &gObj[n];

		if(lpTargetObj->MapNumber == MAP_INDEX_RAKLION_BOSS){
			gObjStateSetCreate(n);
			gObjViewportListDestroy(n);
			gObjViewportListCreate(n);
			gObjViewportListProtocol(n);
		}
	}
	
	gObjSetState();

	this->m_iBossAttackMin = lpObj->m_AttackDamageMin;
	this->m_iBossAttackMax = lpObj->m_AttackDamageMax;

	return TRUE;
}