Skip to content

Commit

Permalink
Introducing 2012-06-18 onwards status change timer
Browse files Browse the repository at this point in the history
Special Thanks to unleashed, Judas and everyone who contributed to the 2013 client.
Also introducing into the packet table the current 2013-03-20 Special Thanks to Judas!

Signed-off-by: shennetsind <ind@henn.et>
  • Loading branch information
shennetsind committed Apr 7, 2013
1 parent b804926 commit 267eb1f
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 25 deletions.
4 changes: 2 additions & 2 deletions conf/battle/client.conf
Expand Up @@ -29,8 +29,8 @@
// 0x04000: 2008-09-10aSakexe (version 23)
// 0x08000: 2008-08-27aRagexeRE (version 24)
// 0x10000: 2008-09-10aRagexeRE (version 25)
// default value: 0xFFFFFF (all clients)
packet_ver_flag: 0xFFFFFF
// default value: 0xFFFFFFF (all clients)
packet_ver_flag: 0xFFFFFFF

// Minimum delay between whisper/global/party/guild messages (in ms)
// Messages that break this threshold are silently omitted.
Expand Down
74 changes: 58 additions & 16 deletions db/packet_db.txt
Expand Up @@ -1776,25 +1776,67 @@ packet_ver: 31
0x08E5,41,bookingregreq,2:4 //Added to prevent disconnections
0x08d2,10

//2012-06-18
packet_ver: 32
0x0983,29

// ========== WARNING =============
// - 2012-07-02 is NOT STABLE.
// - The packets are kept here for reference, DONT USE THEM.
//2012-07-02aRagexeRE
//packet_ver: 32
//0x0363,19,wanttoconnection,2:6:10:14:18
//0x0364,6,ticksend,2
//0x085a,7,actionrequest,2:6
//0x0861,8,movefromkafra,2:4
//0x0862,10,useskilltoid,2:4:6
//0x0863,10,useskilltopos,2:4:6:8
//0x0886,6,solvecharname,2
//0x0889,90,useskilltoposinfo,2:4:6:8:10
//0x089e,6,dropitem,2:4
//0x089f,6,takeitem,2
//0x08a0,8,movetokafra,2:4
//0x094a,6,getcharnamerequest,2
//0x0953,5,walktoxy,2
//0x0960,5,changedir,2:4
packet_ver: 33
0x0363,19,wanttoconnection,2:6:10:14:18
0x0364,6,ticksend,2
0x085a,7,actionrequest,2:6
0x0861,8,movefromkafra,2:4
0x0862,10,useskilltoid,2:4:6
0x0863,10,useskilltopos,2:4:6:8
0x0886,6,solvecharname,2
0x0889,90,useskilltoposinfo,2:4:6:8:10
0x089e,6,dropitem,2:4
0x089f,6,takeitem,2
0x08a0,8,movetokafra,2:4
0x094a,6,getcharnamerequest,2
0x0953,5,walktoxy,2
0x0960,5,changedir,2:4

//2013-03-20Ragexe (Judas)
packet_ver: 34
0x01FD,15,repairitem,2
0x086D,26,friendslistadd,2
0x0897,5,hommenu,2:4
0x0947,36,storagepassword,0
//0x0288,-1,cashshopbuy,4:8
0x086F,26,partyinvite2,2
0x0888,19,wanttoconnection,2:6:10:14:18
0x08c9,4
0x088E,7,actionrequest,2:6
0x089B,10,useskilltoid,2:4:6
0x0881,5,walktoxy,2
0x0363,6,ticksend,2
0x093F,5,changedir,2:4
0x0933,6,takeitem,2
0x0438,6,dropitem,2:4
0x08AC,8,movetokafra,2:4
0x0874,8,movefromkafra,2:4
0x0959,10,useskilltopos,2:4:6:8
0x085A,90,useskilltoposinfo,2:4:6:8:10
0x0898,6,getcharnamerequest,2
0x094C,6,solvecharname,2
0x0907,5,moveitem,2:4
0x0908,5
0x08CF,10 //Amulet spirits
0x08d2,10
0x0977,14 //Monster HP Bar
0x0998,8,equipitem,2:4
//0x0281,-1,itemlistwindowselected,2:4:8
0x0938,-1,reqopenbuyingstore,2:4:8:9:89
//0x0817,2,reqclosebuyingstore,0
//0x0360,6,reqclickbuyingstore,2
0x0922,-1,reqtradebuyingstore,2:4:8:12
0x094E,-1,searchstoreinfo,2:4:5:9:13:14:15
//0x0835,2,searchstoreinfonextpage,0
//0x0838,12,searchstoreinfolistitemclick,2:6:10

//Add new packets here
//packet_ver: 33
//packet_ver: 35
33 changes: 27 additions & 6 deletions src/map/clif.c
Expand Up @@ -5421,8 +5421,11 @@ void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val

if (!(status_type2relevant_bl_types(type)&bl->type)) // only send status changes that actually matter to the client
return;

#if PACKETVER >= 20090121
#if PACKETVER >= 20120618
if(flag && battle_config.display_status_timers && sd)
WBUFW(buf,0)=0x983;
else
#elif PACKETVER >= 20090121
if(flag && battle_config.display_status_timers && sd)
WBUFW(buf,0)=0x43f;
else
Expand All @@ -5431,9 +5434,19 @@ void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val
WBUFW(buf,2)=type;
WBUFL(buf,4)=bl->id;
WBUFB(buf,8)=flag;
#if PACKETVER >= 20090121
if(flag && battle_config.display_status_timers && sd)
{
#if PACKETVER >= 20120618
WBUFL(buf,9)=tick;/* at this stage remain and total are the same value I believe */
WBUFL(buf,13)=tick;
if(flag && battle_config.display_status_timers && sd) {
if (tick <= 0)
tick = 9999; // this is indeed what official servers do

WBUFL(buf,17) = val1;
WBUFL(buf,21) = val2;
WBUFL(buf,25) = val3;
}
#elif PACKETVER >= 20090121
if(flag && battle_config.display_status_timers && sd) {
if (tick <= 0)
tick = 9999; // this is indeed what official servers do

Expand All @@ -5443,6 +5456,7 @@ void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val
WBUFL(buf,21) = val3;
}
#endif
ShowDebug("Len for %d vs %d is %d\n",WBUFW(buf,0),0x983,packet_len(WBUFW(buf,0)));
clif->send(buf,packet_len(WBUFW(buf,0)),bl, (sd && sd->status.option&OPTION_INVISIBLE) ? SELF : AREA);
}

Expand Down Expand Up @@ -16791,6 +16805,11 @@ static int packetdb_readdb(void)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x0980
0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,

};
struct {
Expand Down Expand Up @@ -17076,6 +17095,7 @@ static int packetdb_readdb(void)
if(str[0]==NULL)
continue;
cmd=strtol(str[0],(char **)NULL,0);

if(max_cmd < cmd)
max_cmd = cmd;
if(cmd <= 0 || cmd > MAX_PACKET_DB)
Expand Down Expand Up @@ -17135,7 +17155,8 @@ static int packetdb_readdb(void)

clif_config.packet_db_ver = j?j:MAX_PACKET_VER;
}
ShowStatus("Done reading packet database from '"CL_WHITE"%s"CL_RESET"'. Using default packet version: "CL_WHITE"%d"CL_RESET".\n", "packet_db.txt", clif_config.packet_db_ver);
ShowStatus("Done reading packet database from '"CL_WHITE"%s"CL_RESET"'.\n","packet_db.txt");
ShowStatus("Using default packet version: "CL_WHITE"%d"CL_RESET".\n", clif_config.packet_db_ver);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/map/clif.h
Expand Up @@ -50,7 +50,7 @@ struct eri;
**/
enum {// packet DB
MAX_PACKET_DB = 0xF00,
MAX_PACKET_VER = 32,
MAX_PACKET_VER = 34,
MAX_PACKET_POS = 20,
};

Expand Down

0 comments on commit 267eb1f

Please sign in to comment.