[ERROR]2 Big Bugs

All Helbreath Server Source Discussion here.
Post Reply
adaraio
just visiting
Posts: 6
Joined: Mon Aug 14, 2006 8:40 pm

Post by adaraio »

I add the Angelic by snoop guid here.

I click on the npc Gail and when click on take Angelic STR or DEX or INT or MAG Disconnect :S

And If click On Take FLag Have Error On HGServer an close de HGServer.

any can help me ?
Tafka12
<3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

I have first one too.
Second error works for me.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Crossfade
Loyal fan
Posts: 354
Joined: Sun Mar 20, 2005 5:55 pm

Post by Crossfade »

adaraio wrote: I add the Angelic by snoop guid here.

I click on the npc Gail and when click on take Angelic STR or DEX or INT or MAG Disconnect :S

And If click On Take FLag Have Error On HGServer an close de HGServer.

any can help me ?
show us the codes for your gail
adaraio
just visiting
Posts: 6
Joined: Mon Aug 14, 2006 8:40 pm

Post by adaraio »

can you help me for fix the second error ?
Crossfade
Loyal fan
Posts: 354
Joined: Sun Mar 20, 2005 5:55 pm

Post by Crossfade »

adaraio wrote: can you help me for fix the second error ?
you didn't edit or anything on the flag from gail? and are you sure your using it right? could be a number of things depending on what you did or did not do
EvilHit
Loyal fan
Posts: 356
Joined: Sun Jan 16, 2005 3:20 am

Post by EvilHit »

u have to have the rite no# in the hg and client for it to work
adaraio
just visiting
Posts: 6
Joined: Mon Aug 14, 2006 8:40 pm

Post by adaraio »

src cliente game.cpp

Code: Select all

/*********************************************************************************************************************
**  void DrawDialogBox_CMDHallMenu(short msX, short msY)  	( Snoopy )          **
**  description  	: Draw the diag                    **
**********************************************************************************************************************/
void CGame::DrawDialogBox_CMDHallMenu(short msX, short msY)
{short sX, sY, szX;
 char cTxt[120];
	sX = m_stDialogBoxInfo[51].sX;
	sY = m_stDialogBoxInfo[51].sY;
	szX = m_stDialogBoxInfo[51].sSizeX;
	DrawNewDialogBox(DEF_SPRID_INTERFACE_ND_GAME2, sX, sY, 2);

	switch (m_stDialogBoxInfo[51].cMode) {
	case 0: // initial diag
  if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 70) && (msY < sY + 95))
    PutAlignedString(sX, sX + szX, sY + 70, "Teleport to Battle Field", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 70, "Teleport to Battle Field", 4,0,50);

  if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 95) && (msY < sY + 120))
    PutAlignedString(sX, sX + szX, sY + 95, "Hire a soldier", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 95, "Hire a soldier", 4,0,50);

  if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 120) && (msY < sY + 145))
    PutAlignedString(sX, sX + szX, sY + 120, "Taking Flags", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 120, "Taking Flags", 4,0,50);
  // Angels
  if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 145) && (msY < sY + 170))
    PutAlignedString(sX, sX + szX, sY + 145, "Receive a Tutelary Angel", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 145, "Receive a Tutelary Angel", 4,0,50);
  break;

	case 1: // TP diag
  if( m_iTeleportMapCount > 0 )
  {	//PutAlignedString(sX, sX + szX, sY + 50, DRAW_DIALOGBOX_CITYHALL_MENU69, 55,25,25); // "Teleporting to dungeon level 2."
  	//PutAlignedString(sX, sX + szX, sY + 80, DRAW_DIALOGBOX_CITYHALL_MENU70, 55,25,25); // "5000Gold is required"
  	//PutAlignedString(sX, sX + szX, sY + 95, DRAW_DIALOGBOX_CITYHALL_MENU71, 55,25,25); //
  	//PutAlignedString(sX, sX + szX, sY + 110, DRAW_DIALOGBOX_CITYHALL_MENU72, 55,25,25);//
  	PutString2(sX + 35, sY + 250, DRAW_DIALOGBOX_CITYHALL_MENU72_1, 55,25,25);//"Civilians cannot go some area."
  	for( int i=0; i<m_iTeleportMapCount; i++ )
  	{	ZeroMemory( cTxt, sizeof(cTxt) );
    GetOfficialMapName( m_stTeleportList[i].mapname, cTxt );
    wsprintf( G_cTxt, DRAW_DIALOGBOX_CITYHALL_MENU77, cTxt, m_stTeleportList[i].iCost );
    if( (msX >= sX + DEF_LBTNPOSX) && (msX <= sX + DEF_RBTNPOSX + DEF_BTNSZX) && (msY >= sY + 130 + i*15) && (msY <= sY + 144 + i*15) )
      PutAlignedString(sX, sX + szX, sY + 130 + i*15, G_cTxt, 255, 255, 255);
    else PutAlignedString(sX, sX + szX, sY + 130 + i*15, G_cTxt,  250,  250,  0);
  	}
  }else if( m_iTeleportMapCount == -1 )
  {	PutAlignedString(sX, sX + szX, sY + 125, DRAW_DIALOGBOX_CITYHALL_MENU73, 55,25,25);//"Now it's searching for possible area"
  	PutAlignedString(sX, sX + szX, sY + 150, DRAW_DIALOGBOX_CITYHALL_MENU74, 55,25,25);//"to teleport."
  	PutAlignedString(sX, sX + szX, sY + 175, DRAW_DIALOGBOX_CITYHALL_MENU75, 55,25,25);//"Please wait for a moment."
  }else
  {	PutAlignedString(sX, sX + szX, sY + 175, DRAW_DIALOGBOX_CITYHALL_MENU76, 55,25,25);//"There is no area that you can teleport."
  }
  break;

	case 2: // Soldier diag
  PutAlignedString(sX, sX + szX, sY + 45, "You will hire a soldier by summon points", 255,255,255);
  if ((m_iConstructionPoint >= 2000) && (m_bIsCrusadeMode == FALSE))
  {	if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 70) && (msY < sY + 95))
     PutAlignedString(sX, sX + szX, sY + 70, "Sorceress             2000 Point", 255,255,255);
  	else PutAlignedString(sX, sX + szX, sY + 70, "Sorceress             2000 Point", 4,0,50);
  }else PutAlignedString(sX, sX + szX, sY + 70, "Sorceress             2000 Point", 65,65,65);

  if ((m_iConstructionPoint >= 3000) && (m_bIsCrusadeMode == FALSE))
  {	if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 95) && (msY < sY + 120))
    PutAlignedString(sX, sX + szX, sY + 95, "Ancient Temple Knight 3000 Point", 255,255,255);
  	else PutAlignedString(sX, sX + szX, sY + 95, "Ancient Temple Knight 3000 Point", 4,0,50);
  }else PutAlignedString(sX, sX + szX, sY + 95, "Ancient Temple Knight 3000 Point", 65,65,65);

  if ((m_iConstructionPoint >= 1500) && (m_bIsCrusadeMode == FALSE))
  {	if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 120) && (msY < sY + 145))
    PutAlignedString(sX, sX + szX, sY + 120, "Elf Master            1500 Point", 255,255,255);
  	else PutAlignedString(sX, sX + szX, sY + 120, "Elf Master            1500 Point", 4,0,50);
  }else PutAlignedString(sX, sX + szX, sY + 120, "Elf Master            1500 Point", 65,65,65);

  if ((m_iConstructionPoint >= 3000) && (m_bIsCrusadeMode == FALSE))
  {	if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 145) && (msY < sY + 171))
    PutAlignedString(sX, sX + szX, sY + 145, "Dark Shadow Knight    3000 Point", 255,255,255);
  	else PutAlignedString(sX, sX + szX, sY + 145, "Dark Shadow Knight    3000 Point", 4,0,50);
  }else PutAlignedString(sX, sX + szX, sY + 145, "Dark Shadow Knight    3000 Point", 65,65,65);

  if ((m_iConstructionPoint >= 4000) && (m_bIsCrusadeMode == FALSE))
  {	if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 170) && (msY < sY + 195))
    PutAlignedString(sX, sX + szX, sY + 170, "Heavy Battle Tank     4000 Point", 255,255,255);
  	else PutAlignedString(sX, sX + szX, sY + 170, "Heavy Battle Tank     4000 Point", 4,0,50);
  }else PutAlignedString(sX, sX + szX, sY + 170, "Heavy Battle Tank     4000 Point", 65,65,65);

  if ((m_iConstructionPoint >= 3000) && (m_bIsCrusadeMode == FALSE))
  {	if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 195) && (msY < sY + 220))
    PutAlignedString(sX, sX + szX, sY + 195, "Barbarian             3000 Point", 255,255,255);
  	else PutAlignedString(sX, sX + szX, sY + 195, "Barbarian             3000 Point", 4,0,50);
  }else PutAlignedString(sX, sX + szX, sY + 195, "Barbarian             3000 Point", 65,65,65);

  PutAlignedString(sX, sX + szX, sY + 220,"You should join a guild to hire soldiers.", 4,0,50);
  wsprintf(G_cTxt,"Summon points : %d", m_iConstructionPoint);
  PutAlignedString(sX, sX + szX, sY + 250, G_cTxt, 4,0,50);
  PutAlignedString(sX, sX + szX, sY + 280, "Maximum summon points : 12000 points.", 4,0,50);
  PutAlignedString(sX, sX + szX, sY + 300, "Maximum hiring number : 5 ", 4,0,50);
  break;

	case 3: // Hire a Flag Diag
  PutAlignedString(sX, sX + szX, sY + 45,"Puedes adquirir banderas con los puntos de EK.", 4,0,50);
  PutAlignedString(sX, sX + szX, sY + 70,"El precio es 10 EK por bandera .", 4,0,50);
  if( (msX >= sX + 35) && (msX <= sX + 220) && (msY >= sY + 140) && (msY <= sY + 165) )
  	PutAlignedString(sX, sX + szX, sY + 140, "Tener una Bandera", 255,255,255);
  else
  	PutAlignedString(sX, sX + szX, sY + 140, "Tener una Bandera", 250,250,0);
  break;

	case 4: // Tutelar Angel Diag
  PutAlignedString(sX, sX + szX, sY + 45, "Necesitas 5 Magestics para el Angel", 4,0,50);
  PutAlignedString(sX, sX + szX, sY + 80, "recibiendo Tutelary Angel.", 4,0,50);
  PutAlignedString(sX, sX + szX, sY + 105, "Queres tener un Tutelary Angel?", 4,0,50);
  wsprintf(G_cTxt, DRAW_DIALOGBOX_ITEMUPGRADE11, m_iGizonItemUpgradeLeft);// "Item upgrade point : %d"
  PutAlignedString(sX, sX + szX, sY + 140, G_cTxt, 0,0,0);

  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 175) && (msY < sY + 200)
  	&& (m_iGizonItemUpgradeLeft >4))
    PutAlignedString(sX, sX + szX, sY + 175, "Tutelary Angel (STR) sera repartido.", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 175, "Tutelary Angel (STR) sera repartido.", 250,250,0);

  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 200) && (msY < sY + 225)
  	&& (m_iGizonItemUpgradeLeft >4))
    PutAlignedString(sX, sX + szX, sY + 200, "Tutelary Angel (DEX) sera repartido.", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 200, "Tutelary Angel (DEX) será repartido.", 250,250,0);

  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 225) && (msY < sY + 250)
  	&& (m_iGizonItemUpgradeLeft >4))
    PutAlignedString(sX, sX + szX, sY + 225, "Tutelary Angel (INT) será repartido.", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 225, "Tutelary Angel (INT) será repartido.", 250,250,0);

  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 250) && (msY < sY + 275)
  	&& (m_iGizonItemUpgradeLeft >4))
    PutAlignedString(sX, sX + szX, sY + 250, "Tutelary Angel (MAG) será repartido.", 255,255,255);
  else PutAlignedString(sX, sX + szX, sY + 250, "Tutelary Angel (MAG) será repartido.", 250,250,0);

  break;
	}
}

/*********************************************************************************************************************
**  void DlgBoxClick_CMDHallMenu(short msX, short msY)  	( Snoopy )          	**
**  description  	: Response of the player if he accepts resurection or not        	**
**********************************************************************************************************************/
void CGame::DlgBoxClick_CMDHallMenu(short msX, short msY)
{short sX, sY;
	sX = m_stDialogBoxInfo[51].sX;
	sY = m_stDialogBoxInfo[51].sY;
	switch (m_stDialogBoxInfo[51].cMode) {
	case 0: // initial diag
  if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 70) && (msY < sY + 95))
  {	m_stDialogBoxInfo[51].cMode = 1; // TP diag
  	m_iTeleportMapCount = -1;
  	bSendCommand(MSGID_REQUEST_HELDENIAN_TP_LIST, NULL, NULL, NULL, NULL, NULL, NULL);
  	PlaySound('E', 14, 5);
  }
  if ((msX > sX + 35) && (msX < sX + 220) && (msY > sY + 95) && (msY < sY + 120))
  {	m_stDialogBoxInfo[51].cMode = 2; // Soldier Diag
  	PlaySound('E', 14, 5);
  }
  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 120) && (msY < sY + 145)
  	/*&& (m_iEnemyKillCount >= 3)*/)
  {	m_stDialogBoxInfo[51].cMode = 3; // Flag Diag
  	PlaySound('E', 14, 5);
  }
  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 120) && (msY < sY + 145)
  	/*&& (m_iEnemyKillCount >= 3)*/)
  {	m_stDialogBoxInfo[51].cMode = 3; // Flag Diag
  	PlaySound('E', 14, 5);
  }

  if (   (msX > sX + 35) && (msX < sX + 220) && (msY > sY + 145) && (msY < sY + 170)
  	/*&& (m_iGizonItemUpgradeLeft >= 5)*/)
  {	m_stDialogBoxInfo[51].cMode = 4; // Flag Diag
  	PlaySound('E', 14, 5);
  }


	case 1: // TP now
  if( m_iTeleportMapCount > 0 )
  {	for( int i=0; i<m_iTeleportMapCount; i++ )
  	{	if( (msX >= sX + DEF_LBTNPOSX) && (msX <= sX + DEF_RBTNPOSX + DEF_BTNSZX) && (msY >= sY + 130 + i*15) && (msY <= sY + 144 + i*15) )
    {	bSendCommand(MSGID_REQUEST_HELDENIAN_TP, NULL, NULL, m_stTeleportList[i].iIndex, NULL, NULL, NULL);
    	DisableDialogBox(51);
    	return;
  }	}	}
  break;

	case 2: // Buy a soldier scroll
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY > sY + 70) && (msY < sY + 95)
  	&& (m_iConstructionPoint >= 2000) && (m_bIsCrusadeMode == FALSE)) // Sorceress
  {	bSendCommand(MSGID_REQUEST_HELDENIAN_SCROLL, 875, 1, 2, 3, 4, "Gail", 5);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY > sY + 95) && (msY < sY + 120)
  	&& (m_iConstructionPoint >= 3000) && (m_bIsCrusadeMode == FALSE)) // ATK
  {	bSendCommand(MSGID_REQUEST_HELDENIAN_SCROLL, 876, 0, 0, 0, 0, "Gail", 0);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY > sY + 120) && (msY < sY + 145)
  	&& (m_iConstructionPoint >= 1500) && (m_bIsCrusadeMode == FALSE)) // Elf
  {	bSendCommand(MSGID_REQUEST_HELDENIAN_SCROLL, 877, 0, 0, 0, 0, "Gail", 0);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY > sY + 145) && (msY < sY + 170)
  	&& (m_iConstructionPoint >= 3000) && (m_bIsCrusadeMode == FALSE)) // DSK
  {	bSendCommand(MSGID_REQUEST_HELDENIAN_SCROLL, 878, 0, 0, 0, 0, "Gail", 0);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY > sY + 170) && (msY < sY + 195)
  	&& (m_iConstructionPoint >= 4000) && (m_bIsCrusadeMode == FALSE)) // HBT
  {	bSendCommand(MSGID_REQUEST_HELDENIAN_SCROLL, 879, 0, 0, 0, 0, "Gail", 0);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY > sY + 195) && (msY < sY + 220)
  	&& (m_iConstructionPoint >= 3000) && (m_bIsCrusadeMode == FALSE)) // Barbarian
  {	bSendCommand(MSGID_REQUEST_HELDENIAN_SCROLL, 880, 0, 0, 0, 0, "Gail", 0);
  	PlaySound('E', 14, 5);
  }
  break;

	case 3: // Buy a Flag
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY >= sY + 140) && (msY <= sY + 165)
  	&& (m_iEnemyKillCount >=3))
  {	bSendCommand(MSGID_COMMAND_COMMON, DEF_COMMONTYPE_REQ_GETOCCUPYFLAG, 0, 0, 0, 0, 0, 0);
  	PlaySound('E', 14, 5);
  }
  break;

	case 4: // Buy an Angel
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY >= sY + 175) && (msY <= sY + 200)
  	&& ( m_iGizonItemUpgradeLeft>=5))
  {	bSendCommand(DEF_REQUEST_ANGEL, NULL, NULL, 1, NULL, NULL, "Gail", NULL);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY >= sY + 200) && (msY <= sY + 225)
  	&& ( m_iGizonItemUpgradeLeft>=5))
  {	bSendCommand(DEF_REQUEST_ANGEL, NULL, NULL, 2, NULL, NULL, "Gail", NULL);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY >= sY + 225) && (msY <= sY + 250)
  	&& ( m_iGizonItemUpgradeLeft>=5))
  {	bSendCommand(DEF_REQUEST_ANGEL, NULL, NULL, 3, NULL, NULL, "Gail", NULL);
  	PlaySound('E', 14, 5);
  }
  if (   (msX >= sX + 35) && (msX <= sX + 220) && (msY >= sY + 250) && (msY <= sY + 275)
  	&& ( m_iGizonItemUpgradeLeft>=5))
  {	bSendCommand(DEF_REQUEST_ANGEL, NULL, NULL, 4, NULL, NULL, "Gail", NULL);
  	PlaySound('E', 14, 5);
  }

  break;
	}
}

/*********************************************************************************************************************
**  bool DKGlare(int iWeaponIndex, int iWeaponIndex, int *iWeaponGlare)	( Snoopy )        	**
**  description  	: test glowing condition for DK set              	**
**********************************************************************************************************************/
void CGame::DKGlare(int iWeaponColor, int iWeaponIndex, int *iWeaponGlare)
{	if (iWeaponColor != 9) return;
	if (   ((iWeaponIndex >= DEF_SPRID_WEAPON_M + 64*14)&&(iWeaponIndex < DEF_SPRID_WEAPON_M + 64*14 + 56)) //msw3
  || ((iWeaponIndex >= DEF_SPRID_WEAPON_W + 64*14)&&(iWeaponIndex < DEF_SPRID_WEAPON_W + 64*14 + 56))) //wsw3
	{	*iWeaponGlare = 3;
	}else if (  ((iWeaponIndex >= DEF_SPRID_WEAPON_M + 64*37)&&(iWeaponIndex < DEF_SPRID_WEAPON_M + 64*37 + 56)) //MStaff3
  || ((iWeaponIndex >= DEF_SPRID_WEAPON_W + 64*37)&&(iWeaponIndex < DEF_SPRID_WEAPON_W + 64*37 + 56)))//WStaff3
	{	*iWeaponGlare = 2;
	}
}
adaraio
just visiting
Posts: 6
Joined: Mon Aug 14, 2006 8:40 pm

Post by adaraio »

and src game.cpp hgserver

Code: Select all

/*********************************************************************************************************************
**  BOOL CGame::GetAngelHandler(int iClientH, char * pData, DWORD dwMsgSize)          **
** description   :: Reversed and coded by Snoopy                 **
*********************************************************************************************************************/
void CGame::GetAngelHandler(int iClientH, char * pData, DWORD dwMsgSize)
{char  *cp, cData[256], cTmpName[21];
int   iAngel, iItemNbe;
class CItem * pItem;
int   iRet, iEraseReq;
short * sp;
WORD  * wp;
int   * ip;
DWORD * dwp;
if (m_pClientList[iClientH] == NULL)      return;
if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
if (_iGetItemSpaceLeft(iClientH) == 0)
{ SendItemNotifyMsg(iClientH, DEF_NOTIFY_CANNOTCARRYMOREITEM, NULL, NULL);
 return;
}
cp = (char *)(pData + DEF_INDEX2_MSGTYPE + 2);
ZeroMemory(cTmpName, sizeof(cTmpName));
strcpy(cTmpName, cp);
cp += 20;
ip = (int *)cp;
iAngel = (int) *ip; // 0x00 l a i
cp += 2;
wsprintf(G_cTxt, "PC(%s) obtained an Angel (%d).   %s(%d %d)"
  , m_pClientList[iClientH]->m_cCharName
  , iAngel
  , m_pClientList[iClientH]->m_cMapName
  , m_pClientList[iClientH]->m_sX
  , m_pClientList[iClientH]->m_sY);
PutLogList(G_cTxt);
switch (iAngel) {
case 1: // STR
 iItemNbe = 908;
 break;
case 2: // DEX
 iItemNbe = 909;
 break;
case 3: // INT
 iItemNbe = 910;
 break;
case 4: // MAG
 iItemNbe = 911;
 break;
default:
 PutLogList("¡Gail pidio crear un artículo incorrecto! ");
 break;
}
pItem = NULL;
pItem = new class CItem;
if (pItem == NULL) return;
if ((_bInitItemAttr(pItem, iItemNbe) == TRUE))
{ pItem->m_sTouchEffectType = DEF_ITET_UNIQUE_OWNER;
 pItem->m_sTouchEffectValue1 = m_pClientList[iClientH]->m_sCharIDnum1;
 pItem->m_sTouchEffectValue2 = m_pClientList[iClientH]->m_sCharIDnum2;
 pItem->m_sTouchEffectValue3 = m_pClientList[iClientH]->m_sCharIDnum3;
 if (_bAddClientItemList(iClientH, pItem, &iEraseReq) == TRUE)
 { ZeroMemory(cData, sizeof(cData));
  dwp  = (DWORD *)(cData + DEF_INDEX4_MSGID);
  *dwp = MSGID_NOTIFY;
  wp   = (WORD *)(cData + DEF_INDEX2_MSGTYPE);
  *wp  = DEF_NOTIFY_ITEMOBTAINED;    
  cp = (char *)(cData + DEF_INDEX2_MSGTYPE + 2);    
  *cp = 1;
  cp++;    
  memcpy(cp, pItem->m_cName, 20);
  cp += 20;    
  dwp  = (DWORD *)cp;
  *dwp = pItem->m_dwCount;
  cp += 4;    
  *cp = pItem->m_cItemType;
  cp++;    
  *cp = pItem->m_cEquipPos;
  cp++;    
  *cp = (char)0;
  cp++;    
  sp  = (short *)cp;
  *sp = pItem->m_sLevelLimit;
  cp += 2;    
  *cp = pItem->m_cGenderLimit;
  cp++;    
  wp = (WORD *)cp;
  *wp = pItem->m_wCurLifeSpan;
  cp += 2;    
  wp = (WORD *)cp;
  *wp = pItem->m_wWeight;
  cp += 2;    
  sp  = (short *)cp;
  *sp = pItem->m_sSprite;
  cp += 2;    
  sp  = (short *)cp;
  *sp = pItem->m_sSpriteFrame;
  cp += 2;
  *cp = pItem->m_cItemColor;
  cp++;
  *cp = (char)pItem->m_sItemSpecEffectValue2; // v1.41
  cp++;    
  dwp = (DWORD *)cp;
  *dwp = pItem->m_dwAttribute;
  cp += 4;
  if (iEraseReq == 1) delete pItem;    
  iRet = m_pClientList[iClientH]->m_pXSock->iSendMsg(cData, 53);
  switch (iRet) {
  case DEF_XSOCKEVENT_QUENEFULL:
  case DEF_XSOCKEVENT_SOCKETERROR:
  case DEF_XSOCKEVENT_CRITICALERROR:
  case DEF_XSOCKEVENT_SOCKETCLOSED:
   DeleteClient(iClientH, TRUE, TRUE);
   break;
  }
 }else
 { m_pMapList[ m_pClientList[iClientH]->m_cMapIndex ]->bSetItem(m_pClientList[iClientH]->m_sX,
                                                            m_pClientList[iClientH]->m_sY, pItem);  
  SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_ITEMDROP, m_pClientList[iClientH]->m_cMapIndex,
                           m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY,  
                           pItem->m_sSprite, pItem->m_sSpriteFrame, pItem->m_cItemColor); // v1.4  
  dwp  = (DWORD *)(cData + DEF_INDEX4_MSGID);
  *dwp = MSGID_NOTIFY;
  wp   = (WORD *)(cData + DEF_INDEX2_MSGTYPE);
  *wp  = DEF_NOTIFY_CANNOTCARRYMOREITEM;    
  iRet = m_pClientList[iClientH]->m_pXSock->iSendMsg(cData, 6);
  switch (iRet) {
  case DEF_XSOCKEVENT_QUENEFULL:
  case DEF_XSOCKEVENT_SOCKETERROR:
  case DEF_XSOCKEVENT_CRITICALERROR:
  case DEF_XSOCKEVENT_SOCKETCLOSED:
   DeleteClient(iClientH, TRUE, TRUE);
   break;
 } }
}else
{ delete pItem;
 pItem = NULL;
} }
Post Reply