


Code: Select all
void CGuild::UserCommand_AddGuildMaster(int iClientH, char * pData, DWORD dwMsgSize)
{
char seps[] = "= \t\n";
char * token, cTargetName[11], cBuff[256];
class CStrTok * pStrTok;
register int i, m_iGuildGUID;
if ( G_pGame->m_pClientList[ iClientH ] == NULL) return;
if ((dwMsgSize) <= 0) return;
if ( G_pGame->m_pClientList[ iClientH ]->m_iGuildRank != 0 ) {
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOGUILDMASTERLEVEL, NULL, NULL, NULL, NULL);
return;
}
ZeroMemory(cTargetName, sizeof(cTargetName));
ZeroMemory(cBuff, sizeof(cBuff));
memcpy(cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok(cBuff, seps);
token = pStrTok->pGet();
token = pStrTok->pGet();
if (token != NULL) {
if (strlen(token) > 10)
memcpy(cTargetName, token, 10);
else memcpy(cTargetName, token, strlen(token));
for (i = 1; i < DEF_MAXCLIENTS; i++)
if (( G_pGame->m_pClientList[ i ] != NULL) && (memcmp( G_pGame->m_pClientList[ i ]->m_cCharName, cTargetName, 10) == 0) ) {
if (memcmp( G_pGame->m_pClientList[ iClientH ]->m_cGuildName, G_pGame->m_pClientList[ i ]->m_cGuildName, 20) != 0) {
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_CANNOTBANGUILDMAN, NULL, NULL, NULL, NULL);
delete pStrTok;
return;
}
G_pGame->bSendMsgToLS(MSGID_REQUEST_UPDATEGUILDINFO_DELGUILDSMAN, i);
SendGuildMsg(i, DEF_NOTIFY_DISMISSGUILDSMAN, NULL, NULL, NULL);
G_pGame->m_pClientList[ i ]->m_iGuildRank = 0;
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
G_pGame->SendNotifyMsg(iClientH, i, DEF_COMMONTYPE_BANGUILD, NULL, NULL, NULL, NULL);
G_pGame->SendEventToNearClient_TypeA(i, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
delete pStrTok;
return;
}
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_PLAYERNOTONGAME, NULL, NULL, NULL, cTargetName);
}
delete pStrTok;
return;
}
E:\HelBreath Resources\HG Sources\Game.cpp(36503) : error C2065: 'DEF_NOTIFY_SUCCESSADDGM' : undeclared identifier
Code: Select all
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
-.- its a send notify to client and then back to hg, so it requires a little bit of extra codingAce wrote: i got 1 error:
E:\HelBreath Resources\HG Sources\Game.cpp(36503) : error C2065: 'DEF_NOTIFY_SUCCESSADDGM' : undeclared identifierjust add the case ?Code: Select all
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
undeclared identifier = you haven't defined it...Ace wrote: i got 1 error:
E:\HelBreath Resources\HG Sources\Game.cpp(36503) : error C2065: 'DEF_NOTIFY_SUCCESSADDGM' : undeclared identifierjust add the case ?Code: Select all
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
Code: Select all
#define DEF_NOTIFY_NOTENOUGHGOLD 0x0B08
#define DEF_NOTIFY_KILLED 0x0B09
#define DEF_NOTIFY_EXP 0x0B0A
#define DEF_NOTIFY_GUILDDISBANDED 0x0B0B
#define DEF_NOTIFY_EVENTMSGSTRING 0x0B0C
#define DEF_NOTIFY_CANNOTJOINMOREGUILDSMAN 0x0B0D
#define DEF_NOTIFY_NEWGUILDSMAN 0x0B0E
#define DEF_NOTIFY_DISMISSGUILDSMAN 0x0B0F
#define DEF_NOTIFY_MAGICSTUDYSUCCESS 0x0B10
#define DEF_NOTIFY_MAGICSTUDYFAIL 0x0B11
#define DEF_NOTIFY_SKILLTRAINSUCCESS 0x0B12
#define DEF_NOTIFY_SKILLTRAINFAIL 0x0B13
#define DEF_NOTIFY_MP 0x0B14