- BEGINPACKET( pak, 0x7ec );
- ADDDWORD ( pak, thisclient->Stats->HP );
- ADDDWORD ( pak, thisclient->Stats->MP );
- ADDDWORD ( pak, 0);
- ADDDWORD ( pak, 0);
- thisclient->client->SendPacket( &pak );
is client 437 change packet command to handle this packet?
when buff is debuffed, it's define in refreshbuff() with packet command 0x7b7 sent to client. i have change all packet to 0, but this not make a change. at server buff is back to normal but at client still.
any idea..?
btw for packet data HP and MP, i have make a change to make it's same among client and server, every send a HP MP data, change line 3 and 4 to 0;
this is my code;
and i have repair pakmount to fix some bug:
here it is;
first you must uncomment at worldserver.cpp //LoadMountItem( ); to LoadMountItem( );
and change LoadMountItem( ); at startup.cpp to make same with list_mount.stb
- int slotmount = GETBYTE((*P), 0);
- if(!CheckInventorySlot( thisclient, slotmount))
- {
- Log(MSG_DEBUG,"Mount with slot kosong");
- return false;
- }
- CItem newitem = thisclient->items[slotmount];
- if(newitem.itemtype != 15)
- {
- Log(MSG_DEBUG,"Mount with wrong item");
- return false;
- }
- CMountData* mountdata = MountList.Index[newitem.itemnum];
- if(mountdata==NULL)
- {
- Log(MSG_DEBUG,"%s mountdata kosong at id %i",thisclient->CharInfo->charname,newitem.itemnum);
- return true;
- }
- Log(MSG_DEBUG,"Mount id %i mspeed %i wspeed %i duration %i stl %i",
- mountdata->id,mountdata->mspeed,mountdata->wspeed,mountdata->duration,mountdata->STLId);
- BEGINPACKET ( pak, 0x858 );
- ADDWORD ( pak, thisclient->clientid );
- ADDBYTE ( pak, newitem.itemnum );
- ADDDWORD ( pak, newitem.itemnum );
- ADDDWORD ( pak, mountdata->mspeed ); // STB movementspeed
- SendToVisible( &pak, thisclient );
- thisclient->Status->Stance = MOUNTED;
- thisclient->Stats->Move_Speed = mountdata->mspeed;
- thisclient->CharInfo->Mount = newitem.itemnum;
- Log(MSG_DEBUG,"%s Mounted %i", thisclient->CharInfo->charname, newitem.itemnum);