本文整理汇总了C++中GCServerMsgStringSend函数的典型用法代码示例。如果您正苦于以下问题:C++ GCServerMsgStringSend函数的具体用法?C++ GCServerMsgStringSend怎么用?C++ GCServerMsgStringSend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GCServerMsgStringSend函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:ShopPointEx.cpp
示例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,代码来源:PCPoints.cpp
示例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,代码来源:DuelManager.cpp
示例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,代码来源:VipSystem.cpp
示例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,代码来源:DuelManager.cpp
示例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,代码来源:IllusionTemple.cpp
示例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,代码来源:ChatCore.cpp
示例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,代码来源:HacktoolBlockEx.cpp
示例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,代码来源:PremiumSystem.cpp
示例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,代码来源:OfflineTrade.cpp
示例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,代码来源:VIPSystem.cpp
示例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,代码来源:VIPSystem.cpp
示例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,代码来源:SProtocol.cpp
示例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,代码来源:NpcTalk.cpp
示例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,代码来源:SProtocol.cpp
示例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,代码来源:SProtocol.cpp
示例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,代码来源:SProtocol.cpp
示例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,代码来源:GameShop.cpp
示例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,代码来源:ObjLuckyPenny.cpp
示例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,代码来源:GMMng.cpp
注:本文中的GCServerMsgStringSend函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论