本文整理汇总了C++中MSGGET函数的典型用法代码示例。如果您正苦于以下问题:C++ MSGGET函数的具体用法?C++ MSGGET怎么用?C++ MSGGET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MSGGET函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MsgBox
void CAcceptIp::Load(LPSTR filename)
{
int count=0;
int Token;
SMDFile=fopen(filename, "r");
if (SMDFile == NULL)
{
MsgBox(lMsg.Get(MSGGET(0, 112)), filename);
return;
}
while ( true )
{
Token=GetToken();
if (Token == END)
{
break;
}
if ( Token == NAME )
{
strcpy(this->szIp[count] , TokenString);
this->UseIp[count] = true;
count++;
}
}
fclose(SMDFile);
LogAdd(lMsg.Get(MSGGET(1, 164)), count);
}
示例2: NpcFasi
BOOL NpcFasi(LPOBJ lpNpc, LPOBJ lpObj)
{
if ( gDevilSquareEvent != FALSE )
{
GCServerCmd(lpObj->m_Index, 1, 6, 0);
}
if ( lpObj->m_PK_Level > 4 )
{
if ( PvP.gPkLimitFree == FALSE )
{
int numbertext = rand() % 3;
switch ( numbertext )
{
case 0:
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 98)), lpObj->m_Index);
break;
case 1:
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 99)), lpObj->m_Index);
break;
case 2:
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 100)), lpObj->m_Index);
break;
}
lpNpc->TargetNumber = -1; // Apply Deathway Fix, change 0 to -1;
return TRUE;
}
}
return FALSE;
}
示例3: PHeadSubSetB
void CCrywolf::NotifyCrywolfPersonalRank()
{
PMSG_ANS_CRYWOLF_PERSONAL_RANK pMsg;
PHeadSubSetB((LPBYTE)&pMsg, 0xBD, 0x07, sizeof(pMsg));
pMsg.btRank = 0;
for ( int i=OBJ_STARTUSERINDEX;i<OBJMAX;i++)
{
if ( gObj[i].Connected == PLAYER_PLAYING &&
gObj[i].Type == OBJ_USER &&
gObj[i].MapNumber == MAP_INDEX_CRYWOLF_FIRSTZONE)
{
pMsg.btRank = this->CalcGettingRank(i);
pMsg.iGettingExp = this->CalcGettingRewardExp(i, pMsg.btRank);
if ( gObj[i].m_wExprienceRate == 0)
pMsg.iGettingExp = 0;
this->GiveRewardExp(i, pMsg.iGettingExp);
MsgOutput(i, lMsg.Get(MSGGET(12, 244)), pMsg.btRank);
MsgOutput(i, lMsg.Get(MSGGET(12, 245)), pMsg.iGettingExp);
LogAddTD("[ Crywolf ][Personal Rank & Exp.] [%s][%s] Score(%d) Rank(%d) Exp(%d)",
gObj[i].AccountID, gObj[i].Name, gObj[i].m_iCrywolfMVPScore, pMsg.btRank, pMsg.iGettingExp);
DataSend(i, (LPBYTE)&pMsg, sizeof(pMsg));
}
}
}
示例4: NpcGuildMasterTalk
BOOL NpcGuildMasterTalk(LPOBJ lpNpc, LPOBJ lpObj)
{
if ( gGuildCreate == FALSE )
{
ChatTargetSend(lpNpc, "서버분할 기간에는 길드를 생성할수가 없습니다", 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 )
{
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 118)), lpObj->m_Index);
}
else
{
GCGuildMasterQuestionSend(lpObj->m_Index);
}
return TRUE;
}
示例5: SendEventStartMsg
void CDevilSquare::SendEventStartMsg()
{
PMSG_NOTICE pToEventer;
PMSG_NOTICE pWithOutEvneter;
TNotice::MakeNoticeMsg(&pToEventer, 0, lMsg.Get(MSGGET(2, 195)));
TNotice::MakeNoticeMsg(&pWithOutEvneter, 0, lMsg.Get(MSGGET(2, 196)));
for ( int n=OBJ_STARTUSERINDEX; n<OBJMAX; n++)
{
if ( gObj[n].Connected == PLAYER_PLAYING )
{
if ( DS_MAP_RANGE(gObj[n].MapNumber) != FALSE )
{
DataSend(n, (BYTE *)&pToEventer, pToEventer.h.size);
}
else
{
DataSend(n, (BYTE *)&pWithOutEvneter, pWithOutEvneter.h.size);
}
}
}
LogAddTD("[DevilSquare] Start Event");
}
示例6: 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;
}
示例7: GCStateInfoSend
void CCrywolfStatue::CrywolfStatueAct(int iIndex)
{
if ( !gObjIsConnected(iIndex))
return;
if ( gObj[iIndex].Type != OBJ_NPC || CHECK_CLASS(204, gObj[iIndex].Class) == FALSE )
return;
LPOBJ lpObj = &gObj[iIndex];
int iContractedAlterCount = g_CrywolfNPC_Altar.GetContractedAltarCount();
int iPriestHPSum = g_CrywolfNPC_Altar.GetPriestHPSum();
int iPriestMaxHPSum = g_CrywolfNPC_Altar.GetPriestMaxHPSum();
if ( iContractedAlterCount == 0 || this->m_Shield.m_iShieldHP == 0 )
{
if ( this->m_Shield.m_iShieldState == 1 )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(13, 5)));
this->m_Shield.m_iShieldState = 0;
this->m_Shield.m_iShieldHP = 0;
this->m_Shield.m_iShieldMaxHP = 0;
this->m_Shield.m_iPriestNumber = iContractedAlterCount;
lpObj->m_ViewSkillState[this->GetStatueViewState(iContractedAlterCount)] = 1;
GCStateInfoSend(lpObj, 1, this->GetStatueViewState(iContractedAlterCount));
}
else if ( this->m_Shield.m_iPriestNumber != iContractedAlterCount )
{
this->m_Shield.m_iShieldState = 1;
this->m_Shield.m_iShieldHP = iPriestHPSum;
this->m_Shield.m_iShieldMaxHP = iPriestMaxHPSum;
this->m_Shield.m_iPriestNumber = iContractedAlterCount;
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(13, 6)), iContractedAlterCount, iPriestHPSum);
lpObj->m_ViewSkillState[this->GetStatueViewState(iContractedAlterCount)] = 1;
GCStateInfoSend(lpObj, 1, this->GetStatueViewState(iContractedAlterCount));
}
return;
}
else if ( this->m_Shield.m_iShieldState == 0 )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(13, 7)));
lpObj->m_ViewSkillState[this->GetStatueViewState(iContractedAlterCount)] = 1;
GCStateInfoSend(lpObj, 1, this->GetStatueViewState(iContractedAlterCount));
}
else if ( this->m_Shield.m_iPriestNumber != iContractedAlterCount )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(13, 6)), iContractedAlterCount, iPriestHPSum);
lpObj->m_ViewSkillState[this->GetStatueViewState(iContractedAlterCount)] = 1;
GCStateInfoSend(lpObj, 1, this->GetStatueViewState(iContractedAlterCount));
}
this->m_Shield.m_iShieldState = 1;
this->m_Shield.m_iShieldHP = iPriestHPSum;
this->m_Shield.m_iShieldMaxHP = iPriestMaxHPSum;
this->m_Shield.m_iPriestNumber = iContractedAlterCount;
}
示例8: NpcFasi
BOOL NpcFasi(LPOBJ lpNpc, LPOBJ lpObj)
{
if ( gLanguage != 0 )
{
if ( gDevilSquareEvent != FALSE )
{
GCServerCmd(lpObj->m_Index, 1, 6, 0);
}
}
if ( lpObj->m_PK_Level > 4 )
{
int hour = 0;
int min = 0;
if ( lpNpc->TargetNumber != lpObj->m_Index )
{
if ( gObjGetPkTime(lpObj, hour, min) == TRUE )
{
char szTemp[100];
wsprintf(szTemp, lMsg.Get(MSGGET(4, 79)), hour, min);
ChatTargetSend(lpNpc, szTemp, lpObj->m_Index);
lpNpc->TargetNumber = lpObj->m_Index;
/*if ( gPkLimitFree == FALSE )
{
return TRUE;
}*/
}
}
else if ( gPkLimitFree == FALSE )
{
int numbertext = rand() % 3;
switch ( numbertext )
{
case 0:
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 98)), lpObj->m_Index);
break;
case 1:
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 99)), lpObj->m_Index);
break;
case 2:
ChatTargetSend(lpNpc, lMsg.Get(MSGGET(4, 100)), lpObj->m_Index);
break;
}
lpNpc->TargetNumber = 0; // Apply Deathway Fix, change 0 to -1;
return TRUE;
}
}
return FALSE;
}
示例9: LogAdd
void DBSockMng::Connect()
{
if (this->wsCDBS[0].GetSocket() == INVALID_SOCKET )
{
int State;
this->wsCDBS[0].CreateSocket(ghWnd);
this->wsCDBS[0].SetProtocolCore(DataServerProtocolCore);
State=this->wsCDBS[0].Connect(DataServerIP, DataServerPort, WM_GM_DATA1_CLIENT_MSG_PROC);
if (State == 0)
{
LogAdd(lMsg.Get(MSGGET(1, 147)), DataServerIP, DataServerPort);
this->wsCDBS[0].Close();
}
else
{
LogAdd(lMsg.Get(MSGGET(1, 146)), DataServerIP, DataServerPort);
this->m_ActiveServer=DS_0;
DataServerLogin(DS_0);
}
}
if (this->wsCDBS[1].GetSocket() == INVALID_SOCKET)
{
int State;
this->wsCDBS[1].CreateSocket(ghWnd);
this->wsCDBS[1].SetProtocolCore(DataServerProtocolCore);
State=this->wsCDBS[1].Connect(DataServerIP2, DataServerPort2, WM_GM_DATA2_CLIENT_MSG_PROC);// Two ports more than the used1
if (State==0)
{
LogAdd(lMsg.Get(MSGGET(1, 147)), DataServerIP2, DataServerPort2);
this->wsCDBS[1].Close();
}
else
{
LogAdd(lMsg.Get(MSGGET(1, 146)), DataServerIP2, DataServerPort2);
if (this->m_ActiveServer==-1)
{
this->m_ActiveServer=DS_1;
}
DataServerLogin(DS_1); // Second DataServer
}
}
if ( wsExDbCli.GetSocket() == INVALID_SOCKET)
{
//LogAddC(2, "ExDB Server Check..");
wsExDbCli.CreateSocket(ghWnd);
ExDataServerConnect(ExDBServerIP, WM_GM_EXDATA_CLIENT_MSG_PROC);
}
else
{
if ( wsExDbCli.GetConnect() == 0 )
{
//LogAddC(2, "ExDB Server Check..");
ExDataServerConnect(ExDBServerIP, WM_GM_EXDATA_CLIENT_MSG_PROC);
}
}
}
示例10: LogAddC
void CCrywolf::SetState_END()
{
this->m_dwCrywolfStartProcTick = 0;
this->m_bChangeAI = FALSE;
LogAddC(4, "[ Crywolf ] State (%d) -> END", this->m_iCrywolfState);
if ( this->m_bTurnUpBoss != FALSE && CHECK_LIMIT(this->m_iBossIndex, OBJ_MAXMONSTER) )
{
if ( gObj[this->m_iBossIndex].Live != FALSE )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 233)));
this->SetOccupationState(1);
}
}
this->m_bTurnUpBoss = FALSE;
this->SetCrywolfBossIndex(-1);
if ( this->GetOccupationState() == 1 )
{
UTIL.SendMapServerGroupMsg(lMsg.Get(MSGGET(12, 234)));
this->SetOccupationState(1);
LogAddTD("[ Crywolf ][MVP] FAIL.......!!");
}
else
{
UTIL.SendMapServerGroupMsg(lMsg.Get(MSGGET(12, 235)));
this->SetOccupationState(0);
LogAddTD("[ Crywolf ][MVP] SUCCESS.......!!");
}
this->SetCrywolfState(CRYWOLF_STATE_END);
this->SetCrywolfStateAppliedTime(CRYWOLF_STATE_END);
this->NotifyCrywolfCurrentState();
this->ChangeAI(0);
for ( int iAltar = 205 ; iAltar <= 209 ; iAltar++)
{
int iUserIndex = g_CrywolfNPC_Altar.GetAltarUserIndex(iAltar);
if ( iUserIndex != -1 )
{
this->CalcGettingScore(iUserIndex, -1, 6);
if ( this->GetOccupationState() != 1 )
{
this->MakeRewardForAltarElf(iUserIndex);
}
}
}
g_CrywolfNPC_Altar.ResetAllAltar();
this->NotifyCrywolfPersonalRank();
}
示例11: LogAddTD
void CCrywolf::ProcState_START()
{
if ( g_CrywolfNPC_Altar.GetContractedAltarCount() == 0 )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 240)));
this->SetOccupationState(1);
this->SetState(CRYWOLF_STATE_END);
return;
}
this->NotifyCrywolfStatueAndAltarInfo();
this->NotifyCrywolfBossMonsterInfo();
this->NotifyCrywolfStateLeftTime();
// VERIFICAR
if ( (int)(GetTickCount() - this->m_dwCrywolfStartProcTick) > (this->m_iBossTurnUpTime * 1000) &&
!this->m_bTurnUpBoss )
{
this->m_bTurnUpBoss = TRUE;
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 241)));
this->TurnUpBoss();
LogAddTD("[ Crywolf ][MVP] Barlgars TurnUp !!!");
}
// VERIFICAR
if ( (int)(GetTickCount() - this->m_dwCrywolfStartProcTick) > (this->m_iMonsterGroupChangeAITime * 1000) &&
!this->m_bChangeAI )
{
this->m_bChangeAI = TRUE;
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 242)));
this->ChangeAI(2);
LogAddTD("[ Crywolf ][MVP] Start Monster Rush !!!");
}
if ( this->m_bTurnUpBoss != FALSE && CHECK_LIMIT(this->m_iBossIndex, OBJ_MAXMONSTER) != FALSE )
{
if ( gObj[this->m_iBossIndex].Live == FALSE )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 243)));
this->SetOccupationState(0);
this->SetState(CRYWOLF_STATE_END);
}
}
}
示例12: gObjIsConnected
void CCrywolf::CrywolfMonsterDieProc(int iMonIndex, int iKillerIndex)
{
LPOBJ lpMonObj = &gObj[iMonIndex];
LPOBJ lpKillerObj = &gObj[iKillerIndex];
BOOL bExistKiller = gObjIsConnected(iKillerIndex);
if ( g_Crywolf.GetCrywolfState() == CRYWOLF_STATE_START )
{
if ( lpMonObj->MapNumber == MAP_INDEX_CRYWOLF_FIRSTZONE )
{
if ( lpMonObj->m_iCurrentAI != 0 )
{
if ( lpMonObj->Class == 349 )
{
if ( bExistKiller )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 247)), lpKillerObj->Name);
LogAddTD("[ Crywolf ][MVP] [Balgars Dead] by [%s][%s]",
lpKillerObj->AccountID, lpKillerObj->Name);
}
else
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 248)));
LogAddTD("[ Crywolf ][MVP] [Balgars Dead] by Unknown User");
}
}
if ( lpMonObj->Class == 340 )
{
if ( bExistKiller )
{
UTIL.SendCrywolfUserAnyMsg(2, lMsg.Get(MSGGET(12, 249)),
lpMonObj->m_iGroupNumber, lpKillerObj->Name);
LogAddTD("[ Crywolf ][MVP] [DarkElf Dead] by [%s][%s]",
lpKillerObj->AccountID, lpKillerObj->Name);
}
}
int iScore = this->CalcGettingScore(iKillerIndex, iMonIndex, 100);
if ( iScore != -1 )
{
MsgOutput(iKillerIndex, lMsg.Get(MSGGET(12, 250)), iScore);
}
}
}
}
}
示例13: 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);
}
}
}
示例14: cSummerEvent__InsideTrigger
void cSummerEvent__InsideTrigger(void * lpParam)
{
SummerEvent.Start = 1;
LogAddTD("[SummerEvent] Event Start");
AllSendServerMsg(lMsg.Get(MSGGET(14, 135)));
SummerEvent.SetMonsters();
Sleep(SummerEvent.Minutes * 60000);
SummerEvent.ClearMonsters();
LogAddTD("[SummerEvent] Event End");
AllSendServerMsg(lMsg.Get(MSGGET(14, 136)));
SummerEvent.Start = 0;
_endthread();
}
示例15: MsgOutput
void CCrywolfAltar::ResetAltarUserIndex(int iAltarObjIndex, int iClass)
{
int iAltarNumber = this->GetAlatarNumber(iClass);
CCrywolfAltarInfo * AltarInfo = &this->m_AltarInfo[iAltarNumber];
if ( gObjIsConnected(AltarInfo->m_iUserIndex) != FALSE )
{
MsgOutput(AltarInfo->m_iUserIndex, lMsg.Get(MSGGET(13, 4)), iAltarNumber);
LogAddTD("[ Crywolf ][Altar Op.] [%s][%s] Remove contract Altar[%d]", gObj[AltarInfo->m_iUserIndex].AccountID, gObj[AltarInfo->m_iUserIndex].Name, iAltarNumber);
}
if ( AltarInfo->m_iContractCount >= MAX_ALTAR_CONTRACTS )
{
AltarInfo->SetAltarState(3);
gObjAddBuffEffect(&gObj[iAltarObjIndex], AT_CW_ALTAR_INACTIVE, 0, 0, 0, 0, -10);
}
else
{
gObjAddBuffEffect(&gObj[iAltarObjIndex], AT_CW_ALTAR_ACTIVE, 0, 0, 0, 0, -10);
AltarInfo->SetAltarState(0);
}
AltarInfo->m_iUserIndex = -1;
AltarInfo->m_dwAppliedContractTime = 0;
AltarInfo->m_dwValidContractTime = 0;
AltarInfo->m_dwLastValidContractTime = GetTickCount();
}