您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GCServerMsgStringSend函数代码示例

51自学网 2021-06-01 20:49:29
  C++
这篇教程C++ GCServerMsgStringSend函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ZeroMemory

void ShopPointEx::SendNotify(int UserIndex, int CoinC, int CoinP, int CoinG){	gGameShop.GDSavePoint(UserIndex);	// ----	char Text[256];	// ----	if( CoinC > 0 )	{		ZeroMemory(Text, 255);		wsprintf(Text, "Obtained %d WCoinC", CoinC);		GCServerMsgStringSend(Text, UserIndex, 1);	}	// ----	if( CoinP > 0 )	{		ZeroMemory(Text, 255);		wsprintf(Text, "Obtained %d WCoinP", CoinP);		GCServerMsgStringSend(Text, UserIndex, 1);	}	// ----	if( CoinG > 0 )	{		ZeroMemory(Text, 255);		wsprintf(Text, "Obtained %d GoblinPoint", CoinG);		GCServerMsgStringSend(Text, UserIndex, 1);	}}
开发者ID:EderRS,项目名称:muOnline-season6,代码行数:27,


示例2: IncreasePoints

void PCPointShop::LevelUp(DWORD PlayerID, int MobID){	if(PCPoint.AddWhenKillMobs==1)	{		int ID=PlayerID-MIN_PLAYERID;		int RecvPoints		= 0;		char sBuf[255]		= {0};		LPGOBJSTRUCT pObj	= (LPGOBJSTRUCT)(PlayerID*gObjSize + gObjBaseAddr);		if(pObjGS[ID].PCPlayerPoints<MaxPlayerPoints)		{			RecvPoints=GetRewardPoints(MobID);			if (RecvPoints>0)			{				IncreasePoints(PlayerID,RecvPoints);				//Send Blue Text with Points				wsprintf(sBuf, MSG24,pObj->Name,RecvPoints);				GCServerMsgStringSend(sBuf,PlayerID, 0x01);				wsprintf(sBuf, "[PCPointShop][%s] Kill: %d, Earned %d, Total: %d",pObj->Name,MobID,RecvPoints,pObjGS[ID].PCPlayerPoints);				Log.outNormal("%s/n",sBuf);				if (pObjGS[ID].PCInfoReceived==0)				{					this->GetInfo(PlayerID);								}			}		} else 		{			GCServerMsgStringSend(MSG25,PlayerID, 0x01);		}	}}
开发者ID:brunohkbx,项目名称:pendmu-server,代码行数:35,


示例3: GCServerMsgStringSend

// ----------------------------------------------------------------------------------------------------------------//## функция сепаратора для протоколаvoid DuelSystem::RecvWatchRequest(LPOBJ lpObj, PMSG_DUEL_REQUEST_WATCH* lpMsg){	if(lpObj->m_IfState.use == 0 || lpObj->m_IfState.type != 20) 	{		return;	}	// ----	lpObj->m_IfState.use  = 0;	lpObj->m_IfState.type = 0;	// ----	if(lpMsg->btRoomIndex >= 0 && lpMsg->btRoomIndex < MAX_DUEL_ROOMS)	{		if(this->g_DuelRooms[lpMsg->btRoomIndex].RoomFree == TRUE) 		{			GCServerMsgStringSend("Sorry, but this room is free!", lpObj->m_Index, 1);			return;		}		// ----		for(short i = 0; i < MAX_DUEL_SEPARATORS; ++i)		{			if(this->g_DuelRooms[lpMsg->btRoomIndex].szSeparators[i] == NULL)			{				if(gObjMoveGate(lpObj->m_Index, g_DuelGates[lpMsg->btRoomIndex].SeparatorGate))				{					this->g_DuelRooms[lpMsg->btRoomIndex].szSeparators[i] = lpObj;					// ----					this->SendSpectatorList(lpObj, lpMsg->btRoomIndex);					// ----					this->SendSpectatorList(lpMsg->btRoomIndex);					// ----					this->SendSpectatorAdd(i, lpMsg->btRoomIndex);					// ----					GCServerMsgStringSend("Please sit down and watch this duel. Have fun.", lpObj->m_Index, 1);					// ----							if(Config.Duel.Logging)		{					Log.ConsoleOutPut(1, c_Blue, t_Duel,"[Duel System][%s][%s] Spectator join to room: [%d]", 									lpObj->AccountID, lpObj->Name, lpMsg->btRoomIndex + 1);							}					// ----					GCStateInfoSendg(lpObj, 1, 98);					// ----					this->SendLifebarInit(lpObj, lpMsg->btRoomIndex);					// ----					this->SendLifebarStatus(lpObj, lpMsg->btRoomIndex);					// ----					this->UpdateDuelScore(lpMsg->btRoomIndex);					// ----					AddTab[lpObj->m_Index].DUEL_SpecVisible = 1;					// ----					return;				}				GCServerMsgStringSend("Failed to move to Duel Room!", lpObj->m_Index, 1);				return;			}		}		GCServerMsgStringSend("Sorry, but this room is full!", lpObj->m_Index, 1);		return;	}}
开发者ID:BlueEyed,项目名称:GreatDevelop-Julia-Project,代码行数:62,


示例4: sprintf

void CVipSystem::ApplyVip(int aIndex){	OBJECTSTRUCT *pObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);	if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 0)	{		char lvlmsg[100];		sprintf(lvlmsg,"[Free] Welcome back, [ %s ].", pObj->AccountID);		GCServerMsgStringSend(lvlmsg,aIndex,1);	}	if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 1)	{		pObj[aIndex].m_wItemDropRate += this->m_PlatinumDrop;		char lvlmsg[100];		sprintf(lvlmsg,"[Bronze VIP] Welcome back, [ %s ].", pObj->AccountID);		GCServerMsgStringSend(lvlmsg,aIndex,1);	}	else if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 2)	{		pObj[aIndex].m_wItemDropRate += this->m_PlatinumDrop;		char lvlmsg[100];		sprintf(lvlmsg,"[Platinum VIP] Welcome back, [ %s ].", pObj->AccountID);		GCServerMsgStringSend(lvlmsg,aIndex,1);	}	else if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 3)	{		pObj[aIndex].m_wItemDropRate += this->m_GoldDrop;		char lvlmsg[100];		sprintf(lvlmsg,"[Gold VIP] Welcome back, [ %s ].", pObj->AccountID);		GCServerMsgStringSend(lvlmsg,aIndex,1);	}}
开发者ID:Natzugen,项目名称:EvolutionTeam-s2,代码行数:31,


示例5: wsprintf

// ----------------------------------------------------------------------------------------------------------------//## Процесс убиства игрокаvoid DuelSystem::KillUserProc(LPOBJ lpObj, LPOBJ lpTarget){ 	if(!this->DuelCheck(lpObj, lpTarget))	{		return;	}	// ----	int iDuelRoom = this->GetUserDuelRoom(lpObj);	// ----	if(iDuelRoom == -1)	{		return;	}	// ----	lpTarget->KillerType = 3;	// ----	int Points = ((lpObj == this->g_DuelRooms[iDuelRoom].szlpObjOne) ? this->g_DuelRooms[iDuelRoom].szPointsOne : this->g_DuelRooms[iDuelRoom].szPointsTy);	// ----	if(Points >= MAX_DUEL_WIN_POINTS)	{		this->g_DuelRooms[iDuelRoom].szWinner = TRUE;		// ----		this->SendEndDuel(lpTarget);		this->SendEndDuel(lpObj);		// ----		this->SendEndDuelNotification(lpTarget, lpObj->Name, lpTarget->Name);		this->SendEndDuelNotification(lpObj, lpObj->Name, lpTarget->Name);		// ----		char Buff[256];		// ----		wsprintf(Buff,"You emerge triumphant over %s!", lpTarget->Name);		GCServerMsgStringSend(Buff,lpObj->m_Index,1);		// ----		wsprintf(Buff,"%s has defeated you!",lpObj->Name);		GCServerMsgStringSend(Buff,lpTarget->m_Index,1);		// ----		PMSG_SERVERCMD ServerCmd;		// ----		PHeadSubSetB((LPBYTE)&ServerCmd, 0xF3, 0x40, sizeof(ServerCmd));		// ----		ServerCmd.CmdType = 0;		ServerCmd.X		  = (int)lpObj->X;		ServerCmd.Y		  = (int)lpObj->Y;		// ----		MsgSendV2(lpObj, (unsigned char *)&ServerCmd, sizeof(ServerCmd));		DataSend(lpObj->m_Index, (unsigned char *)&ServerCmd, sizeof(ServerCmd));		// ----		WinnerBuff(lpObj);		// ----		this->g_DuelRooms[iDuelRoom].dwTicketCount = GetTickCount() + 10000;		// ----		Log.ConsoleOutPut(1, c_Blue,t_Duel,"[Duel System] [%s][%s] Has Won Duel, Looser [%s][%s] Room [%d]",								lpObj->AccountID, lpObj->Name, lpTarget->AccountID, lpTarget->Name, iDuelRoom+1);	}}
开发者ID:BlueEyed,项目名称:GreatDevelop-Julia-Project,代码行数:57,


示例6: Error

// -----------------------------------------------------------------------------------------------------------------------void CIllusionTemple::NpcRegister(OBJECTSTRUCT* lpObj, PMSG_IT_REGISTER* pMsg){	if(lpObj->m_IfState.use > 0)	{		CLog.LogAdd("[IllusionTemple] Interface State Error (%d)(%d)(%s)", lpObj->m_IfState.use, lpObj->m_IfState.type, lpObj->Name); 		return;	}	if(lpObj->pInventory[pMsg->TicketPosition].m_Type != ITEMGET(13, 51) || 		lpObj->pInventory[pMsg->TicketPosition].m_Level != pMsg->TargetTemple )	{		GCServerMsgStringSend("You missed Illusion Temple Ticket.", lpObj->m_Index, 1);		return;	}	pMsg->TargetTemple--;	if(IT_FLOOR_RANGE(pMsg->TargetTemple) == FALSE)	{		CLog.LogAdd("[IllusionTemple] Index out of range (%d)(%s)", pMsg->TargetTemple, &lpObj->Name[0]);		return;	}	if(this->m_IllusionTemple[pMsg->TargetTemple].m_iUserCount >= 10)	{		GCServerMsgStringSend("[IllusionTemple] Event is already Full!", lpObj->m_Index, 1);		return;	}	ILLUSION_OBJ obj;	obj.m_Index = lpObj->m_Index;	obj.m_TeamIndex = -1;	obj.m_BonusCount = 0;	obj.m_TempleIndex = pMsg->TargetTemple;	gObjInventoryDeleteItem(lpObj->m_Index, pMsg->TicketPosition);	GCInventoryItemDeleteSend(lpObj->m_Index, pMsg->TicketPosition, 1);	if ( lpObj->PartyNumber >= 0 )	{		PMSG_PARTYDELUSER pMsg;		int iPartyIndex = gParty.GetIndex(lpObj->PartyNumber, lpObj->m_Index, lpObj->DBNumber);		if ( iPartyIndex >= 0 )		{			pMsg.Number = iPartyIndex;			CGPartyDelUser(&pMsg, lpObj->m_Index);		}	}	lpObj->m_IllusionIndex = pMsg->TargetTemple;	gObjSetIllusionKillCount(lpObj->m_Index, KILLCOUNT_RESET, 0);	gObjMoveGate(lpObj->m_Index, 142 + pMsg->TargetTemple);}
开发者ID:ElBedeawi,项目名称:mu-server-ex,代码行数:55,


示例7: GCServerMsgStringSend

//Post Global Messages : "/post"void cChat::ChatGlobal(DWORD aIndex,char* msg){	char* Name;	Name = (char*)gObj_GetChar(aIndex,gObjNick);	GOBJSTRUCT *gObj = (GOBJSTRUCT*)OBJECT_POINTER(aIndex);	if(Config.IsPost==0)	{		GCServerMsgStringSend(MSG01,aIndex,1);		return;	}	else if(!strcmpi("/post ",msg))	{		GCServerMsgStringSend(MSG02,aIndex,1);		Log.outError("[POST] [%s]: [%s] syntax error /n",gObj->AccountID,Name);		return;	}	else if(strlen(msg)<1)	{		GCServerMsgStringSend(MSG03,aIndex,1);		Log.outError("[POST] [%s]: [%s] syntax error /n",gObj->AccountID,Name);		return;	}	else if((int)gObj_GetLevel(aIndex)<Config.PostLevel)	{		char levelmsg[120];		sprintf_s(levelmsg,MSG04,Config.PostLevel);		GCServerMsgStringSend(levelmsg,aIndex,1);		Log.outError("[POST] [%s]: [%s] not enought Level /n",gObj->AccountID,Name);		return;	}		else if(gObj->Money < Config.PostCost)	{		char OutputZenLack[120]={0};		sprintf(OutputZenLack,MSG05,Config.PostCost);		GCServerMsgStringSend(OutputZenLack,aIndex,1);		Log.outError("[POST] [%s]: [%s] not enought Zend /n",gObj->AccountID,Name);		return;	}		char Buff[255]={0};	gObj->Money = gObj->Money - Config.PostCost;	GCMoneySend(aIndex,gObj->Money);	ServerMsgSend(0,1,Name,MSG06,msg);	Log.outNormal("[POST] %s : %s /n",Name,msg);	conLog.ConsoleOutputDT("[POST] %s : %s",Name,msg);	sprintf(Buff,"[POST]: %s : %s",Name,msg);	cWriteLog(Buff);}
开发者ID:brunohkbx,项目名称:pendmu-server,代码行数:55,


示例8: GCServerMsgStringSend

void CHacktoolBlockEx::OnRequestUserHacktoolUseInfo(LPOBJ lpObj, DWORD dwHacktoolIndex, BYTE btResult){	HACKTOOL_DATA * lpHacktoolData;	// ----	for( int i = 0; i < HACKTOOL_DATA_SIZE; i++ )	{		if(	lpObj->m_HacktoolUseInfo[i].btCheckType	== 1 			&&	lpObj->m_HacktoolUseInfo[i].wHacktoolIndex == dwHacktoolIndex )		{			if( btResult == 1 )			{				lpObj->m_HacktoolUseInfo[i].btUseType = 2;				// ----				if( this->SetHacktoolUseDisadvantage(lpObj, 2) )				{					GCServerMsgStringSend(lMsg.Get(3461), lpObj->m_Index, 1);					CloseClient(lpObj->m_Index);				}				else if( this->SetHacktoolUseDisadvantage(lpObj, 4) )				{					GCServerMsgStringSend(lMsg.Get(3462), lpObj->m_Index, 1);					this->SetUseForceMove2Town(lpObj);				}				else if( !this->SetHacktoolUseDisadvantage(lpObj, 8) && !this->SetHacktoolUseDisadvantage(lpObj, 16) )				{					if( this->SetHacktoolUseDisadvantage(lpObj, 32) )	//GM event?					{						GCServerMsgStringSend(lMsg.Get(3460), lpObj->m_Index, 1);						gObjAddBuffEffect(lpObj, 120, 0, 0, 0, 0, g_iHacktoolUsePenaltyDuration);					}					else if( this->SetHacktoolUseDisadvantage(lpObj, 1) )					{						GCServerMsgStringSend(lMsg.Get(3463), lpObj->m_Index, 1);					}				}				// ----				lpHacktoolData = this->SearchHacktoolData(dwHacktoolIndex);				// ----				if( lpHacktoolData )				{					LogAddTD("[HackBlockEx][SetHackUseInfo] Use Hacktool User Id : %s(%d), Name : %s,  Hacktool Name : %s, Index : %d, BlockType : %d",						lpObj->AccountID, lpObj->DBNumber, lpObj->Name,						lpHacktoolData->chFilename, dwHacktoolIndex, lpHacktoolData->btHackBlockType);				}			}			else			{				lpObj->m_HacktoolUseInfo[i].btUseType = 1;				lpHacktoolData = this->SearchHacktoolData(dwHacktoolIndex);			}			break;		}	}}
开发者ID:331515194,项目名称:zTeamS6.3,代码行数:54,


示例9: switch

void PremiumSystem::BuyPremium(int UserIndex, int Days){	bool Result = false;	// ----	for( int i = 0; i < this->m_Price.size(); i++ )	{		if( m_Price[i].Days != Days )		{			continue;		}		// ----		switch(m_Price[i].PayType)		{		case 0:			if( gObj[UserIndex].GameShop.WCoinC < m_Price[i].PayAmount )			{				GCServerMsgStringSend("You do not have enough WCoinC", UserIndex, 1);				return;			}			gObj[UserIndex].GameShop.WCoinC -= m_Price[i].PayAmount;			Result = true;			break;		case 1:			if( gObj[UserIndex].GameShop.WCoinP < m_Price[i].PayAmount )			{				GCServerMsgStringSend("You do not have enough WCoinP", UserIndex, 1);				return;			}			gObj[UserIndex].GameShop.WCoinP -= m_Price[i].PayAmount;			Result = true;			break;		case 2:			if( gObj[UserIndex].GameShop.GoblinPoint < m_Price[i].PayAmount )			{				GCServerMsgStringSend("You do not have enough WCoinG", UserIndex, 1);				return;			}			gObj[UserIndex].GameShop.GoblinPoint -= m_Price[i].PayAmount;			Result = true;			break;		}	}	// ----	if( !Result )	{		GCServerMsgStringSend("Wrong premium period", UserIndex, 1);		return;	}	// ----	//Request to database	// ----	gGameShop.GDSavePoint(UserIndex);}
开发者ID:331515194,项目名称:zTeamS6.3,代码行数:53,


示例10: LogAddTD

bool OfflineTrade::CheckExchange(LPOBJ lpUser, LPOBJ lpTargetUser, int ItemPos){	if(!strcmp(lpUser->m_szPShopText,WCOIN_SHOP))	{		if ( lpTargetUser->GameShop.WCoinP < lpUser->Inventory1[ItemPos].m_iPShopValue )		{			LogAddTD("[PShop] [%s][%s] PShop Item Buy Request Failed : [%s][%s] Lack of Wcoin",				lpTargetUser->AccountID, lpTargetUser->Name, lpUser->AccountID, lpUser->Name);			GCServerMsgStringSend("Need more WCoin to buy", lpUser->m_Index, 1);			return false;		}	}	else if(!strcmp(lpUser->m_szPShopText,SOUL_SHOP))	//Soul check	{		if ( this->GetSoulCount(lpTargetUser->m_Index) < lpUser->Inventory1[ItemPos].m_iPShopValue )		{			LogAddTD("[PShop] [%s][%s] PShop Item Buy Request Failed : [%s][%s] Lack of Soul",				lpTargetUser->AccountID, lpTargetUser->Name, lpUser->AccountID, lpUser->Name);			GCServerMsgStringSend("Need more Soul to buy", lpTargetUser->m_Index, 1);			return false;		}		else if( this->EmptyPointInventory(lpUser, lpUser->Inventory1[ItemPos].m_iPShopValue) )		{			LogAddTD("[PShop] [%s][%s] PShop Item Buy Request Failed : [%s][%s] Empty Invintory",				lpTargetUser->AccountID, lpTargetUser->Name, lpUser->AccountID, lpUser->Name);			GCServerMsgStringSend("Need more Empty Inventory", lpTargetUser->m_Index, 1);			return false;		}	}	else	{		if ( lpTargetUser->Money < lpUser->Inventory1[ItemPos].m_iPShopValue )		{			LogAddTD("[PShop] [%s][%s] PShop Item Buy Request Failed : [%s][%s] Lack of Zen",				lpTargetUser->AccountID, lpTargetUser->Name, lpUser->AccountID, lpUser->Name);			::CGPShopAnsBuyItem(lpTargetUser->m_Index, lpUser->m_Index, 0, 7);			return false;		}		if ( gObjCheckMaxZen(lpUser->m_Index, lpUser->Inventory1[ItemPos].m_iPShopValue) == FALSE )		{			LogAddTD("[PShop] [%s][%s] PShop Item Buy Request Failed : [%s][%s] Exceeding Zen of the Host",				lpTargetUser->AccountID, lpTargetUser->Name, lpUser->AccountID, lpUser->Name);			::CGPShopAnsBuyItem(lpTargetUser->m_Index, lpUser->m_Index, 0, 8);			return false;		}	} 	return true;}
开发者ID:EderRS,项目名称:muOnline-season6,代码行数:50,


示例11: wsprintf

void cVipSystem::State(LPOBJ lpObj){	char Tmp[512]={0};	if (lpObj->VipDays >= 1)	{		wsprintf(Tmp,lMsg.Get(MSGGET(14, 57)),lpObj->VipDays,lpObj->VipMoney);		GCServerMsgStringSend(Tmp,lpObj->m_Index, 0x00);	} else {		if (lpObj->VipMoney > 0)		{			wsprintf(Tmp,lMsg.Get(MSGGET(14, 153)),lpObj->VipMoney);			GCServerMsgStringSend(Tmp,lpObj->m_Index, 0x00);		}	}}
开发者ID:ADMTec,项目名称:GameServer,代码行数:15,


示例12: PHeadSetB

void cVipSystem::BuyItem(LPOBJ lpObj, int IDNumber){	if(IDNumber >= 0 && IDNumber <= (this->ItemsCount-1))	{		BOOL IfBuy = FALSE;			PMSG_BUYRESULT pResult;		PHeadSetB((LPBYTE)&pResult, 0x32, sizeof(pResult));		if(this->Shop[IDNumber].Cost < lpObj->VipMoney)		{			pResult.Result = gObjShopBuyInventoryInsertItem(lpObj->m_Index,this->m_item[IDNumber]);							if ( pResult.Result != 0xFF )			{				lpObj->AccountExtraInfoModified = 1;				ItemByteConvert((LPBYTE)&pResult.ItemInfo, this->m_item[IDNumber]);				DataSend(lpObj->m_Index, (LPBYTE)&pResult, pResult.h.size);				lpObj->VipMoney -= this->Shop[IDNumber].Cost;				IfBuy = TRUE;			}else			{								GCServerMsgStringSend(lMsg.Get(MSGGET(14, 58)),lpObj->m_Index, 0x01);			}		}		//Log		if(IfBuy == TRUE)		{			LogAddTD("[VIPShop] BuyItem [%s][%s] Item {%d %d} Cost: %d",lpObj->AccountID,lpObj->Name,this->Shop[IDNumber].Type,this->Shop[IDNumber].Index,this->Shop[IDNumber].Cost);		} else 		{			LogAddTD("[VIPShop] Attempt to BuyItem [%s][%s] Item {%d %d} Cost: %d",lpObj->AccountID,lpObj->Name,this->Shop[IDNumber].Type,this->Shop[IDNumber].Index,this->Shop[IDNumber].Cost);		}	}}
开发者ID:ADMTec,项目名称:GameServer,代码行数:35,


示例13: JGOtherJoin

void JGOtherJoin(SDHP_OTHERJOINMSG * lpMsg){	char szId[11];	szId[10]=0;	int n;	memcpy(szId, lpMsg->AccountID, sizeof(lpMsg->AccountID));	for (n= OBJ_STARTUSERINDEX; n<OBJMAX;n++)	{		if ( gObj[n].Connected >= PLAYER_LOGGED )		{			if ( gObj[n].AccountID[0] == szId[0] )			{				if ( gObj[n].AccountID[1] == szId[1] )				{					if ( strcmp(gObj[n].AccountID , szId) == 0 )					{						GCServerMsgStringSend(lMsg.Get( MSGGET(4, 107)), n, 1 );						break;					}				}			}		}	}}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:26,


示例14: NpcGuildMasterTalk

BOOL NpcGuildMasterTalk(LPOBJ lpNpc, LPOBJ lpObj){	if ( gGuildCreate == FALSE )	{		ChatTargetSend(lpNpc, "Creation of the guild is DISABLED!", lpObj->m_Index);		return TRUE;	}	if ( lpObj->GuildNumber > 0 )	{		ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 116)), lpObj->m_Index);		return TRUE;	}	int capacity = gObjGuildMasterCapacityTest(lpObj);	if ( capacity == 0 )	{		ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 117)), lpObj->m_Index);	}	else if ( capacity == 2 )	{		char buf[100]={0};		wsprintf(buf,"You need at least %d resets",ReadConfig.ResetReq_NpcGuildMasterTalk);		ChatTargetSend(lpNpc, buf, lpObj->m_Index);		GCServerMsgStringSend(buf,lpObj->m_Index, 0x01);	}	else	{		GCGuildMasterQuestionSend(lpObj->m_Index);	}	return TRUE;}
开发者ID:ADMTec,项目名称:GameServer,代码行数:34,


示例15: JGOtherJoin

void JGOtherJoin(SDHP_OTHERJOINMSG * lpMsg){    char szId[11];    szId[10]=0;    int n;    memcpy(szId, lpMsg->AccountID, sizeof(lpMsg->AccountID));    for (n= OBJ_STARTUSERINDEX; n<OBJMAX; n++)    {        if ( gObj[n].Connected >= PLAYER_LOGGED )        {            if ( gObj[n].AccountID[0] == szId[0] )            {                if ( gObj[n].AccountID[1] == szId[1] )                {                    if ( strcmp(gObj[n].AccountID , szId) == 0 )                    {                        GCServerMsgStringSend("Warning! Another user is trying to connect using this account.", n, 1 );                        break;                    }                }            }        }    }}
开发者ID:gustavobm,项目名称:p4f-free-emu,代码行数:26,


示例16: LoveHeartEventRecv

void LoveHeartEventRecv( SDHP_LOVEHEARTEVENT_RESULT * lpMsg ){	char szName[11];	int number;	char Msg[256];	szName[10]=0;	memcpy(szName, lpMsg->Name, sizeof(lpMsg->Name));	number = lpMsg->Number;	switch ( lpMsg->Result )	{		case 0: // Registered Hearts of Love PangPangEvent			{				wsprintf(Msg, lMsg.Get( MSGGET(4, 80)), number );				for (int n = OBJ_STARTUSERINDEX;n<OBJMAX;n++)				{					if ( gObj[n].Connected >= PLAYER_LOGGED )					{						if (gObj[n].Name[0] == szName[0] )						{							if ( gObj[n].Name[1] == szName[1] )							{								if ( strcmp( gObj[n].Name, szName ) == 0 )								{									GCServerMsgStringSend(Msg, n, 1);									wsprintf(Msg, lMsg.Get( MSGGET( 4, 81 ) ) );									GCServerMsgStringSend(Msg, n, 1);									return;								}							}						}					}					continue;				} // For			}		break;		case 1: // Winner of the Love Pang Pang Event			wsprintf(Msg, lMsg.Get( MSGGET ( 4, 82 ) ), szName, number);			AllSendServerMsg(Msg);			break;	}}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:46,


示例17: LoveHeartEventRecv

void LoveHeartEventRecv( SDHP_LOVEHEARTEVENT_RESULT * lpMsg ){    char szName[11];    int number;    char Msg[256];    szName[10]=0;    memcpy(szName, lpMsg->Name, sizeof(lpMsg->Name));    number = lpMsg->Number;    switch ( lpMsg->Result )    {    case 0: // Registered Hearts of Love PangPangEvent    {        wsprintf(Msg, "You have registered No.%d heart item(s)", number );        for (int n = OBJ_STARTUSERINDEX; n<OBJMAX; n++)        {            if ( gObj[n].Connected >= PLAYER_LOGGED )            {                if (gObj[n].Name[0] == szName[0] )                {                    if ( gObj[n].Name[1] == szName[1] )                    {                        if ( strcmp( gObj[n].Name, szName ) == 0 )                        {                            GCServerMsgStringSend(Msg, n, 1);                            strcpy(Msg,"Sorry, better luck next time.");                            GCServerMsgStringSend(Msg, n, 1);                            return;                        }                    }                }            }            continue;        } // For    }    break;    case 1: // Winner of the Love Pang Pang Event        wsprintf(Msg, "%s is the lucky winner of the Love Pang Pang event.", szName);        AllSendServerMsg(Msg);        break;    }}
开发者ID:gustavobm,项目名称:p4f-free-emu,代码行数:46,


示例18: GCServerMsgStringSend

bool GameShop::CanBeBuy(int aIndex, short ItemID){	LPOBJ lpUser = &gObj[aIndex];	// ----	if( GetItemCountInStorage(aIndex, 0x53) >= MAX_STORAGE_ITEM - 1 )	{		GCServerMsgStringSend("Your GameShop inventory is full", aIndex, 1);		return false;	}	// ----	if( ItemID == ITEMGET(13, 93) || ItemID == ITEMGET(13, 94) || ItemID == ITEMGET(14, 114) )	{		if( !lpUser->ThirdChangeUp )		{			GCServerMsgStringSend("You need 3rd class to buy master items", aIndex, 1);			return false;		}	}	else if( ItemID == ITEMGET(13, 138) || ItemID == ITEMGET(13, 143) )	{		if( lpUser->Class == CLASS_MONK )		{			GCServerMsgStringSend("This ticket not have items for you", aIndex, 1);			return false;		}	}	else if( ItemID == ITEMGET(14, 162) )	{		if( lpUser->ExpandedInventory >= 2 )		{			GCServerMsgStringSend("Your inventory expanded to maximum", aIndex, 1);			return false;		}	}	else if( ItemID == ITEMGET(14, 163) )	{		if( lpUser->ExpandedWarehouse >= 1 )		{			GCServerMsgStringSend("Your warehouse expanded to maximum", aIndex, 1);			return false;		}	}	// ----	return true;}
开发者ID:EderRS,项目名称:muOnline-season6,代码行数:45,


示例19: map

void cLuckyPenny::Exchange(int aIndex,BYTE Count){	if(OBJMAX_RANGE(aIndex) == 0)	{		return;	}	if(this->Enabled == TRUE)	{		if ( gObj[aIndex].m_IfState.type != 97 )		{			ANTI_HACK_LOG.Output("[ANTI-HACK][Coins][Exchange] User in map(%d) [%s][%s] State(u:%d,t:%d,s:%d)",				gObj[aIndex].MapNumber, gObj[aIndex].AccountID, gObj[aIndex].Name,				gObj[aIndex].m_IfState.use,gObj[aIndex].m_IfState.type,gObj[aIndex].m_IfState.state);			return;		}		if(Count != 10 && Count != 20 && Count != 30)			return;		int pos = gObjCheckItemPosByDur(aIndex,ITEMGET(14,100),Count);		if(pos >= 0)		{			if ( ReadConfig.MAIN_INVENTORY_RANGE(aIndex,pos,false) != FALSE )			{				if(this->GetReward(aIndex,Count) == true)				{					gObj[aIndex].pInventory[pos].m_Durability -= Count;									if(gObj[aIndex].pInventory[pos].m_Durability <= 0)					{						gObjInventoryItemSet(aIndex, pos, -1);						gObj[aIndex].pInventory[pos].Clear();						GCInventoryItemDeleteSend(aIndex, pos, 1);					}else					{						GCItemDurSend(aIndex, pos, gObj[aIndex].pInventory[pos].m_Durability, 0);					}					LogAddTD("[LuckyPenny] [%s][%s][%d] LuckyPenny Item Buy Exchange Success",						gObj[aIndex].AccountID, gObj[aIndex].Name,Count);				}else				{					LogAddTD("[LuckyPenny] [%s][%s] LuckyPenny Item Buy Exchange Failed : No Room to Get Item",						gObj[aIndex].AccountID, gObj[aIndex].Name);					GCServerMsgStringSend("No Room in Inventory to Get Item!!",aIndex, 1);				}			}		}else		{			char LackPacket[5] = {0xC1,0x05,0xBF,0x0C,0x00};			DataSend(aIndex ,(UCHAR*)LackPacket, sizeof(LackPacket));		}	}}
开发者ID:ADMTec,项目名称:GameServer,代码行数:56,


示例20: GCServerMsgStringSend

void CGMMng::ManagerSendData(LPSTR szMsg, int size){	for ( int n=0;n<MAX_GAME_MASTER;n++ )	{		if ( this->ManagerIndex[n] != -1 )		{			GCServerMsgStringSend(szMsg, this->ManagerIndex[n], 0);		}	}}
开发者ID:constantinbogdan,项目名称:node3d,代码行数:10,


示例21: wsprintf

void CDevilSquare::DieProcDevilSquare(LPOBJ lpObj){	char msg[255];	wsprintf(msg, "Failed. Your score is %d. Try again next time.", lpObj->m_nEventScore);	GCServerMsgStringSend(msg, lpObj->m_Index, 1);	if ( lpObj->m_nEventScore <= 0 )		return;	PMSG_ANS_EVENTUSERSCORE pMsg;	pMsg.h.c = 0xC1;	pMsg.h.headcode = 0x01;	pMsg.h.size = sizeof(pMsg);	pMsg.SquareNum = lpObj->m_bDevilSquareIndex;	pMsg.Class = lpObj->Class;	pMsg.h.subcode = 0x01;	if ( lpObj->Class == 1 )	{		if ( lpObj->Class >= 0 && lpObj->Class < MAX_TYPE_PLAYER )		{			if ( DS_LEVEL_RANGE(lpObj->m_bDevilSquareIndex) != FALSE )			{				lpObj->m_nEventScore+= this->m_BonusScoreTable[lpObj->Class][lpObj->m_bDevilSquareIndex]/100;							}		}		pMsg.Score = lpObj->m_nEventScore;	}	else	{		pMsg.Score = lpObj->m_nEventScore;	}	pMsg.ServerCode = gGameServerCode;	memcpy(pMsg.AccountID, lpObj->AccountID, sizeof(pMsg.AccountID));	memcpy(pMsg.GameID, lpObj->Name, sizeof(pMsg.GameID));	DataSendRank((char *)&pMsg, pMsg.h.size);	LogAdd("[DevilSquare] Dead [%s][%s][%d][%d]",		lpObj->AccountID, lpObj->Name, 		lpObj->m_nEventExp, lpObj->m_nEventScore);	lpObj->m_nEventScore = 0;	lpObj->m_nEventMoney = 0;	lpObj->m_nEventExp = 0;}
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:52,


示例22: va_start

void CPlayer::SendTextMsg(int Type,char * Text, ...){	char szBuffer[1024];	char Nickn[11];	va_list pArguments;	va_start(pArguments,Text);	vsprintf(szBuffer,Text,pArguments);	va_end(pArguments);	GCServerMsgStringSend(szBuffer,this->aIndex,Type);	this->GetName(Nickn);	Console.Write("[SendTextMsg][Index: %d][Nick: %s] %s",this->aIndex,Nickn,szBuffer);}
开发者ID:ElBedeawi,项目名称:open-mu-online-server,代码行数:13,


示例23: GCServerMsgStringSend

// -----------------------------------------------------------------------------------------------------------------------------------------bool CSkillTree::IsMasterMagicExist(LPOBJ lpObj,int SkillNumber){	for(int n = 0; n < MAGIC_SIZE; n++)	{		if(lpObj->Magic[n].IsMagic() == true)		{			if(lpObj->Magic[n].m_Skill == SkillNumber)			{				GCServerMsgStringSend("[MasterSkillTree]: Same Magic already exists",lpObj->m_Index,1);				return false;			}		}	}	return true;}
开发者ID:ElBedeawi,项目名称:mu-server-ex,代码行数:16,


示例24: NpcChaosCardMaster

BOOL NpcChaosCardMaster(LPOBJ lpNpc, LPOBJ lpObj){//#if (CRYSTAL_EDITION == 1)	//	if(lpNpc->MapNumber == MAP_INDEX_ELBELAND)//	{//		SVShop.WindowState(lpObj->m_Index,1);//		return TRUE;//	}//#endif	if ( g_bUseLotterySystem == FALSE )		return FALSE;	if ( bCanChaosBox == TRUE )	{		if ( lpObj->m_IfState.use > 0 )			return FALSE;		if ( lpObj->m_bPShopOpen == true )		{			LogAdd("[%s][%s] is Already Opening PShop, ChaosBox Failed",				lpObj->AccountID, lpObj->Name);			GCServerMsgStringSend(lMsg.Get(MSGGET(4,194)), lpObj->m_Index, 1);			return TRUE;		}		PMSG_TALKRESULT pMsg;		pMsg.h.c = 0xC3;		pMsg.h.headcode = 0x30;		pMsg.h.size = sizeof(pMsg);		pMsg.result = 0x15;		DataSend(lpObj->m_Index, (LPBYTE)&pMsg, pMsg.h.size);		lpObj->m_IfState.use = 1;		lpObj->m_IfState.type = 7;		LogAddTD("[ChaosCard] [%s][%s] ChaosCard Mix Dealer Start",			lpObj->AccountID, lpObj->Name);		gObjItemTextSave(lpObj);		gObjWarehouseTextSave(lpObj);	}	return TRUE;}
开发者ID:ADMTec,项目名称:GameServer,代码行数:48,


示例25: NpcRusipher

BOOL NpcRusipher(LPOBJ lpNpc, LPOBJ lpObj){	if ( gDevilSquareEvent == FALSE )	{		return TRUE;	}	int aIndex = lpObj->m_Index;#ifdef BEREZNUK	if ( lpObj->m_PK_Level >= 4 && !g_AllowPKEventDS )	{		GCServerMsgStringSend(lMsg.Get(MSGGET(13,72)),lpObj->m_Index,1);		return TRUE;	}#endif	if ( (lpObj->m_IfState.use ) > 0 )	{		return TRUE;	}	if ( gUserFindDevilSquareInvitation(aIndex) == FALSE )	{		GCServerCmd(lpObj->m_Index, 1, 2 ,0);	}	else if (g_DevilSquare.GetState() == 1 )	{		PMSG_TALKRESULT pMsg;		pMsg.h.c = 0xC3;		pMsg.h.headcode = 0x30;		pMsg.h.size = sizeof(pMsg);		pMsg.result = 0x04;		DataSend(aIndex, (LPBYTE)&pMsg, pMsg.h.size);		lpObj->m_IfState.use = 1;		lpObj->m_IfState.type = 12;	}	else	{		GCServerCmd(lpObj->m_Index, 1, 3, 0);	}	return TRUE;}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:48,


示例26: NpcAdniel

BOOL NpcAdniel(LPOBJ lpNpc,LPOBJ lpObj ){	if ( bCanChaosBox == TRUE )	{		PMSG_TALKRESULT pMsg;		pMsg.h.c = 0xC3;		pMsg.h.headcode = 0x30;		pMsg.h.size = sizeof(pMsg);				if ( lpObj->m_bPShopOpen == true )		{			LogAdd("[%s][%s] is Already Opening PShop, ChaosBox Failed",				lpObj->AccountID, lpObj->Name);			GCServerMsgStringSend(lMsg.Get(MSGGET(4, 194)), lpObj->m_Index, 1);			return TRUE;		}		lpObj->m_IfState.type = 7;		lpObj->m_IfState.state = 0;		lpObj->m_IfState.use = 1;				// 39 - entering acheron		// 40 - arca war npc		// 41 - mix npc		pMsg.result = 41;		lpObj->bIsChaosMixCompleted = false;		pMsg.level1 = gDQChaosSuccessRateLevel1;		pMsg.level2 = gDQChaosSuccessRateLevel2;		pMsg.level3 = gDQChaosSuccessRateLevel3;		pMsg.level4 = gDQChaosSuccessRateLevel4;		pMsg.level5 = gDQChaosSuccessRateLevel5;		pMsg.level6 = gDQChaosSuccessRateLevel6;		DataSend(lpObj->m_Index, (LPBYTE)&pMsg, pMsg.h.size);		GCAnsCsMapSvrTaxInfo(lpObj->m_Index, 1, g_CastleSiegeSync.GetTaxRateChaos(lpObj->m_Index));		gObjInventoryTrans(lpObj->m_Index);		LogAddTD("[%s][%s] Open Chaos Box", lpObj->AccountID, lpObj->Name);		gObjItemTextSave(lpObj);		gObjWarehouseTextSave(lpObj);	}	return true;}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:47,


示例27: GJPUserDisconnectRecv

void GJPUserDisconnectRecv( SDHP_BILLKILLUSER * lpMsg){    char szId[11];    szId[10]=0;    int number;    memcpy( szId, lpMsg->Id , sizeof( lpMsg->Id ) );    number = lpMsg->Number;    if ( gObjIsAccontConnect(number, szId ) == 0 )    {        return;    }    GCServerMsgStringSend("You are currently being disconnected. Please check your account credits.", number, 0 );    gObjUserKill(number);}
开发者ID:gustavobm,项目名称:p4f-free-emu,代码行数:17,


示例28: GJPUserKillRecv

void GJPUserKillRecv(SDHP_BILLKILLUSER * lpMsg){    char szId[11];    int number;    szId[10] = 0;    memcpy(szId, lpMsg->Id , sizeof(lpMsg->Id) );    number = lpMsg->Number;    if (gObjIsAccontConnect(number, szId) == 0 )    {        return;    }    GCServerMsgStringSend("Your account is expired. You will exit the game automatically.", number, 0);    gObjUserKill(number);}
开发者ID:gustavobm,项目名称:p4f-free-emu,代码行数:17,


示例29: GJPUserDisconnectRecv

void GJPUserDisconnectRecv( SDHP_BILLKILLUSER * lpMsg){	char szId[11];	szId[10]=0;	int number;	memcpy( szId, lpMsg->Id , sizeof( lpMsg->Id ) );	number = lpMsg->Number;	if ( gObjIsAccontConnect(number, szId ) == 0 )	{		return;	}	GCServerMsgStringSend(lMsg.Get( MSGGET(6, 67) ), number, 0 );	//gObjUserKill(number);	CloseClient(number);}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:18,



注:本文中的GCServerMsgStringSend函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GC_INIT函数代码示例
C++ GCN_EXCEPTION函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。