• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LogAdd函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LogAdd函数的典型用法代码示例。如果您正苦于以下问题:C++ LogAdd函数的具体用法?C++ LogAdd怎么用?C++ LogAdd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LogAdd函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: PHeadSetB

bool CShop::BuyShopItemAndDelete(int Pos, int aIndex,CShop *Shop)
{
	LPOBJ lpObj = &gObj[aIndex];
	if ( Shop->m_item[Pos].IsItem() == TRUE )
	{
		PMSG_BUYRESULT pResult;

		PHeadSetB((LPBYTE)&pResult, 0x32, sizeof(pResult));
		pResult.Result = -1;

		int iStoreTaxMoney = Shop->m_item[Pos].m_BuyMoney + (int)((__int64)Shop->m_item[Pos].m_BuyMoney * (__int64)g_CastleSiegeSync.GetTaxRateStore(lpObj->m_Index) / (__int64)100);

		if ( iStoreTaxMoney < 0 )
			iStoreTaxMoney  = 0;

		int iStoreTaxMoney2 = (int)((__int64)Shop->m_item[Pos].m_BuyMoney * (__int64)g_CastleSiegeSync.GetTaxRateStore(lpObj->m_Index) / (__int64)100);

		if ( iStoreTaxMoney2 < 0 )
			iStoreTaxMoney2  = 0;

		if ( lpObj->Money < iStoreTaxMoney )
			pResult.Result = -1;
		else
		{
			BOOL bNoItem = TRUE;

			if ( (Shop->m_item[Pos].m_Type >= ITEMGET(14,0) && Shop->m_item[Pos].m_Type <= ITEMGET(14,8)) ||
				(Shop->m_item[Pos].m_Type >= ITEMGET(14,35) && Shop->m_item[Pos].m_Type <= ITEMGET(14,40)))
			{
				int dur = (int)Shop->m_item[Pos].m_Durability;

				if ( dur == 0 )
					dur = 1;

				if ( ::gObjSearchItem(lpObj, Shop->m_item[Pos].m_Type,dur, Shop->m_item[Pos].m_Level) == TRUE )
				{
					bNoItem = FALSE;
					lpObj->Money -= iStoreTaxMoney;
					::g_CastleSiegeSync.AddTributeMoney(iStoreTaxMoney2);

					if ( lpObj->Money < 0 )
						lpObj->Money = 0;


					::GCMoneySend(lpObj->m_Index, lpObj->Money);
				}
			}

			if ( bNoItem != FALSE )
			{
				pResult.Result = gObjShopBuyInventoryInsertItem(lpObj->m_Index, Shop->m_item[Pos]);

				if ( pResult.Result != 0xFF )
				{
					ItemByteConvert((LPBYTE)&pResult.ItemInfo, Shop->m_item[Pos]);
					int lc64 = Shop->m_item[Pos].m_BuyMoney;
					lpObj->Money -= iStoreTaxMoney;
					::g_CastleSiegeSync.AddTributeMoney(iStoreTaxMoney2);

					if ( lpObj->Money < 0 )
						lpObj->Money = 0;

					GCMoneySend(lpObj->m_Index, lpObj->Money);
					int iTaxRate = g_CastleSiegeSync.GetTaxRateStore(lpObj->m_Index);

					for (int i = 0; i < Type.size(); i++)
					{
						int type = ITEMGET(Type[i],Index[i]); 
						if ( type == Shop->m_item[Pos].m_Type && Dur[i] == Shop->m_item[Pos].m_Durability && Level[i] == Shop->m_item[Pos].m_Level && 
							Opt1[i] == Shop->m_item[Pos].m_Option1 && Opt2[i] == Shop->m_item[Pos].m_Option2 && Opt3[i] == Shop->m_item[Pos].m_Option3 )
						{
							Type[i] = -1;
							Index[i] = -1;
							Dur[i] = -1;
							Level[i] = -1;
							Opt1[i] = -1;
							Opt2[i] = -1;
							Opt3[i] = -1;
							break;
						}
					}

					Shop->m_item[Pos].Clear();

					Shop->SendItemDataLen -= 8;
					Shop->ItemCount -- ;
					Shop->RefreshShopItems();
					DataSend(lpObj->m_Index, (LPBYTE)&pResult, pResult.h.size);


					LogAdd("[%s][%s] (%d) Shop buy [%d][%d][%d][%s] LEV:%d, DUR:%d, OP:[%d][%d][%d]",
						lpObj->AccountID, lpObj->Name, 14, lc64, iTaxRate, lc64+iStoreTaxMoney2, Shop->m_item[Pos].GetName(),
						Shop->m_item[Pos].m_Level, Shop->m_item[Pos].m_Durability,
						Shop->m_item[Pos].m_Option1, Shop->m_item[Pos].m_Option2,
						Shop->m_item[Pos].m_Option3);


					if ( Shop->ItemCount < 1 )
					{
						PMSG_TALKRESULT pResult;
//.........这里部分代码省略.........
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:101,代码来源:Shop.cpp


示例2: MsgBox

void CMagicDamage::Set(char* name, int skill, int damage,  int rlevel,  int mana,  int bp,  int dis, int Attr,  int iSkillType, unsigned char* ReqClass, int rEnergy, int rLeadership, int rdelay)
{
	if ( skill <0 || skill > MAX_SKILL -1 )
	{
		MsgBox("Limit error : (%s %d)", __FILE__, __LINE__);
		return;
	}

	if ( this->m_Damage[skill] != -1 )
	{
		MsgBox("Damage value is already set.(%s %d)", __FILE__, __LINE__);
		return;
	}

	strcpy_s(this->m_Name[skill], sizeof(this->m_Name[skill]), name);
	this->m_Damage[skill] = damage;
	this->m_rLevel[skill] = rlevel;
	this->m_Mana[skill] = mana;
	this->m_Distance[skill] = dis;
	this->m_RequireLeadership[skill] = rLeadership;
	this->m_Delay[skill] = rdelay;
	this->m_BrainPower[skill] = bp;
	this->m_Attr[skill] = Attr;
	this->m_iSkillType[skill] = iSkillType;
	memcpy(this->m_RequireClass[skill], ReqClass, sizeof(this->m_RequireClass[0]));
	this->m_RequireEnergy[skill] = (rEnergy * rlevel * 4) / 100 + 20;

	if ( skill == 13 ) // Blast
	{
		LogAdd("skill:%d", this->m_RequireEnergy[skill]);
	}

	// Set Level Requirements for Skills
	this->m_RequireLevel[skill] = 0;	// Required Level to use the skill

	if ( skill == 41 )	// Twisting Slash
	{
		this->m_RequireLevel[skill] = 80;
	}
	else if ( skill == 42 )	// Rageful Blow
	{
		this->m_RequireLevel[skill] = 170;
	}
	else if ( skill == 43 )	// Death Stab
	{
		this->m_RequireLevel[skill] = 160;
	}
	else if ( skill == 47 )	// Impale
	{
		this->m_RequireLevel[skill] = 28;
	}
	else if ( skill == 48 )	// Inner Strength
	{
		this->m_RequireLevel[skill] = 120;
	}
	else if ( skill == 52 )	
	{
		this->m_RequireLevel[skill] = 130;
	}

	if ( skill == 30 )
	{
		this->m_RequireEnergy[skill] = 30;
	}
	else if ( skill == 31 )
	{
		this->m_RequireEnergy[skill] = 60;
	}
	else if ( skill == 32 )
	{
		this->m_RequireEnergy[skill] = 90;
	}
	else if ( skill == 33 )
	{
		this->m_RequireEnergy[skill] = 130;
	}
	else if ( skill == 34 )
	{
		this->m_RequireEnergy[skill] = 170;
	}
	else if ( skill == 35 )
	{
		this->m_RequireEnergy[skill] = 210;
	}
	else if ( skill == 36 )
	{
		this->m_RequireEnergy[skill] = 300;
	}
	else if ( skill == 41 )
	{
		this->m_RequireEnergy[skill] = 0;
	}
	else if ( skill == 42 )
	{
		this->m_RequireEnergy[skill] = 0;
	}
	else if ( skill == 43 )
	{
		this->m_RequireEnergy[skill] = 0;
	}
//.........这里部分代码省略.........
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:101,代码来源:MagicDamage.cpp


示例3: fopen


//.........这里部分代码省略.........
					
						this->m_vtAssultType.push_back(m_SpawnTime.m_iMonsterGroup);
						this->m_vtAssultTypeRate.push_back(m_SpawnTime.m_iMonsterSpawnMinute);
					}
				}
				else if(type == 2)
				{
					while(true)
					{
						Token = GetToken();
						if( strcmp("end", TokenString) == 0 ) 
						{
							type++;
							break;
						}

						CASTLEDEEP_SPAWNTIME	m_SpawnTime;
						int m_iSpawnTimeIndex;

						m_iSpawnTimeIndex = TokenNumber;

						Token = GetToken();
						m_SpawnTime.m_iMonsterGroup = TokenNumber;

						Token = GetToken();
						m_SpawnTime.m_iMonsterSpawnMinute = TokenNumber;

						EnterCriticalSection(&this->m_critEventData);

						std::map<int, std::vector<CASTLEDEEP_SPAWNTIME> >::iterator it = this->m_mapSpawnTime.find(m_iSpawnTimeIndex);

						if( it != this->m_mapSpawnTime.end() )
						{
							it->second.push_back(m_SpawnTime);
						}
					
						LeaveCriticalSection(&this->m_critEventData);
					}
				}
				else if(type == 3)
				{
					while(true)
					{
						Token = GetToken();
						if( strcmp("end", TokenString) == 0 ) 
						{
							break;
						}

						CASTLEDEEP_MONSTERINFO	m_MonsterInfo;
						int m_iMonsterInfoIndex;

						m_iMonsterInfoIndex = TokenNumber;

						Token = GetToken();
						m_MonsterInfo.m_iMonsterGroup = TokenNumber;

						Token = GetToken();
						m_MonsterInfo.m_iMonsterType = TokenNumber;

						Token = GetToken();
						m_MonsterInfo.m_iMonsterNumber = TokenNumber;

						Token = GetToken();
						m_MonsterInfo.m_iSX = TokenNumber;
						
						Token = GetToken();
						m_MonsterInfo.m_iSY = TokenNumber;

						Token = GetToken();
						m_MonsterInfo.m_iDX = TokenNumber;

						Token = GetToken();
						m_MonsterInfo.m_iDY = TokenNumber;

						EnterCriticalSection(&this->m_critEventData);

						std::map<int, std::vector<CASTLEDEEP_MONSTERINFO> >::iterator it = this->m_mapMonsterInfo.find(m_iMonsterInfoIndex);
						if( it != this->m_mapMonsterInfo.end() )
						{
							it->second.push_back(m_MonsterInfo);
						}
					
						LeaveCriticalSection(&this->m_critEventData);
					}
				}
				break;
			}
		}
	}

	fclose(SMDFile);

	LogAdd("%s file load!",lpszFileName);

	this->m_bHasData = TRUE;

	//DebugLog("%s END",__FUNCTION__);
	return TRUE;
}
开发者ID:ADMTec,项目名称:GameServer,代码行数:101,代码来源:CastleDeepEvent.cpp


示例4: RecvDataParse

BOOL RecvDataParse(LPPER_IO_CONTEXT	lpIOContext, int uIndex)
{
    if ( lpIOContext->nSentBytes < 3 )
    {
        return TRUE;
    }

    LPBYTE recvbuf;
    int lOfs = 0;
    int size = 0;
    BYTE headcode;
    BYTE xcode = 0;
    BYTE byDec[7024];

    recvbuf = (LPBYTE)lpIOContext->Buffer;

    while ( 1 )
    {
        if( recvbuf[lOfs] == 0xC1 ||
                recvbuf[lOfs] == 0xC3 )
        {
            PBMSG_HEAD* lphead = (PBMSG_HEAD*)(recvbuf+lOfs);
            size				= lphead->size;
            headcode			= lphead->headcode;
            xcode				= recvbuf[lOfs];
        }
        else if( recvbuf[lOfs] == 0xC2 ||
                 recvbuf[lOfs] == 0xC4 ) //
        {
            PWMSG_HEAD* lphead	= (PWMSG_HEAD*)(recvbuf+lOfs);
            size				= ((WORD)(lphead->sizeH)<<8);
            size			   |= (WORD)(lphead->sizeL);
            headcode			= lphead->headcode;
            xcode				= recvbuf[lOfs];
        }
        else  // 헤더가 맞지 않다면..
        {
            LogAdd("error-L1 : Header error (%s %d)lOfs:%d, size:%d",
                   __FILE__, __LINE__, lOfs,
                   lpIOContext->nSentBytes);
            lpIOContext->nSentBytes = 0;
            return FALSE;
        }
        if ( size <= 0 )
        {
            LogAdd("error-L1 : size %d",size);
            return FALSE;
        }

        if ( size <= lpIOContext->nSentBytes )
        {
            if ( xcode == 0xC3 )
            {
                int iSize = g_SimpleModulusCS.Decrypt( byDec+2,(recvbuf+lOfs+2), size-2);

                if ( iSize < 0 )
                {

                }
                else
                {
                    PBMSG_HEAD* lphead = (PBMSG_HEAD*)(byDec+1);
                    headcode		= lphead->headcode;
                    BYTE subhead	= byDec[2];
                    byDec[1]		= 0xC1;
                    byDec[2]		= ((BYTE)iSize)+2;

                    CStreamPacketEngine_Server PacketStream;

                    PacketStream.Clear();

                    if ( PacketStream.AddData(byDec+1, iSize+2) == 0 )
                    {
                        LogAddC(2, "error-L1 : CStreamPacketEngine Adding Error : ip = %s account:%s name:%s HEAD:%x (%s,%d) State:%d",
                                gObj[uIndex].Ip_addr,
                                gObj[uIndex].AccountID,
                                gObj[uIndex].Name,
                                headcode,
                                __FILE__, __LINE__,
                                gObj[uIndex].Connected);
                        return FALSE;
                    }

                    if ( PacketStream.ExtractPacket(byDec) != 0 )
                    {
                        LogAddC(2, "error-L1 : CStreamPacketEngine ExtractPacket Error : ip = %s account:%s name:%s HEAD:%x (%s,%d) State:%d",
                                gObj[uIndex].Ip_addr,
                                gObj[uIndex].AccountID,
                                gObj[uIndex].Name,
                                headcode,
                                __FILE__, __LINE__,
                                gObj[uIndex].Connected);
                        return FALSE;
                    }

                    if ( xcode == 0xC3 && headcode == 0xC5 )
                    {
                        LogAdd("암호패킷 : [0x%x]" , headcode);
                    }

//.........这里部分代码省略.........
开发者ID:Natzugen,项目名称:muOnline-season6,代码行数:101,代码来源:giocp.cpp


示例5: while


//.........这里部分代码省略.........
	int dis;
	int rEnergy;
	int iSkillType;
	int rLeadership;
	int rDelay;
	int attr;
	int iSkillUseType;
	int iSkillBrand;
	int iKillCount;
	int RequireStatus[MAX_REQ_SKILL_STATUS] = {0};
	BYTE RequireClass[MAX_TYPE_PLAYER];

	while ( true )
	{
		Token = WzMemScript.GetToken();

		if ( Token == 2 )
		{
			break;
		}

		if ( Token == 1 )
		{
			number = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			strcpy_s(name, sizeof(name), WzMemScript.GetString() );

			Token = WzMemScript.GetToken();
			requireLevel = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			damage = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			mana = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			bp = (int)WzMemScript.GetNumber();	// Agility Gauge

			Token = WzMemScript.GetToken();
			dis = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			rDelay = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			rEnergy = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			rLeadership = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			attr = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			iSkillType = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			iSkillUseType = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			iSkillBrand = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			iKillCount = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireStatus[0] = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireStatus[1] = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireStatus[2] = (int)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireClass[0] = (BYTE)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireClass[1] = (BYTE)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireClass[2] = (BYTE)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireClass[3] = (BYTE)WzMemScript.GetNumber();

			Token = WzMemScript.GetToken();
			RequireClass[4] = (BYTE)WzMemScript.GetNumber();


			this->Set(name, number,damage, requireLevel, mana, bp, dis, attr, iSkillType, RequireClass, rEnergy, rLeadership, rDelay);
			this->SetEx(number, iSkillUseType, iSkillBrand, iKillCount, RequireStatus);
			DefMagicInf[number].Set(number, 0);
		}
	}

	LogAdd("(%s) Skill information data load complete", "Skill");
}
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:101,代码来源:MagicDamage.cpp


示例6: MsgBox


//.........这里部分代码省略.........
				}

				if ( iType == 4 )
				{
					int iChangeAITime = 0;

					Token = GetToken();

					if ( !strcmp("end", TokenString))
						break;

					iChangeAITime = (int)TokenNumber;
					this->m_iMonsterGroupChangeAITime = iChangeAITime;
				}

				if ( iType == 5 )
				{
					Token = GetToken();

					if ( !strcmp("end", TokenString))
						break;

					this->m_iMVPScoreTable[0] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPScoreTable[1] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPScoreTable[2] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPScoreTable[3] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPScoreTable[4] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPScoreTable[5] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPScoreTable[6] = (int)TokenNumber;
				}

				if ( iType == 6 )
				{
					Token = GetToken();

					if ( !strcmp("end", TokenString))
						break;

					this->m_iMVPRankScoreTable[0] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankScoreTable[1] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankScoreTable[2] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankScoreTable[3] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankScoreTable[4] = (int)TokenNumber;
				}

				if ( iType == 7 )
				{
					Token = GetToken();

					if ( !strcmp("end", TokenString))
						break;

					this->m_iMVPRankExpTable[0] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankExpTable[1] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankExpTable[2] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankExpTable[3] = (int)TokenNumber;

					Token = GetToken();
					this->m_iMVPRankExpTable[4] = (int)TokenNumber;
				}
			}	// while ( true )
		}	// while ( true )

		fclose(SMDFile);
		LogAdd( "[Crywolf Main Job] - %s file is Loaded", lpszFileName);
		this->m_bFileDataLoad = TRUE;
	}	// __try
	catch ( DWORD )
	{
		MsgBox("[Crywolf Main Job] - Loading Exception Error (%s) File. ", lpszFileName);
	}

	return this->m_bFileDataLoad;
}
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:101,代码来源:Crywolf.cpp


示例7: IocpServerWorker

DWORD WINAPI IocpServerWorker(LPVOID p)
{
    SYSTEM_INFO SystemInfo;
    DWORD ThreadID;
    SOCKET Accept;
    int nRet;
    int ClientIndex;
    SOCKADDR_IN cAddr;
    IN_ADDR		cInAddr;
    int			cAddrlen = sizeof( cAddr );
    LPPER_SOCKET_CONTEXT lpPerSocketContext = NULL;
    DWORD RecvBytes;
    DWORD Flags=0;

    InitializeCriticalSection(&criti);
    GetSystemInfo(&SystemInfo);

    g_dwThreadCount = SystemInfo.dwNumberOfProcessors * 2;
    __try
    {

        g_CompletionPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
        if ( g_CompletionPort == NULL)
        {
            LogAdd("CreateIoCompletionPort failed with error: %d", GetLastError());
            __leave;
        }

        for(DWORD dwCPU = 0; dwCPU < g_dwThreadCount; dwCPU++)
        {
            HANDLE ThreadHandle;
            // Create a server worker thread and pass the completion port to the thread.

            ThreadHandle = CreateThread(NULL, 0, ServerWorkerThread, g_CompletionPort, 0, &ThreadID);
            if ( ThreadHandle == NULL)
            {
                LogAdd("CreateThread() failed with error %d", GetLastError());
                __leave;
            }
            g_ThreadHandles[dwCPU] = ThreadHandle;
            CloseHandle(ThreadHandle);

        }

        if (!CreateListenSocket() )
            __leave;


        while(TRUE)
        {
            Accept = WSAAccept(g_Listen, (LPSOCKADDR)&cAddr, &cAddrlen, NULL, 0);
            if (Accept==SOCKET_ERROR)
            {
                EnterCriticalSection(&criti);
                LogAdd("WSAAccept() failed with error %d", WSAGetLastError());
                LeaveCriticalSection(&criti);
                continue;
            }
            EnterCriticalSection(&criti);

            memcpy( &cInAddr, &cAddr.sin_addr.s_addr, 4 );

            ClientIndex = gObjAddSearch(Accept, inet_ntoa(cInAddr) );

            if ( ClientIndex == -1 )
            {
                LogAddL("error-L2 : ClientIndex = -1");
                closesocket(Accept);
                LeaveCriticalSection(&criti);
                continue;
            }

            if (UpdateCompletionPort(Accept, ClientIndex, 1) == 0 )
            {
                LogAddL("error-L1 : %d %d CreateIoCompletionPort failed with error %d", Accept, ClientIndex, GetLastError() );
                closesocket(Accept);
                LeaveCriticalSection(&criti);
                continue;
            }

            if (gObjAdd(Accept, inet_ntoa(cInAddr), ClientIndex) == -1 )
            {
                LogAddL("error-L1 : %d %d gObjAdd() failed with error %d", Accept, ClientIndex, GetLastError() );
                LeaveCriticalSection(&criti);
                closesocket(Accept);
                continue;
            }

            memset(&gObj[ClientIndex].PerSocketContext->IOContext[0].Overlapped, 0, sizeof(OVERLAPPED));
            memset(&gObj[ClientIndex].PerSocketContext->IOContext[1].Overlapped, 0, sizeof(OVERLAPPED));
            gObj[ClientIndex].PerSocketContext->IOContext[0].wsabuf.buf = gObj[ClientIndex].PerSocketContext->IOContext[0].Buffer;
            gObj[ClientIndex].PerSocketContext->IOContext[0].wsabuf.len = MAX_IO_BUFFER_SIZE;
            gObj[ClientIndex].PerSocketContext->IOContext[0].nTotalBytes = 0;
            gObj[ClientIndex].PerSocketContext->IOContext[0].nSentBytes = 0;
            gObj[ClientIndex].PerSocketContext->IOContext[0].nWaitIO    = 0;
            gObj[ClientIndex].PerSocketContext->IOContext[0].nSecondOfs = 0;
            gObj[ClientIndex].PerSocketContext->IOContext[0].IOOperation = RECV_IO;

            gObj[ClientIndex].PerSocketContext->IOContext[1].wsabuf.buf = gObj[ClientIndex].PerSocketContext->IOContext[0].Buffer;
            gObj[ClientIndex].PerSocketContext->IOContext[1].wsabuf.len = MAX_IO_BUFFER_SIZE;
//.........这里部分代码省略.........
开发者ID:Natzugen,项目名称:muOnline-season6,代码行数:101,代码来源:giocp.cpp


示例8: LogAdd

int CKanturu::CheckEnterKanturu(int iUserIndex)
{
	if ( !gObjIsConnected(iUserIndex) )
		return -1;

	if ( gObj[iUserIndex].MapNumber != MAP_INDEX_KANTURU2 ) 
	{
		LogAdd("[ KANTURU ][ Entrance Fail ] Invalid Map Number(%d) [%s][%s] State(%d)",
			gObj[iUserIndex].MapNumber, gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
			this->GetKanturuState());

		return 4;
	}

	if ( this->GetKanturuState() == KANTURU_STATE_BATTLE_OF_MAYA &&
		 this->m_BattleOfMaya.GetEntrancePermit() == TRUE)
	{
		if ( g_KanturuBattleUserMng.IsOverMaxUser() == TRUE )
		{
			LogAdd("[ KANTURU ][ Entrance Fail ] Over Max User [%s][%s] State(%d)-(%d)",
				gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
				this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

			return 1;
		}

		if ( this->CheckEqipmentMoonStone(iUserIndex) == FALSE )
		{
			LogAdd("[ KANTURU ][ Entrance Fail ] Moon Stone is not exist [%s][%s] State(%d)-(%d)",
				gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
				this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

			return 2;
		}

		if ( (gObj[iUserIndex].pInventory[7].m_Type < ITEMGET(12,0) || gObj[iUserIndex].pInventory[7].m_Type > ITEMGET(12,6) ) && gObj[iUserIndex].pInventory[7].m_Type < ITEMGET(12,36) &&
			 gObj[iUserIndex].pInventory[7].m_Type != ITEMGET(13,30) &&
			 gObj[iUserIndex].pInventory[8].m_Type != ITEMGET(13,3)  &&
			 gObj[iUserIndex].pInventory[8].m_Type != ITEMGET(13,37) )
		{
			LogAdd("[ KANTURU ][ Entrance Fail ] Wing Item is not exist [%s][%s] State(%d)-(%d)",
				gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
				this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

			return 7;
		}

		if ( gObj[iUserIndex].pInventory[8].m_Type == ITEMGET(13,2) )
		{
			LogAdd("[ KANTURU ][ Entrance Fail ] Uniria Item is exist [%s][%s] State(%d)-(%d)",
				gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
				this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

			return 5;
		}

		if ( gObj[iUserIndex].pInventory[11].m_Type == ITEMGET(13,10) ||
			gObj[iUserIndex].pInventory[10].m_Type == ITEMGET(13,10) )
		{
			LogAdd("[ KANTURU ][ Entrance Fail ] Trasportation Ring is exist [%s][%s] State(%d)-(%d)",
				gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
				this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

			return 6;
		}


        if ( gObj[iUserIndex].pInventory[11].m_Type == ITEMGET(13,40) ||
                gObj[iUserIndex].pInventory[10].m_Type == ITEMGET(13,40) )
        {
                LogAdd("[ Kanturu ][ Entrance Fail ] Jack'O Lantern Polymorph Ring is exist [%s][%s] State(%d)-(%d)",
                        gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
                        this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

                return 6;
        }

        if ( gObj[iUserIndex].pInventory[11].m_Type == ITEMGET(13,41) ||
                gObj[iUserIndex].pInventory[10].m_Type == ITEMGET(13,41) )
        {
                LogAdd("[ Kanturu ][ Entrance Fail ] Santa Polymorph Ring is exist [%s][%s] State(%d)-(%d)",
                        gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
                        this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

                return 6;
        }


		if ( gObj[iUserIndex].pInventory[11].m_Type == ITEMGET(13,39) ||
			gObj[iUserIndex].pInventory[10].m_Type == ITEMGET(13,39) )
		{
			LogAdd("[ Kanturu ][ Entrance Fail ] EliteSkelletoneChangeRing is exist [%s][%s] State(%d)-(%d)",
				gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
				this->GetKanturuState(), this->m_BattleOfMaya.GetBattleOfMayaState());

			return 6;
		}

		LogAdd("[ KANTURU ][ Entrance Success ] [%s][%s] State(%d)-(%d)",
			gObj[iUserIndex].AccountID, gObj[iUserIndex].Name,
//.........这里部分代码省略.........
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:101,代码来源:Kanturu.cpp


示例9: fopen

bool CEventManagement::Load(LPSTR lpszFileName)
{
    this->m_bHasData = false;
    this->Clear();

    SMDFile = fopen(lpszFileName, "r");

    if ( SMDFile == NULL )
    {
        MsgBox("[DOTH] Info file Load Fail [%s]", lpszFileName);

        return false;
    }

    int Token;
    int type = -1;

    while ( true )
    {
        Token = GetToken();

        if ( Token == 2 )
        {
            break;
        }

        type = TokenNumber;

        while ( true )
        {
            if ( type == 0 )
            {
                Token = GetToken();

                if ( strcmp("end", TokenString) == 0 )
                {
                    break;
                }

                EVENT_ID_TIME EIT;

                EIT.m_eEventKind = TokenNumber;

                Token = GetToken();
                EIT.m_iHour = TokenNumber;

                Token = GetToken();
                EIT.m_iMinute = TokenNumber;

                EIT.m_bEventStarted = false;

                this->m_vtEventTime.push_back(EIT);
            }
        }
    }

    fclose(SMDFile);
    LogAdd("[DOTH] %s file load!", lpszFileName);

    this->m_bHasData = true;

    return true;
}
开发者ID:Natzugen,项目名称:IGCN---Season-5,代码行数:63,代码来源:EventManagement.cpp


示例10: MsgBox

BOOL CKanturu::LoadData(LPSTR lpszFileName)
{
	this->m_bFileDataLoad = FALSE;

	if ( !lpszFileName || !strcmp(lpszFileName, ""))
	{
		MsgBox("[ KANTURU ] - File load error : File Name Error");
		return FALSE;
	}

	try
	{

		if (fopen_s(&SMDFile,lpszFileName, "r") !=0 )
		{
			DWORD dwError = GetLastError();
			MsgBox("[ KANTURU ] - Can't Open %s ", lpszFileName);
			return FALSE;
		}

		this->ResetAllData();

		enum SMDToken Token;
		int iType = -1;
		int iState = 0;
		int iCondition = 0;
		int iValue = 0;

		while ( true )
		{
			Token = (SMDToken)GetToken();
			
			if ( Token ==  END )
				break;
			
			iType = (int)TokenNumber;

			while ( true )
			{
				if ( iType == 0 )
				{
					iState = 0;
					iCondition = 0;
					iValue = 0;

					Token = (SMDToken)GetToken();
					
					if ( !strcmp("end", TokenString))
						break;

					iState = (int)TokenNumber;

					Token = (SMDToken)GetToken();
					iCondition = (int)TokenNumber;

					Token = (SMDToken)GetToken();
					iValue = (int)TokenNumber;

					if ( this->m_StateInfoCount < 0 || this->m_StateInfoCount >= MAX_KANTURU_STATE_INFO )
					{
						MsgBox("[ KANTURU ] - Exceed Max State Time (%d)", this->m_StateInfoCount);
						break;
					}

					this->m_StateInfo[this->m_StateInfoCount].SetStateInfo(iState);
					this->m_StateInfo[this->m_StateInfoCount].SetCondition(iCondition);

					if ( iCondition == 1 )
						iValue *= 1000;

					this->m_StateInfo[this->m_StateInfoCount].SetValue(iValue);

					this->m_StateInfoCount++;
				}
				else if ( iType == 10 )
				{
					BOOL bEnableCheckMoonStone = FALSE;

					Token = (SMDToken)GetToken();
					
					if ( !strcmp("end", TokenString))
						break;

					bEnableCheckMoonStone = (BOOL)TokenNumber;
					this->SetEnableCheckMoonStone(bEnableCheckMoonStone);
				}
				else
				{
					Token = (SMDToken)GetToken();
					
					if ( !strcmp("end", TokenString))
						break;
				}
			}
		}

		fclose(SMDFile);
		LogAdd( "[ KANTURU ] - %s file is Loaded", lpszFileName);
		
		this->m_bFileDataLoad = TRUE;
//.........这里部分代码省略.........
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:101,代码来源:Kanturu.cpp


示例11: fopen

void CItemBag::LoadItem(char* script_file)
{
    SMDFile = fopen(script_file, "r");

    if ( SMDFile == NULL )
    {
        LogAdd(lMsg.Get(MSGGET(1, 197)), script_file);
        return ;
    }

    int Token;
    int n = 0;

    while ( true )
    {
        Token = GetToken();

        if ( Token == 2 )
        {
            break;
        }

        if ( Token == 1 )
        {
            n = this->BagObjectCount;

            this->BagObject[n].m_type = TokenNumber;

            Token = GetToken();
            this->BagObject[n].m_index = TokenNumber;

            Token = GetToken();
            this->BagObject[n].m_level = TokenNumber;

            Token = GetToken();
            this->BagObject[n].m_op1 = TokenNumber;

            Token = GetToken();
            this->BagObject[n].m_op2 = TokenNumber;

            Token = GetToken();
            this->BagObject[n].m_op3 = TokenNumber;

            if ( this->BagObject[n].m_op2 != 0 )
            {
                this->BagExItemCount++;
            }
            else
            {
                this->BagNormalItemCount++;
            }

            this->BagObjectCount++;

            if ( this->BagObjectCount > MAX_ITEMBAG_ATTR-1 )
            {
                break;
            }
        }
    }

    fclose(SMDFile);

    LogAdd(lMsg.Get(MSGGET(1, 198)), script_file);
}
开发者ID:Natzugen,项目名称:server-xmtur,代码行数:65,代码来源:ItemBag.cpp


示例12: while


//.........这里部分代码省略.........
						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardSubType = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardCount = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].LinkConditionIndex = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextBeforeReg = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextAfterReg = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextCompleteQuest = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextQuestClear = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[0] = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[1] = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[2] = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[3] = WzMemScript.GetNumber();

						Token = WzMemScript.GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[4] = WzMemScript.GetNumber();

						this->QuestInfo[iQuestIndex].QuestSubInfoCount++;

					
					}
					
					LogAdd("[Quest] (%s) Load : Index %d, SubInfoCount %d",
						this->QuestInfo[iQuestIndex].Name, iQuestIndex,
						this->QuestInfo[iQuestIndex].QuestSubInfoCount );
						this->m_QuestCount++;
				}
				else if ( Type == 1 )
				{
					Token = WzMemScript.GetToken();
					auto int iQuestIndex = WzMemScript.GetNumber();

					while ( true )
					{
						auto int iFailInfoCount = this->QuestInfo[iQuestIndex].QuestConditionCount;
						Token = WzMemScript.GetToken();

						if ( Token == 0 )
						{
							if ( strcmp("end", WzMemScript.GetString()) == 0 )
							{
								break;
							}
						}	
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].Index = WzMemScript.GetNumber();

							Token = WzMemScript.GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].NeedQuestIndex = WzMemScript.GetNumber();

							Token = WzMemScript.GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].MinLevel = WzMemScript.GetNumber();

							Token = WzMemScript.GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].MaxLevel = WzMemScript.GetNumber();

							Token = WzMemScript.GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].ReqStr = WzMemScript.GetNumber();

							Token = WzMemScript.GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].NeedZen = WzMemScript.GetNumber();

							Token = WzMemScript.GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].StartContext = WzMemScript.GetNumber();

							this->QuestInfo[iQuestIndex].QuestConditionCount++;
						
					}
				}
				else
				{
					MsgBox("Quest Info Read Fail");
					fclose(SMDFile);
					return false;
				}
			}
		}
	}

	this->InitQuestItem();
	return true;
}
开发者ID:constantinbogdan,项目名称:node3d,代码行数:101,代码来源:QuestInfo.cpp


示例13: fopen


//.........这里部分代码省略.........
			rLeadership = (int)TokenNumber;

			Token = GetToken();
			attr = (int)TokenNumber;

			Token = GetToken();
			iSkillType = (int)TokenNumber;

			Token = GetToken();
			iSkillUseType = (int)TokenNumber;

			Token = GetToken();
			iSkillBrand = (int)TokenNumber;

			Token = GetToken();
			iKillCount = (int)TokenNumber;
			/*
			CLASS_WIZARD = 0x0,
  CLASS_KNIGHT = 0x1,
  CLASS_ELF = 0x2,
  CLASS_MAGUMSA = 0x3,
  CLASS_DARKLORD = 0x4,
  CLASS_SUMMONER = 0x5,
  CLASS_FIGHTER = 0x6,*/
			Token = GetToken();
			RequireStatus[0] = (int)TokenNumber;

			Token = GetToken();
			RequireStatus[1] = (int)TokenNumber;

			Token = GetToken();
			RequireStatus[2] = (int)TokenNumber;

			Token = GetToken();
			RequireClass[0] = (BYTE)TokenNumber;

			Token = GetToken();
			RequireClass[1] = (BYTE)TokenNumber;

			Token = GetToken();
			RequireClass[2] = (BYTE)TokenNumber;

			Token = GetToken();
			RequireClass[3] = (BYTE)TokenNumber;

			Token = GetToken();
			RequireClass[4] = (BYTE)TokenNumber;

			Token = GetToken();
			RequireClass[5] = (BYTE)TokenNumber;

			Token = GetToken();
			RequireClass[6] = (BYTE)TokenNumber;

			Token = GetToken();
			nSkillRank = (WORD)TokenNumber;

			Token = GetToken();
			nSkillGroup = (WORD)TokenNumber;

			Token = GetToken();
			nRequireMLPoint = (WORD)TokenNumber;

			Token = GetToken();
			nHP = (WORD)TokenNumber;

			Token = GetToken();
			nSD = (WORD)TokenNumber;

			Token = GetToken();
			wKeepTime = (WORD)TokenNumber;

			Token = GetToken();
			nRequireStr = (WORD)TokenNumber;

			Token = GetToken();
			nRequireDex = (WORD)TokenNumber;

			Token = GetToken();
			btIconNum = (BYTE)TokenNumber;

			Token = GetToken();
			nSkillType = TokenNumber;

			Token = GetToken();
			btItemSkill = (BYTE)TokenNumber;

			Token = GetToken();
			btIsDamage = (BYTE)TokenNumber;

			this->Set(name, number,damage, requireLevel, mana, bp, dis, attr, iSkillType, RequireClass, rEnergy, rLeadership, rDelay, btItemSkill, btIsDamage );
			this->SetEx(number, iSkillUseType, iSkillBrand, iKillCount, RequireStatus);
			this->SetMasterLevelSkillInfo(number,nSkillRank,nSkillGroup,nRequireMLPoint,nHP,nSD,wKeepTime,nRequireStr,nRequireDex);
			DefMagicInf[number].Set(number, 0);
		}
	}

	fclose(SMDFile);
	LogAdd(lMsg.Get(MSGGET(1, 200)), filename);
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:101,代码来源:MagicDamage.cpp


示例14: fopen


//.........这里部分代码省略.........
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardSubType = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardCount = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].LinkConditionIndex = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextBeforeReg = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextAfterReg = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextCompleteQuest = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextQuestClear = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[0] = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[1] = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[2] = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[3] = TokenNumber;

						Token = GetToken();
						this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[4] = TokenNumber;

						this->QuestInfo[iQuestIndex].QuestSubInfoCount++;

					
					}
					
					LogAdd("[Quest] (%s) Load : Index %d, SubInfoCount %d",
						this->QuestInfo[iQuestIndex].Name, iQuestIndex,
						this->QuestInfo[iQuestIndex].QuestSubInfoCount );
						this->m_QuestCount++;
				}
				else if ( Type == 1 )
				{
					Token = GetToken();
					auto int iQuestIndex = TokenNumber;

					while ( true )
					{
						auto int iFailInfoCount = this->QuestInfo[iQuestIndex].QuestConditionCount;
						Token = GetToken();

						if ( Token == 0 )
						{
							if ( strcmp("end", TokenString) == 0 )
							{
								break;
							}
						}
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].Index = TokenNumber;

							Token = GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].NeedQuestIndex = TokenNumber;

							Token = GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].MinLevel = TokenNumber;

							Token = GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].MaxLevel = TokenNumber;

							Token = GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].ReqStr = TokenNumber;

							Token = GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].NeedZen = TokenNumber;

							Token = GetToken();
							this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].StartContext = TokenNumber;

							this->QuestInfo[iQuestIndex].QuestConditionCount++;
						
					}
				}
				else
				{
					MsgBox("Quest Info Read Fail");
					fclose(SMDFile);
					return false;
				}
			}
		}
	}

	fclose(SMDFile);
	this->InitQuestItem();
	return true;
}
开发者ID:constantinbogdan,项目名称:node3d,代码行数:101,代码来源:QuestInfo.cpp


示例15: while

void CAttackEvent::Active()
{
	for ( int n = 0; n < OBJ_MAXMONSTER ; n++ )
	{
		if ( gObj[n].Class == 53 || gObj[n].Class == 54 )	// Golden Titan + Golden Soldier
		{
			gObj[n].Live = true;

			if ( gObj[n].Class == 53 )
			{
				this->m_MapNumber = MAP_INDEX_DEVIAS;
				gObj[n].MapNumber = this->m_MapNumber;

				while (	gMSetBase.GetBoxPosition(this->m_MapNumber, 10, 10, 240, 240, gObj[n].X, gObj[n].Y) == 0 )
				{

				}

				this->m_BossMap53 = gObj[n].MapNumber;
				this->m_BossMapX53 = gObj[n].X;
				this->m_BossMapY53 = gObj[n].Y;

				LogAdd("event %d %d %d create ", this->m_BossMap53, this->m_BossMapX53, this->m_BossMapY53);

			}
			else
			{
				this->m_MapNumber = this->m_BossMap53;
				gObj[n].MapNumber = this->m_MapNumber;

				while (	gMSetBase.GetBoxPosition(this->m_MapNumber, this->m_BossMapX53 -4, this->m_BossMapY53-4, this->m_BossMapX53+4, this->m_BossMapY53+4, gObj[n].X, gObj[n].Y) == 0 )
				{

				}
			}
				
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = gObj[n].X;
			gObj[n].StartY = gObj[n].Y;
			gObj[n].m_State = 1;
			
		}
		else if ( gObj[n].Class == 55 || gObj[n].Class == 56 )	// Death Bone + Death King
		{
			gObj[n].Live = TRUE;

			if ( gObj[n].Class == 55 )
			{
				if ( (rand() % 2 ) == 0 )
				{
					this->m_MapNumber = MAP_INDEX_RORENCIA;
				}
				else
				{
					this->m_MapNumber = MAP_INDEX_NORIA;
				}

				gObj[n].MapNumber = this->m_MapNumber;


				while ( gMSetBase.GetBoxPosition(this->m_MapNumber, 10, 10, 240, 240, gObj[n].X, gObj[n].Y) == 0 )
				{

				}

				this->m_BossMap55 = gObj[n].MapNumber;
				this->m_BossMapX55 = gObj[n].X;
				this->m_BossMapY55 = gObj[n].Y;
				LogAdd("event %d %d %d create ", this->m_BossMap55, this->m_BossMapX55, this->m_BossMapY55 );
			}
			else
			{
				this->m_MapNumber = this->m_BossMap55;
				gObj[n].MapNumber = this->m_MapNumber;


				while (	gMSetBase.GetBoxPosition(this->m_MapNumber, this->m_BossMapX55 -4, this->m_BossMapY55-4, this->m_BossMapX55+4, this->m_BossMapY55+4, gObj[n].X, gObj[n].Y) == 0 )
				{

				}
			}

			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = gObj[n].X;
			gObj[n].StartY = gObj[n].Y;
			gObj[n].m_State = 1;
		}
	}
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:95,代码来源:AttackEvent.cpp


示例16: BuxConvert

void ConnectEx::SendLogin(int UserIndex, CONNECTEX_LOGIN * Data)
{
	/*if(		g_License.GetLicenseID() != Customer::Zeon
		&&	g_License.GetLicenseID() != Customer::Refinery
		&&	g_License.GetLicenseID() != Customer::Bereznuk
		&&	g_License.GetLicenseID() != Customer::Reedlan
		&&	g_License.GetLicenseID() != Customer::MUAngel
		&&	g_License.GetLicenseID() != Customer::MUAngel2 
		&&	g_License.GetLicenseID() != Customer::White
		&&	g_License.GetLicenseID() != Customer::White2 
		&&  g_License. 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LogAddC函数代码示例发布时间:2022-05-30
下一篇:
C++ LogAccuracyHit函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap