Kanage Posted February 4, 2012 Group: Members Topic Count: 33 Topics Per Day: 0.01 Content Count: 162 Reputation: 3 Joined: 01/23/12 Last Seen: October 8, 2012 Share Posted February 4, 2012 (edited) hello nailagay ko na po yung patch para sa renal mount at nailagay ko na din yung item sa database, pagkatapos narecompile ko na din ang server ko pero ng isummon ko yung itemid nya na 12622 lumabas na yung item pero wala yung description nya at effects nya ayaw gumana. sana may katulong. client: 2011-01-18aRagexeRE 3ceam r660 updated lua files ito pala nailagay ko sa script nya sa database sc_start SC_ALL_RIDING,999999,0; getitem 12622,1; Edited February 4, 2012 by myrmiddon Quote Link to comment Share on other sites More sharing options...
KeiKun Posted February 5, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 967 Reputation: 53 Joined: 11/13/11 Last Seen: Friday at 08:18 AM Share Posted February 5, 2012 (edited) lol Rein of Mounts at 3CeAM 12622,Reins_Of_Mounts,Reins Of Mounts,2,500,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ALL_RIDING,-1,1; },{},{} Edited February 5, 2012 by KeiKun 1 Quote Link to comment Share on other sites More sharing options...
Kanage Posted February 7, 2012 Group: Members Topic Count: 33 Topics Per Day: 0.01 Content Count: 162 Reputation: 3 Joined: 01/23/12 Last Seen: October 8, 2012 Author Share Posted February 7, 2012 thanks again KeiKun for the help, you're a big help to the community Quote Link to comment Share on other sites More sharing options...
Lordamax Posted March 5, 2012 Group: Members Topic Count: 71 Topics Per Day: 0.01 Content Count: 328 Reputation: 13 Joined: 11/27/11 Last Seen: July 2, 2016 Share Posted March 5, 2012 Sir keikun when i double click this Reign of mount! Nothing happens I'm using 3ceam patched to packet 28 and rental mount. 2012-12-20b Quote Link to comment Share on other sites More sharing options...
MxR Posted April 14, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 30 Reputation: 3 Joined: 02/19/12 Last Seen: February 1, 2023 Share Posted April 14, 2012 rev 663 na ang 3ceam ngayon. i was really hoping sooner or later mag kakaroon rin sila. tanong lang @Kanage - tol, yan bang client na gamit mo. walang walk, skill, storage click delay? alam ko kasi, mount daw gumagana lang sa 2011 clients, pero most 2011 client may delay. or i could be wrong. thanks. Quote Link to comment Share on other sites More sharing options...
Kanage Posted April 14, 2012 Group: Members Topic Count: 33 Topics Per Day: 0.01 Content Count: 162 Reputation: 3 Joined: 01/23/12 Last Seen: October 8, 2012 Author Share Posted April 14, 2012 (edited) @MxR yung 3ceam ko meron sya delay pag dumadana ang player sa isang map, sa tingin mo pag problema yung pag read ng packet sa positioning ng walk parang sa bug ng body relocation. na adress na to pero di ko alam kung maayos. mga 2011 and up lang may delay, sa tingin ko iniba na talaga pag read ng packets sa renewal eh Edited April 14, 2012 by Kanage Quote Link to comment Share on other sites More sharing options...
MxR Posted April 15, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 30 Reputation: 3 Joined: 02/19/12 Last Seen: February 1, 2023 Share Posted April 15, 2012 oo nga. try ko sana mag convert sa rathena from 3ceam. kaso walang stable working client na walang major prob to fix, kaya nag give up nalang muna ako until may update na. lucky you may mount ka sa 3ceam server mo. Quote Link to comment Share on other sites More sharing options...
Kanage Posted April 16, 2012 Group: Members Topic Count: 33 Topics Per Day: 0.01 Content Count: 162 Reputation: 3 Joined: 01/23/12 Last Seen: October 8, 2012 Author Share Posted April 16, 2012 gumagana naman yan basta ipacth mo lang yung code eh, gamit kong client sa 3ceam ko 2011-06-28aRagexeRE lang at ok naman na siya wala nga lang sprite yung kagerou at oboro at di kasi support yun. Quote Link to comment Share on other sites More sharing options...
MxR Posted April 17, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 30 Reputation: 3 Joined: 02/19/12 Last Seen: February 1, 2023 Share Posted April 17, 2012 geh subukan ko. san mo nakuha yung patch? O_o ty. Quote Link to comment Share on other sites More sharing options...
Kanage Posted April 17, 2012 Group: Members Topic Count: 33 Topics Per Day: 0.01 Content Count: 162 Reputation: 3 Joined: 01/23/12 Last Seen: October 8, 2012 Author Share Posted April 17, 2012 (edited) 3Ceam mounts with packets version 26-28 Index: db/const.txt =================================================================== --- db/const.txt (revision 658) +++ db/const.txt (working copy) @@ -1230,6 +1230,7 @@ SC_TIDAL_WEAPON_OPTION 764 SC_ROCK_CRUSHER 765 SC_ROCK_CRUSHER_ATK 766 +SC_ALL_RIDING 767 e_gasp 0 e_what 1 Index: db/item_db2.txt =================================================================== --- db/item_db2.txt (revision 658) +++ db/item_db2.txt (working copy) @@ -407,3 +407,6 @@ // Purchase Shop Items //6377,Buy_Stall_Permit,Buy Stall Permit,3,200,,10,,,,,,,,,,,,,{},{},{} //12548,Buy_Shabby_Stall_Permit,Buy Shabby Stall Permit,11,500,,10,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "ALL_BUYING_STORE",1; },{},{} + +// Reins +12622,Reins_Of_Mounts,Reins Of Mounts,2,500,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ALL_RIDING,-1,1; },{},{} No newline at end of file Index: db/packet_db.txt =================================================================== --- db/packet_db.txt (revision 658) +++ db/packet_db.txt (working copy) @@ -56,7 +56,7 @@ 0x008c,-1,globalmessage,2:4 0x008d,-1 0x008e,-1 -//0x008f,-1 +//0x008f,0 0x0090,7,npcclicked,2 0x0091,22 0x0092,28 @@ -86,7 +86,7 @@ 0x00aa,7 0x00ab,4,unequipitem,2 0x00ac,7 -//0x00ad,-1 +//0x00ad,0 0x00ae,-1 0x00af,6 0x00b0,8 @@ -303,7 +303,7 @@ 0x0183,10,guilddelalliance,2:6 0x0184,10 0x0185,34 -//0x0186,-1 +//0x0186,0 0x0187,6 0x0188,8 0x0189,4 @@ -371,7 +371,7 @@ 0x01c7,2 0x01c8,13 0x01c9,97 -//0x01ca,-1 +//0x01ca,0 0x01cb,9 0x01cc,9 0x01cd,30 @@ -436,8 +436,8 @@ 0x0208,11,friendslistreply,2:6:10 0x0209,36 0x020a,10 -//0x020b,-1 -//0x020c,-1 +//0x020b,0 +//0x020c,0 0x020d,-1 //2004-07-05aSakexe @@ -733,7 +733,7 @@ 0x0113,33,useskilltopos,12:15:18:31 0x0116,12,dropitem,3:10 0x0190,24,actionrequest,11:23 -0x0216,-1 +0x0216,0 0x023d,-1 0x023e,4 @@ -767,7 +767,7 @@ 0x0248,68 0x0249,3 0x024a,70 -0x024b,4,auctioncancelreg,0 +0x024b,4,auctioncancelreg,2 0x024c,8,auctionsetitem,0 0x024d,14 0x024e,6,auctioncancel,0 @@ -799,7 +799,7 @@ 0x0251,4 //2005-08-08aSakexe -0x024d,12,auctionregister,0 +0x024d,12,auctionregister,2:6:10 0x024e,4 //2005-08-17aSakexe @@ -810,7 +810,7 @@ 0x0240,-1 0x0248,-1,mailsend,2:4:28:68 0x0255,5 -0x0256,-1 +0x0256,0 0x0257,8 //2005-09-12bSakexe @@ -830,7 +830,7 @@ //2005-10-17aSakexe 0x007a,58 -0x025d,6,auctionclose,0 +0x025d,6,auctionclose,2 0x025e,4 //2005-10-24aSakexe @@ -933,8 +933,8 @@ 0x029d,-1 0x029e,11 0x029f,3,mermenu,0 -0x02a0,-1 -0x02a1,-1 +0x02a0,0 +0x02a1,0 0x02a2,8 //2007-01-08aSakexe @@ -961,8 +961,8 @@ //2007-01-29aSakexe 0x029b,72 -0x02a3,-1 -0x02a4,-1 +0x02a3,0 +0x02a4,0 0x02a5,8 // 2007-02-05aSakexe @@ -1082,8 +1082,8 @@ 0x02ef,8 //2008-03-18aSakexe -0x02bf,-1 -0x02c0,-1 +0x02bf,0 +0x02c0,0 0x02f0,10 0x02f1,2,progressbar,0 0x02f2,2 @@ -1408,7 +1408,7 @@ //2009-09-29aRagexeRE //0x07ea,2 -//0x07eb,-1 +//0x07eb,0 //0x07ec,6 //0x07ed,8 //0x07ee,6 @@ -1586,5 +1586,82 @@ 0x0842,6,recall2,2 0x0843,6,remove2,2 +//2010-11-24aRagexeRE +packet_ver: 26 +0x0436,19,wanttoconnection,2:6:10:14:18 +0x035f,5,walktoxy,2 +0x0360,6,ticksend,2 +0x0361,5,changedir,2:4 +0x0362,6,takeitem,2 +0x0363,6,dropitem,2:4 +0x0364,8,movetokafra,2:4 +0x0365,8,movefromkafra,2:4 +0x0366,10,useskilltopos,2:4:6:8 +0x0367,90,useskilltoposinfo,2:4:6:8:10 +0x0368,6,getcharnamerequest,2 +0x0369,6,solvecharname,2 +0x0856,-1 +0x0857,-1 +0x0858,-1 +0x0859,-1 + //Add new packets here -//packet_ver: 26 +packet_ver: 27 +0x022d,19,wanttoconnection,2:6:10:14:18 +0x0437,5,walktoxy,2 +0x035f,6,ticksend,2 +0x0893,5,changedir,2:4 +0x07e4,6,takeitem,2 +0x0362,6,dropitem,2:4 +0x07ec,8,movetokafra,2:4 +0x0364,8,movefromkafra,2:4 +0x0202,10,useskilltopos,2:4:6:8 +0x0366,90,useskilltoposinfo,2:4:6:8:10 +0x08ad,6,getcharnamerequest,2 +0x0368,6,solvecharname,2 +0x0369,7,actionrequest,2:6 +0x083c,10,useskilltoid,2:4:6 + +// Unknown +//0x08C7,-1 +//0x08C8,34 +//0x08C9,2 +//0x08CA,-1 +//0x08CB,-1 +//0x08CC,109 +//0x08CD,2 +//0x08CE,10 +//0x08CF,9 +//0x08D0,7 +//0x08D1,10 +//0x08D2,10 +//0x08D3,14 +//0x08D4,-1 + +packet_ver: 28 + +//2011-11-02 +//0x083c,19,wanttoconnection,2:6:10:14:18 +//0x088a,6,getcharnamerequest,2 +//0x0817,6,ticksend,2 +//0x0366,5,changedir,2:4 +//0x0364,5,walktoxy,2 +//0x08aa,7,actionrequest,2:6 +//0x02c4,10,useskilltoid,2:4:6 +//0x0369,10,useskilltopos,2:4:6:8 +//0x08ad,90,useskilltoposinfo,2:4:6:8:10 +//0x0885,6,dropitem,2:4 +//0x0815,6,takeitem,2 + +//2011-11-22 +0x0835,19,wanttoconnection,2:6:10:14:18 +0x0898,6,getcharnamerequest,2 +0x0899,6,ticksend,2 +0x0896,5,changedir,2:4 +0x0892,5,walktoxy,2 +0x022d,7,actionrequest,2:6 +0x08a1,10,useskilltoid,2:4:6 +0x08ad,10,useskilltopos,2:4:6:8 +0x0363,90,useskilltoposinfo,2:4:6:8:10 +0x0436,6,dropitem,2:4 +0x0893,6,takeitem,2 Index: src/char/char.c =================================================================== --- src/char/char.c (revision 658) +++ src/char/char.c (working copy) @@ -1830,7 +1830,7 @@ // Writes char data to the buffer in the format used by the client. // Used in packets 0x6b (chars info) and 0x6d (new char info) // Returns the size -#define MAX_CHAR_BUF 132 //Max size (for WFIFOHEAD calls) +#define MAX_CHAR_BUF 144 //Max size (for WFIFOHEAD calls) int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { unsigned short offset = 0; @@ -1894,6 +1894,18 @@ WBUFL(buf,124) = TOL(p->delete_date); offset += 4; #endif +#if PACKETVER >= 20110111 + WBUFL(buf,128) = 0; // robe sprite id + offset += 4; +#endif +#if PACKETVER >= 20111019 + WBUFL(buf,132) = 0; + offset += 4; +#endif +#if PACKETVER >= 20111021 + WBUFL(buf,136) = 0; + offset += 4; +#endif return 106+offset; } @@ -2208,6 +2220,15 @@ { // send characters to player mmo_char_send006b(i, sd); + #if PACKETVER >= 20110309 + WFIFOHEAD(i, 12); + WFIFOW(i, 0) = 0x08B9; + WFIFOW(i, 2) = 0; + WFIFOW(i, 4) = 0; + WFIFOL(i, 6) = sd->account_id; + WFIFOW(i, 10) = 0; + WFIFOSET(i, 12); + #endif } } RFIFOSKIP(fd,62); Index: src/char_sql/char.c =================================================================== --- src/char_sql/char.c (revision 658) +++ src/char_sql/char.c (working copy) @@ -1553,7 +1553,7 @@ // Writes char data to the buffer in the format used by the client. // Used in packets 0x6b (chars info) and 0x6d (new char info) // Returns the size -#define MAX_CHAR_BUF 132 //Max size (for WFIFOHEAD calls) +#define MAX_CHAR_BUF 144 //Max size (for WFIFOHEAD calls) int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { unsigned short offset = 0; @@ -1617,6 +1617,18 @@ WBUFL(buf,124) = TOL(p->delete_date); offset += 4; #endif +#if PACKETVER >= 20110111 + WBUFL(buf,128) = 0; // robe sprite id + offset += 4; +#endif +#if PACKETVER >= 20111019 + WBUFL(buf,132) = 0; + offset += 4; +#endif +#if PACKETVER >= 20111021 + WBUFL(buf,136) = 0; + offset += 4; +#endif return 106+offset; } @@ -1888,6 +1900,15 @@ { // send characters to player mmo_char_send006b(i, sd); + #if PACKETVER >= 20110309 + WFIFOHEAD(i, 12); + WFIFOW(i, 0) = 0x08B9; + WFIFOW(i, 2) = 0; + WFIFOW(i, 4) = 0; + WFIFOL(i, 6) = sd->account_id; + WFIFOW(i, 10) = 0; + WFIFOSET(i, 12); + #endif } } RFIFOSKIP(fd,62); Index: src/common/mmo.h =================================================================== --- src/common/mmo.h (revision 658) +++ src/common/mmo.h (working copy) @@ -44,10 +44,11 @@ // 20100721 - 2010-07-21aRagexeRE+ - 0x6b, 0x6d // 20100727 - 2010-07-27aRagexeRE+ - 0x6b, 0x6d // 20100803 - 2010-08-03aRagexeRE+ - 0x6b, 0x6d, 0x827, 0x828, 0x829, 0x82a, 0x82b, 0x82c, 0x842, 0x843 +// 20110111 - 2011-01-11aRagexeRE+ - 0x6b, 0x6d #ifndef PACKETVER //#define PACKETVER 20081126 - #define PACKETVER 20100629 + #define PACKETVER 20111122 #endif // backward compatible PACKETVER 8 and 9 #if PACKETVER == 8 Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 658) +++ src/map/clif.c (working copy) @@ -821,13 +821,19 @@ WBUFW(buf,0) = spawn?0x22b:0x22a; #elif PACKETVER < 20091103 WBUFW(buf,0) = spawn?0x2ed:0x2ee; +#elif PACKETVER < 20101124 + WBUFW(buf,0) = spawn?0x7f8:0x7f9; #else - WBUFW(buf,0) = spawn?0x7f8:0x7f9; + WBUFW(buf,0) = spawn?0x858:0x857; #endif #if PACKETVER >= 20091103 name = status_get_name(bl); +#if PACKETVER < 20110111 WBUFW(buf,2) = (spawn?62:63)+strlen(name); +#else + WBUFW(buf,2) = (spawn?64:65)+strlen(name); +#endif WBUFB(buf,4) = clif_bl_type(bl); offset+=3; buf = WBUFP(buffer,offset); @@ -901,6 +907,11 @@ return packet_len(0x7c); } #endif +#if PACKETVER >= 20110111 + WBUFW(buf,34) = 0; + offset+= 2; + buf = WBUFP(buffer,offset); +#endif WBUFL(buf,34) = status_get_guild_id(bl); WBUFW(buf,38) = status_get_emblem_id(bl); WBUFW(buf,40) = (sd)? sd->status.manner : 0; @@ -970,13 +981,19 @@ WBUFW(buf, 0) = 0x22c; #elif PACKETVER < 20091103 WBUFW(buf, 0) = 0x2ec; +#elif PACKETVER < 20101124 + WBUFW(buf, 0) = 0x7f7; #else - WBUFW(buf, 0) = 0x7f7; + WBUFW(buf, 0) = 0x856; #endif #if PACKETVER >= 20091103 name = status_get_name(bl); +#if PACKETVER < 20110111 WBUFW(buf, 2) = 69+strlen(name); +#else + WBUFW(buf, 2) = 71+strlen(name); +#endif offset+=2; buf = WBUFP(buffer,offset); #endif @@ -1013,6 +1030,11 @@ WBUFW(buf,32) = vd->hair_color; WBUFW(buf,34) = vd->cloth_color; WBUFW(buf,36) = (sd)? sd->head_dir : 0; + #if PACKETVER >= 20110111 + WBUFW(buf,38) = 0; + offset+= 2; + buf = WBUFP(buffer,offset); + #endif WBUFL(buf,38) = status_get_guild_id(bl); WBUFW(buf,42) = status_get_emblem_id(bl); WBUFW(buf,44) = (sd)? sd->status.manner : 0; @@ -1172,6 +1194,8 @@ clif_sendbgemblem_area(sd); if( sd->sc.count && sd->sc.data[sC_BANDING] ) clif_status_change(&sd->bl,SI_BANDING,1,9999,sd->sc.data[sC_BANDING]->val1,0,0); + if( sd->sc.count && sd->sc.data[sC_ALL_RIDING] ) + clif_status_change(&sd->bl,SI_ALL_RIDING,1,9999,sd->sc.data[sC_ALL_RIDING]->val1,sd->sc.data[sC_ALL_RIDING]->val2,0); } break; case BL_MOB: @@ -3909,7 +3933,9 @@ if( tsd->state.bg_id && map[tsd->bl.m].flag.battleground ) clif_sendbgemblem_single(sd->fd,tsd); if( tsd->sc.count && tsd->sc.data[sC_BANDING] ) - clif_display_banding(&sd->bl,&tsd->bl,tsd->sc.data[sC_BANDING]->val1); + clif_status_change_single(&sd->bl,&tsd->bl,SI_BANDING,1,9999,tsd->sc.data[sC_BANDING]->val1,tsd->sc.data[sC_BANDING]->val2,tsd->sc.data[sC_BANDING]->val3); + if( tsd->sc.count && tsd->sc.data[sC_ALL_RIDING] ) + clif_status_change_single(&sd->bl,&tsd->bl,SI_ALL_RIDING,1,9999,tsd->sc.data[sC_ALL_RIDING]->val1,tsd->sc.data[sC_ALL_RIDING]->val2,0); } break; case BL_MER: // Devotion Effects @@ -5230,29 +5256,30 @@ /*========================================== - * Display Banding when someone under this - * status change walk into your view range. + * Display a status change when someone + * under this status change walk into your + * view range. *------------------------------------------*/ -void clif_display_banding(struct block_list *dst, struct block_list *bl, int val1) +void clif_status_change_single(struct block_list *dst, struct block_list *bl, int type, int flag, unsigned int tick, int val1, int val2, int val3) { unsigned char buf[32]; nullpo_retv(bl); nullpo_retv(dst); - if( battle_config.display_status_timers ) + if( flag && battle_config.display_status_timers ) WBUFW(buf, 0) = 0x043f; else WBUFW(buf, 0)= 0x0196; - WBUFW(buf, 2) = SI_BANDING; + WBUFW(buf, 2) = type; WBUFL(buf, 4) = bl->id; - WBUFB(buf, 8) = 1; - if( battle_config.display_status_timers ) + WBUFB(buf, 8) = flag; + if( flag && battle_config.display_status_timers ) { - WBUFL(buf, 9) = 0; + WBUFL(buf, 9) = tick; WBUFL(buf,13) = val1; - WBUFL(buf,17) = 0; - WBUFL(buf,21) = 0; + WBUFL(buf,17) = val2; + WBUFL(buf,21) = val3; } clif_send(buf,packet_len(WBUFW(buf,0)),dst,SELF); } @@ -5369,11 +5396,7 @@ { unsigned char *buf = (unsigned char*)aMallocA((16 + len)*sizeof(unsigned char)); -#if PACKETVER < 20080820 WBUFW(buf,0) = 0x1c3; -#else - WBUFW(buf,0) = 0x40c; -#endif WBUFW(buf, 2) = len + 16; WBUFL(buf, 4) = fontColor; WBUFW(buf, 8) = fontType; @@ -8439,15 +8462,15 @@ WFIFOSET(fd, packet_len(0x2da)); } -/*========================================== - * Sends info about a player's equipped items - * R 002d7 <length>.W <name>.24B <class>.w <hairstyle>.w <up-viewid>.w <mid-viewid>.w <low-viewid>.w <haircolo.w <cloth-dye>.w <gende.1B {equip item}.26B* - * for PACKETVER >= 20100629 - * R 002d7 <length>.W <name>.24B <class>.w <hairstyle>.w <bottom-viewid>.w <mid-viewid>.w <up-viewid>.w <haircolo.w <cloth-dye>.w <gende.1B {equip item}.28B* - *------------------------------------------*/ +/// Sends info about a player's equipped items (ZC_EQUIPWIN_MICROSCOPE) +/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <up-viewid>.W <mid-viewid>.W <low-viewid>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.26B* +/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.28B* (PACKETVER >= 20100629) +/// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.28B* (PACKETVER >= 20101124) +/// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.28B* (PACKETVER >= 20110111) void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* tsd) { - int i, n, fd; + uint8* buf; + int i, n, fd, offset = 0; #if PACKETVER < 20100629 const int s = 26; #else @@ -8458,17 +8481,27 @@ fd = sd->fd; WFIFOHEAD(fd, MAX_INVENTORY * s + 43); + buf = WFIFOP(fd,0); - WFIFOW(fd, 0) = 0x2d7; - safestrncpy((char*)WFIFOP(fd, 4), tsd->status.name, NAME_LENGTH); - WFIFOW(fd,28) = tsd->status.class_; - WFIFOW(fd,30) = tsd->vd.hair_style; - WFIFOW(fd,32) = tsd->vd.head_bottom; - WFIFOW(fd,34) = tsd->vd.head_mid; - WFIFOW(fd,36) = tsd->vd.head_top; - WFIFOW(fd,38) = tsd->vd.hair_color; - WFIFOW(fd,40) = tsd->vd.cloth_color; - WFIFOB(fd,42) = tsd->vd.sex; +#if PACKETVER < 20101124 + WBUFW(buf, 0) = 0x2d7; +#else + WBUFW(buf, 0) = 0x859; +#endif + safestrncpy((char*)WBUFP(buf, 4), tsd->status.name, NAME_LENGTH); + WBUFW(buf,28) = tsd->status.class_; + WBUFW(buf,30) = tsd->vd.hair_style; + WBUFW(buf,32) = tsd->vd.head_bottom; + WBUFW(buf,34) = tsd->vd.head_mid; + WBUFW(buf,36) = tsd->vd.head_top; +#if PACKETVER >= 20110111 + WBUFW(buf,38) = 0; + offset+= 2; + buf = WBUFP(buf,2); +#endif + WBUFW(buf,38) = tsd->vd.hair_color; + WBUFW(buf,40) = tsd->vd.cloth_color; + WBUFB(buf,42) = tsd->vd.sex; for(i=0,n=0; i < MAX_INVENTORY; i++) { @@ -8478,24 +8511,24 @@ continue; // Inventory position - WFIFOW(fd, n*s+43) = i + 2; + WBUFW(buf, n*s+43) = i + 2; // Add refine, identify flag, element, etc. - clif_item_sub(WFIFOP(fd,0), n*s+45, &tsd->status.inventory[i], tsd->inventory_data[i], pc_equippoint(tsd, i)); + clif_item_sub(WBUFP(buf,0), n*s+45, &tsd->status.inventory[i], tsd->inventory_data[i], pc_equippoint(tsd, i)); // Add cards - clif_addcards(WFIFOP(fd, n*s+55), &tsd->status.inventory[i]); + clif_addcards(WBUFP(buf, n*s+55), &tsd->status.inventory[i]); // Expiration date stuff, if all of those are set to 0 then the client doesn't show anything related (6 bytes) - WFIFOL(fd, n*s+63) = tsd->status.inventory[i].expire_time; - WFIFOW(fd, n*s+67) = 0; + WBUFL(buf, n*s+63) = tsd->status.inventory[i].expire_time; + WBUFW(buf, n*s+67) = 0; #if PACKETVER >= 20100629 if (tsd->inventory_data[i]->equip&EQP_HELM) - WFIFOW(fd, n*s+69) = tsd->inventory_data[i]->look; + WBUFW(buf, n*s+69) = tsd->inventory_data[i]->look; else - WFIFOW(fd, n*s+69) = 0; + WBUFW(buf, n*s+69) = 0; #endif n++; } - WFIFOW(fd, 2) = 43 + n*s; // Set length + WFIFOW(fd, 2) = 43+offset+n*s; // Set length WFIFOSET(fd, WFIFOW(fd, 2)); } @@ -9467,6 +9500,9 @@ (sd->sc.data[sC_VOICEOFSIREN] && sd->sc.data[sC_VOICEOFSIREN]->val2 == target_id) ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) { if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) { clif_skill_fail(sd, 1, 4, 0, 0); @@ -10400,6 +10436,9 @@ if( sd->sc.data[sC__MANHOLE] ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if( sd->menuskill_id ) { if( sd->menuskill_id == SA_TAMINGMONSTER ) @@ -10493,6 +10532,9 @@ if( sd->sc.data[sC__MANHOLE] ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if( sd->menuskill_id ) { if( sd->menuskill_id == SA_TAMINGMONSTER ) @@ -10567,6 +10609,9 @@ if( sd->sc.data[sC__MANHOLE] ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if( pc_cant_act(sd) ) { sd->menuskill_id = sd->menuskill_val = 0; @@ -15610,6 +15655,11 @@ 3, -1, 8, -1, 86, 2, 6, 6, -1, -1, 4, 10, 10, 22, 8, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 3, 2, 66, 5, 2, 12, 6, 0, 0, + //#0x0840 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, -1, -1, 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, }; struct { void (*func)(int, struct map_session_data *); Index: src/map/clif.h =================================================================== --- src/map/clif.h (revision 658) +++ src/map/clif.h (working copy) @@ -29,7 +29,7 @@ #include <stdarg.h> // packet DB #define MAX_PACKET_DB 0x900 -#define MAX_PACKET_VER 25 +#define MAX_PACKET_VER 28 struct s_packet_db { short len; @@ -637,7 +637,7 @@ void clif_equip_damaged(struct map_session_data *sd, int equip_index); void clif_millenniumshield(struct map_session_data *sd, short shields ); -void clif_display_banding(struct block_list *dst, struct block_list *bl, int val1); +void clif_status_change_single(struct block_list *dst, struct block_list *bl, int type, int flag, unsigned int tick, int val1, int val2, int val3); // Elementals void clif_elemental_info(struct map_session_data *sd); Index: src/map/itemdb.h =================================================================== --- src/map/itemdb.h (revision 658) +++ src/map/itemdb.h (working copy) @@ -28,6 +28,7 @@ #define ITEMID_MAKEUPBRUSH 6121 #define ITEMID_PAINTBRUSH 6122 #define ITEMID_SURFACEPAINTS 6123 +#define ITEMID_REINS 12622 //The only item group required by the code to be known. See const.txt for the full list. #define IG_FINDINGORE 6 Index: src/map/pc.c =================================================================== --- src/map/pc.c (revision 658) +++ src/map/pc.c (working copy) @@ -559,7 +559,9 @@ if( sd->status.inventory[i].expire_time <= time(NULL) ) { clif_rental_expired(sd->fd, sd->status.inventory[i].nameid); - pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0); + if( sd->status.inventory[i].nameid == ITEMID_REINS ) + status_change_end(&sd->bl, SC_ALL_RIDING, -1); + pc_delitem(sd, i, sd->status.inventory[i].amount, 1, 0); } else { @@ -4090,7 +4092,7 @@ clif_useitemack(sd,n,amount,1); else { - if( sd->status.inventory[n].expire_time == 0 ) + if( sd->status.inventory[n].expire_time == 0 && nameid != ITEMID_REINS ) { clif_useitemack(sd,n,amount-1,1); @@ -7226,6 +7228,9 @@ nullpo_ret(sd); p_type = sd->sc.option; + if( (p_type&(OPTION_RIDING|OPTION_RIDING_DRAGON|OPTION_RIDING_WUG|OPTION_MADO)) && sd->sc.data[sC_ALL_RIDING] ) + return 0; // Already mounted. + if( p_type&OPTION_MADO && p_type&OPTION_CART) // Don't remove cart when you're removing your mado. type |= (p_type&OPTION_CART); Index: src/map/status.c =================================================================== --- src/map/status.c (revision 658) +++ src/map/status.c (working copy) @@ -759,6 +759,8 @@ StatusIconChangeTable[sC_CURSED_SOIL] = SI_CURSED_SOIL; StatusIconChangeTable[sC_UPHEAVAL] = SI_UPHEAVAL; + StatusIconChangeTable[sC_ALL_RIDING] = SI_ALL_RIDING; + //Other SC which are not necessarily associated to skills. StatusChangeFlagTable[sC_ASPDPOTION0] = SCB_ASPD; StatusChangeFlagTable[sC_ASPDPOTION1] = SCB_ASPD; @@ -853,6 +855,8 @@ StatusChangeFlagTable[sC_VITATA_500] |= SCB_REGEN; StatusChangeFlagTable[sC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD; + StatusChangeFlagTable[sC_ALL_RIDING] |= SCB_SPEED; + if( !battle_config.display_hallucination ) //Disable Hallucination. StatusIconChangeTable[sC_HALLUCINATION] = SI_BLANK; } @@ -4701,6 +4705,8 @@ val = max( val, sc->data[sC_GT_REVITALIZE]->val2 ); if( sc->data[sC_WIND_STEP_OPTION] ) val = max( val, sc->data[sC_WIND_STEP_OPTION]->val2 ); + if( sc->data[sC_ALL_RIDING] ) + val = max( val, sc->data[sC_ALL_RIDING]->val2 ); //FIXME: official items use a single bonus for this [ultramage] if( sc->data[sC_SPEEDUP0] ) // temporary item-based speedup @@ -6354,6 +6360,15 @@ status_change_end(bl, SC_GT_ENERGYGAIN, INVALID_TIMER); status_change_end(bl, SC_GT_CHANGE, INVALID_TIMER); break; + case SC_ALL_RIDING: + if( !sd || pc_isriding(sd,OPTION_RIDING|OPTION_RIDING_DRAGON|OPTION_RIDING_WUG|OPTION_MADO) ) + return 0; + if( sc->data[type] ) + { // Already mounted, just dismount. + status_change_end(bl, SC_ALL_RIDING, -1); + return 0; + } + break; } //Check for overlapping fails Index: src/map/status.h =================================================================== --- src/map/status.h (revision 658) +++ src/map/status.h (working copy) @@ -575,6 +575,8 @@ SC_ROCK_CRUSHER, SC_ROCK_CRUSHER_ATK, + SC_ALL_RIDING, + SC_JYUMONJIKIRI = 780, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. @@ -1196,7 +1198,7 @@ // SI_SPIRITS_SAVEINFO2 = 610, // SI_MAGIC_CANDY = 611, // SI_SEARCH_STORE_INFO = 612, -// SI_ALL_RIDING = 613, + SI_ALL_RIDING = 613, // SI_ALL_RIDING_REUSE_LIMIT = 614, // SI_MACRO = 615, // SI_MACRO_POSTDELAY = 616, Edited April 17, 2012 by Kanage Quote Link to comment Share on other sites More sharing options...
chronick Posted May 2, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 04/20/12 Last Seen: May 3, 2012 Share Posted May 2, 2012 3Ceam mounts with packets version 26-28 Index: db/const.txt =================================================================== --- db/const.txt (revision 658) +++ db/const.txt (working copy) @@ -1230,6 +1230,7 @@ SC_TIDAL_WEAPON_OPTION 764 SC_ROCK_CRUSHER 765 SC_ROCK_CRUSHER_ATK 766 +SC_ALL_RIDING 767 e_gasp 0 e_what 1 Index: db/item_db2.txt =================================================================== --- db/item_db2.txt (revision 658) +++ db/item_db2.txt (working copy) @@ -407,3 +407,6 @@ // Purchase Shop Items //6377,Buy_Stall_Permit,Buy Stall Permit,3,200,,10,,,,,,,,,,,,,{},{},{} //12548,Buy_Shabby_Stall_Permit,Buy Shabby Stall Permit,11,500,,10,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "ALL_BUYING_STORE",1; },{},{} + +// Reins +12622,Reins_Of_Mounts,Reins Of Mounts,2,500,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ALL_RIDING,-1,1; },{},{} No newline at end of file Index: db/packet_db.txt =================================================================== --- db/packet_db.txt (revision 658) +++ db/packet_db.txt (working copy) @@ -56,7 +56,7 @@ 0x008c,-1,globalmessage,2:4 0x008d,-1 0x008e,-1 -//0x008f,-1 +//0x008f,0 0x0090,7,npcclicked,2 0x0091,22 0x0092,28 @@ -86,7 +86,7 @@ 0x00aa,7 0x00ab,4,unequipitem,2 0x00ac,7 -//0x00ad,-1 +//0x00ad,0 0x00ae,-1 0x00af,6 0x00b0,8 @@ -303,7 +303,7 @@ 0x0183,10,guilddelalliance,2:6 0x0184,10 0x0185,34 -//0x0186,-1 +//0x0186,0 0x0187,6 0x0188,8 0x0189,4 @@ -371,7 +371,7 @@ 0x01c7,2 0x01c8,13 0x01c9,97 -//0x01ca,-1 +//0x01ca,0 0x01cb,9 0x01cc,9 0x01cd,30 @@ -436,8 +436,8 @@ 0x0208,11,friendslistreply,2:6:10 0x0209,36 0x020a,10 -//0x020b,-1 -//0x020c,-1 +//0x020b,0 +//0x020c,0 0x020d,-1 //2004-07-05aSakexe @@ -733,7 +733,7 @@ 0x0113,33,useskilltopos,12:15:18:31 0x0116,12,dropitem,3:10 0x0190,24,actionrequest,11:23 -0x0216,-1 +0x0216,0 0x023d,-1 0x023e,4 @@ -767,7 +767,7 @@ 0x0248,68 0x0249,3 0x024a,70 -0x024b,4,auctioncancelreg,0 +0x024b,4,auctioncancelreg,2 0x024c,8,auctionsetitem,0 0x024d,14 0x024e,6,auctioncancel,0 @@ -799,7 +799,7 @@ 0x0251,4 //2005-08-08aSakexe -0x024d,12,auctionregister,0 +0x024d,12,auctionregister,2:6:10 0x024e,4 //2005-08-17aSakexe @@ -810,7 +810,7 @@ 0x0240,-1 0x0248,-1,mailsend,2:4:28:68 0x0255,5 -0x0256,-1 +0x0256,0 0x0257,8 //2005-09-12bSakexe @@ -830,7 +830,7 @@ //2005-10-17aSakexe 0x007a,58 -0x025d,6,auctionclose,0 +0x025d,6,auctionclose,2 0x025e,4 //2005-10-24aSakexe @@ -933,8 +933,8 @@ 0x029d,-1 0x029e,11 0x029f,3,mermenu,0 -0x02a0,-1 -0x02a1,-1 +0x02a0,0 +0x02a1,0 0x02a2,8 //2007-01-08aSakexe @@ -961,8 +961,8 @@ //2007-01-29aSakexe 0x029b,72 -0x02a3,-1 -0x02a4,-1 +0x02a3,0 +0x02a4,0 0x02a5,8 // 2007-02-05aSakexe @@ -1082,8 +1082,8 @@ 0x02ef,8 //2008-03-18aSakexe -0x02bf,-1 -0x02c0,-1 +0x02bf,0 +0x02c0,0 0x02f0,10 0x02f1,2,progressbar,0 0x02f2,2 @@ -1408,7 +1408,7 @@ //2009-09-29aRagexeRE //0x07ea,2 -//0x07eb,-1 +//0x07eb,0 //0x07ec,6 //0x07ed,8 //0x07ee,6 @@ -1586,5 +1586,82 @@ 0x0842,6,recall2,2 0x0843,6,remove2,2 +//2010-11-24aRagexeRE +packet_ver: 26 +0x0436,19,wanttoconnection,2:6:10:14:18 +0x035f,5,walktoxy,2 +0x0360,6,ticksend,2 +0x0361,5,changedir,2:4 +0x0362,6,takeitem,2 +0x0363,6,dropitem,2:4 +0x0364,8,movetokafra,2:4 +0x0365,8,movefromkafra,2:4 +0x0366,10,useskilltopos,2:4:6:8 +0x0367,90,useskilltoposinfo,2:4:6:8:10 +0x0368,6,getcharnamerequest,2 +0x0369,6,solvecharname,2 +0x0856,-1 +0x0857,-1 +0x0858,-1 +0x0859,-1 + //Add new packets here -//packet_ver: 26 +packet_ver: 27 +0x022d,19,wanttoconnection,2:6:10:14:18 +0x0437,5,walktoxy,2 +0x035f,6,ticksend,2 +0x0893,5,changedir,2:4 +0x07e4,6,takeitem,2 +0x0362,6,dropitem,2:4 +0x07ec,8,movetokafra,2:4 +0x0364,8,movefromkafra,2:4 +0x0202,10,useskilltopos,2:4:6:8 +0x0366,90,useskilltoposinfo,2:4:6:8:10 +0x08ad,6,getcharnamerequest,2 +0x0368,6,solvecharname,2 +0x0369,7,actionrequest,2:6 +0x083c,10,useskilltoid,2:4:6 + +// Unknown +//0x08C7,-1 +//0x08C8,34 +//0x08C9,2 +//0x08CA,-1 +//0x08CB,-1 +//0x08CC,109 +//0x08CD,2 +//0x08CE,10 +//0x08CF,9 +//0x08D0,7 +//0x08D1,10 +//0x08D2,10 +//0x08D3,14 +//0x08D4,-1 + +packet_ver: 28 + +//2011-11-02 +//0x083c,19,wanttoconnection,2:6:10:14:18 +//0x088a,6,getcharnamerequest,2 +//0x0817,6,ticksend,2 +//0x0366,5,changedir,2:4 +//0x0364,5,walktoxy,2 +//0x08aa,7,actionrequest,2:6 +//0x02c4,10,useskilltoid,2:4:6 +//0x0369,10,useskilltopos,2:4:6:8 +//0x08ad,90,useskilltoposinfo,2:4:6:8:10 +//0x0885,6,dropitem,2:4 +//0x0815,6,takeitem,2 + +//2011-11-22 +0x0835,19,wanttoconnection,2:6:10:14:18 +0x0898,6,getcharnamerequest,2 +0x0899,6,ticksend,2 +0x0896,5,changedir,2:4 +0x0892,5,walktoxy,2 +0x022d,7,actionrequest,2:6 +0x08a1,10,useskilltoid,2:4:6 +0x08ad,10,useskilltopos,2:4:6:8 +0x0363,90,useskilltoposinfo,2:4:6:8:10 +0x0436,6,dropitem,2:4 +0x0893,6,takeitem,2 Index: src/char/char.c =================================================================== --- src/char/char.c (revision 658) +++ src/char/char.c (working copy) @@ -1830,7 +1830,7 @@ // Writes char data to the buffer in the format used by the client. // Used in packets 0x6b (chars info) and 0x6d (new char info) // Returns the size -#define MAX_CHAR_BUF 132 //Max size (for WFIFOHEAD calls) +#define MAX_CHAR_BUF 144 //Max size (for WFIFOHEAD calls) int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { unsigned short offset = 0; @@ -1894,6 +1894,18 @@ WBUFL(buf,124) = TOL(p->delete_date); offset += 4; #endif +#if PACKETVER >= 20110111 + WBUFL(buf,128) = 0; // robe sprite id + offset += 4; +#endif +#if PACKETVER >= 20111019 + WBUFL(buf,132) = 0; + offset += 4; +#endif +#if PACKETVER >= 20111021 + WBUFL(buf,136) = 0; + offset += 4; +#endif return 106+offset; } @@ -2208,6 +2220,15 @@ { // send characters to player mmo_char_send006b(i, sd); + #if PACKETVER >= 20110309 + WFIFOHEAD(i, 12); + WFIFOW(i, 0) = 0x08B9; + WFIFOW(i, 2) = 0; + WFIFOW(i, 4) = 0; + WFIFOL(i, 6) = sd->account_id; + WFIFOW(i, 10) = 0; + WFIFOSET(i, 12); + #endif } } RFIFOSKIP(fd,62); Index: src/char_sql/char.c =================================================================== --- src/char_sql/char.c (revision 658) +++ src/char_sql/char.c (working copy) @@ -1553,7 +1553,7 @@ // Writes char data to the buffer in the format used by the client. // Used in packets 0x6b (chars info) and 0x6d (new char info) // Returns the size -#define MAX_CHAR_BUF 132 //Max size (for WFIFOHEAD calls) +#define MAX_CHAR_BUF 144 //Max size (for WFIFOHEAD calls) int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { unsigned short offset = 0; @@ -1617,6 +1617,18 @@ WBUFL(buf,124) = TOL(p->delete_date); offset += 4; #endif +#if PACKETVER >= 20110111 + WBUFL(buf,128) = 0; // robe sprite id + offset += 4; +#endif +#if PACKETVER >= 20111019 + WBUFL(buf,132) = 0; + offset += 4; +#endif +#if PACKETVER >= 20111021 + WBUFL(buf,136) = 0; + offset += 4; +#endif return 106+offset; } @@ -1888,6 +1900,15 @@ { // send characters to player mmo_char_send006b(i, sd); + #if PACKETVER >= 20110309 + WFIFOHEAD(i, 12); + WFIFOW(i, 0) = 0x08B9; + WFIFOW(i, 2) = 0; + WFIFOW(i, 4) = 0; + WFIFOL(i, 6) = sd->account_id; + WFIFOW(i, 10) = 0; + WFIFOSET(i, 12); + #endif } } RFIFOSKIP(fd,62); Index: src/common/mmo.h =================================================================== --- src/common/mmo.h (revision 658) +++ src/common/mmo.h (working copy) @@ -44,10 +44,11 @@ // 20100721 - 2010-07-21aRagexeRE+ - 0x6b, 0x6d // 20100727 - 2010-07-27aRagexeRE+ - 0x6b, 0x6d // 20100803 - 2010-08-03aRagexeRE+ - 0x6b, 0x6d, 0x827, 0x828, 0x829, 0x82a, 0x82b, 0x82c, 0x842, 0x843 +// 20110111 - 2011-01-11aRagexeRE+ - 0x6b, 0x6d #ifndef PACKETVER //#define PACKETVER 20081126 - #define PACKETVER 20100629 + #define PACKETVER 20111122 #endif // backward compatible PACKETVER 8 and 9 #if PACKETVER == 8 Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 658) +++ src/map/clif.c (working copy) @@ -821,13 +821,19 @@ WBUFW(buf,0) = spawn?0x22b:0x22a; #elif PACKETVER < 20091103 WBUFW(buf,0) = spawn?0x2ed:0x2ee; +#elif PACKETVER < 20101124 + WBUFW(buf,0) = spawn?0x7f8:0x7f9; #else - WBUFW(buf,0) = spawn?0x7f8:0x7f9; + WBUFW(buf,0) = spawn?0x858:0x857; #endif #if PACKETVER >= 20091103 name = status_get_name(bl); +#if PACKETVER < 20110111 WBUFW(buf,2) = (spawn?62:63)+strlen(name); +#else + WBUFW(buf,2) = (spawn?64:65)+strlen(name); +#endif WBUFB(buf,4) = clif_bl_type(bl); offset+=3; buf = WBUFP(buffer,offset); @@ -901,6 +907,11 @@ return packet_len(0x7c); } #endif +#if PACKETVER >= 20110111 + WBUFW(buf,34) = 0; + offset+= 2; + buf = WBUFP(buffer,offset); +#endif WBUFL(buf,34) = status_get_guild_id(bl); WBUFW(buf,38) = status_get_emblem_id(bl); WBUFW(buf,40) = (sd)? sd->status.manner : 0; @@ -970,13 +981,19 @@ WBUFW(buf, 0) = 0x22c; #elif PACKETVER < 20091103 WBUFW(buf, 0) = 0x2ec; +#elif PACKETVER < 20101124 + WBUFW(buf, 0) = 0x7f7; #else - WBUFW(buf, 0) = 0x7f7; + WBUFW(buf, 0) = 0x856; #endif #if PACKETVER >= 20091103 name = status_get_name(bl); +#if PACKETVER < 20110111 WBUFW(buf, 2) = 69+strlen(name); +#else + WBUFW(buf, 2) = 71+strlen(name); +#endif offset+=2; buf = WBUFP(buffer,offset); #endif @@ -1013,6 +1030,11 @@ WBUFW(buf,32) = vd->hair_color; WBUFW(buf,34) = vd->cloth_color; WBUFW(buf,36) = (sd)? sd->head_dir : 0; + #if PACKETVER >= 20110111 + WBUFW(buf,38) = 0; + offset+= 2; + buf = WBUFP(buffer,offset); + #endif WBUFL(buf,38) = status_get_guild_id(bl); WBUFW(buf,42) = status_get_emblem_id(bl); WBUFW(buf,44) = (sd)? sd->status.manner : 0; @@ -1172,6 +1194,8 @@ clif_sendbgemblem_area(sd); if( sd->sc.count && sd->sc.data[sC_BANDING] ) clif_status_change(&sd->bl,SI_BANDING,1,9999,sd->sc.data[sC_BANDING]->val1,0,0); + if( sd->sc.count && sd->sc.data[sC_ALL_RIDING] ) + clif_status_change(&sd->bl,SI_ALL_RIDING,1,9999,sd->sc.data[sC_ALL_RIDING]->val1,sd->sc.data[sC_ALL_RIDING]->val2,0); } break; case BL_MOB: @@ -3909,7 +3933,9 @@ if( tsd->state.bg_id && map[tsd->bl.m].flag.battleground ) clif_sendbgemblem_single(sd->fd,tsd); if( tsd->sc.count && tsd->sc.data[sC_BANDING] ) - clif_display_banding(&sd->bl,&tsd->bl,tsd->sc.data[sC_BANDING]->val1); + clif_status_change_single(&sd->bl,&tsd->bl,SI_BANDING,1,9999,tsd->sc.data[sC_BANDING]->val1,tsd->sc.data[sC_BANDING]->val2,tsd->sc.data[sC_BANDING]->val3); + if( tsd->sc.count && tsd->sc.data[sC_ALL_RIDING] ) + clif_status_change_single(&sd->bl,&tsd->bl,SI_ALL_RIDING,1,9999,tsd->sc.data[sC_ALL_RIDING]->val1,tsd->sc.data[sC_ALL_RIDING]->val2,0); } break; case BL_MER: // Devotion Effects @@ -5230,29 +5256,30 @@ /*========================================== - * Display Banding when someone under this - * status change walk into your view range. + * Display a status change when someone + * under this status change walk into your + * view range. *------------------------------------------*/ -void clif_display_banding(struct block_list *dst, struct block_list *bl, int val1) +void clif_status_change_single(struct block_list *dst, struct block_list *bl, int type, int flag, unsigned int tick, int val1, int val2, int val3) { unsigned char buf[32]; nullpo_retv(bl); nullpo_retv(dst); - if( battle_config.display_status_timers ) + if( flag && battle_config.display_status_timers ) WBUFW(buf, 0) = 0x043f; else WBUFW(buf, 0)= 0x0196; - WBUFW(buf, 2) = SI_BANDING; + WBUFW(buf, 2) = type; WBUFL(buf, 4) = bl->id; - WBUFB(buf, 8) = 1; - if( battle_config.display_status_timers ) + WBUFB(buf, 8) = flag; + if( flag && battle_config.display_status_timers ) { - WBUFL(buf, 9) = 0; + WBUFL(buf, 9) = tick; WBUFL(buf,13) = val1; - WBUFL(buf,17) = 0; - WBUFL(buf,21) = 0; + WBUFL(buf,17) = val2; + WBUFL(buf,21) = val3; } clif_send(buf,packet_len(WBUFW(buf,0)),dst,SELF); } @@ -5369,11 +5396,7 @@ { unsigned char *buf = (unsigned char*)aMallocA((16 + len)*sizeof(unsigned char)); -#if PACKETVER < 20080820 WBUFW(buf,0) = 0x1c3; -#else - WBUFW(buf,0) = 0x40c; -#endif WBUFW(buf, 2) = len + 16; WBUFL(buf, 4) = fontColor; WBUFW(buf, 8) = fontType; @@ -8439,15 +8462,15 @@ WFIFOSET(fd, packet_len(0x2da)); } -/*========================================== - * Sends info about a player's equipped items - * R 002d7 <length>.W <name>.24B <class>.w <hairstyle>.w <up-viewid>.w <mid-viewid>.w <low-viewid>.w <haircolo.w <cloth-dye>.w <gende.1B {equip item}.26B* - * for PACKETVER >= 20100629 - * R 002d7 <length>.W <name>.24B <class>.w <hairstyle>.w <bottom-viewid>.w <mid-viewid>.w <up-viewid>.w <haircolo.w <cloth-dye>.w <gende.1B {equip item}.28B* - *------------------------------------------*/ +/// Sends info about a player's equipped items (ZC_EQUIPWIN_MICROSCOPE) +/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <up-viewid>.W <mid-viewid>.W <low-viewid>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.26B* +/// 02d7 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.28B* (PACKETVER >= 20100629) +/// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.28B* (PACKETVER >= 20101124) +/// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolo.W <cloth-dye>.W <gende.B {equip item}.28B* (PACKETVER >= 20110111) void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* tsd) { - int i, n, fd; + uint8* buf; + int i, n, fd, offset = 0; #if PACKETVER < 20100629 const int s = 26; #else @@ -8458,17 +8481,27 @@ fd = sd->fd; WFIFOHEAD(fd, MAX_INVENTORY * s + 43); + buf = WFIFOP(fd,0); - WFIFOW(fd, 0) = 0x2d7; - safestrncpy((char*)WFIFOP(fd, 4), tsd->status.name, NAME_LENGTH); - WFIFOW(fd,28) = tsd->status.class_; - WFIFOW(fd,30) = tsd->vd.hair_style; - WFIFOW(fd,32) = tsd->vd.head_bottom; - WFIFOW(fd,34) = tsd->vd.head_mid; - WFIFOW(fd,36) = tsd->vd.head_top; - WFIFOW(fd,38) = tsd->vd.hair_color; - WFIFOW(fd,40) = tsd->vd.cloth_color; - WFIFOB(fd,42) = tsd->vd.sex; +#if PACKETVER < 20101124 + WBUFW(buf, 0) = 0x2d7; +#else + WBUFW(buf, 0) = 0x859; +#endif + safestrncpy((char*)WBUFP(buf, 4), tsd->status.name, NAME_LENGTH); + WBUFW(buf,28) = tsd->status.class_; + WBUFW(buf,30) = tsd->vd.hair_style; + WBUFW(buf,32) = tsd->vd.head_bottom; + WBUFW(buf,34) = tsd->vd.head_mid; + WBUFW(buf,36) = tsd->vd.head_top; +#if PACKETVER >= 20110111 + WBUFW(buf,38) = 0; + offset+= 2; + buf = WBUFP(buf,2); +#endif + WBUFW(buf,38) = tsd->vd.hair_color; + WBUFW(buf,40) = tsd->vd.cloth_color; + WBUFB(buf,42) = tsd->vd.sex; for(i=0,n=0; i < MAX_INVENTORY; i++) { @@ -8478,24 +8511,24 @@ continue; // Inventory position - WFIFOW(fd, n*s+43) = i + 2; + WBUFW(buf, n*s+43) = i + 2; // Add refine, identify flag, element, etc. - clif_item_sub(WFIFOP(fd,0), n*s+45, &tsd->status.inventory[i], tsd->inventory_data[i], pc_equippoint(tsd, i)); + clif_item_sub(WBUFP(buf,0), n*s+45, &tsd->status.inventory[i], tsd->inventory_data[i], pc_equippoint(tsd, i)); // Add cards - clif_addcards(WFIFOP(fd, n*s+55), &tsd->status.inventory[i]); + clif_addcards(WBUFP(buf, n*s+55), &tsd->status.inventory[i]); // Expiration date stuff, if all of those are set to 0 then the client doesn't show anything related (6 bytes) - WFIFOL(fd, n*s+63) = tsd->status.inventory[i].expire_time; - WFIFOW(fd, n*s+67) = 0; + WBUFL(buf, n*s+63) = tsd->status.inventory[i].expire_time; + WBUFW(buf, n*s+67) = 0; #if PACKETVER >= 20100629 if (tsd->inventory_data[i]->equip&EQP_HELM) - WFIFOW(fd, n*s+69) = tsd->inventory_data[i]->look; + WBUFW(buf, n*s+69) = tsd->inventory_data[i]->look; else - WFIFOW(fd, n*s+69) = 0; + WBUFW(buf, n*s+69) = 0; #endif n++; } - WFIFOW(fd, 2) = 43 + n*s; // Set length + WFIFOW(fd, 2) = 43+offset+n*s; // Set length WFIFOSET(fd, WFIFOW(fd, 2)); } @@ -9467,6 +9500,9 @@ (sd->sc.data[sC_VOICEOFSIREN] && sd->sc.data[sC_VOICEOFSIREN]->val2 == target_id) ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) { if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) { clif_skill_fail(sd, 1, 4, 0, 0); @@ -10400,6 +10436,9 @@ if( sd->sc.data[sC__MANHOLE] ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if( sd->menuskill_id ) { if( sd->menuskill_id == SA_TAMINGMONSTER ) @@ -10493,6 +10532,9 @@ if( sd->sc.data[sC__MANHOLE] ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if( sd->menuskill_id ) { if( sd->menuskill_id == SA_TAMINGMONSTER ) @@ -10567,6 +10609,9 @@ if( sd->sc.data[sC__MANHOLE] ) return; + if( sd->sc.data[sC_ALL_RIDING] ) + return; + if( pc_cant_act(sd) ) { sd->menuskill_id = sd->menuskill_val = 0; @@ -15610,6 +15655,11 @@ 3, -1, 8, -1, 86, 2, 6, 6, -1, -1, 4, 10, 10, 22, 8, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 3, 2, 66, 5, 2, 12, 6, 0, 0, + //#0x0840 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, -1, -1, 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, }; struct { void (*func)(int, struct map_session_data *); Index: src/map/clif.h =================================================================== --- src/map/clif.h (revision 658) +++ src/map/clif.h (working copy) @@ -29,7 +29,7 @@ #include <stdarg.h> // packet DB #define MAX_PACKET_DB 0x900 -#define MAX_PACKET_VER 25 +#define MAX_PACKET_VER 28 struct s_packet_db { short len; @@ -637,7 +637,7 @@ void clif_equip_damaged(struct map_session_data *sd, int equip_index); void clif_millenniumshield(struct map_session_data *sd, short shields ); -void clif_display_banding(struct block_list *dst, struct block_list *bl, int val1); +void clif_status_change_single(struct block_list *dst, struct block_list *bl, int type, int flag, unsigned int tick, int val1, int val2, int val3); // Elementals void clif_elemental_info(struct map_session_data *sd); Index: src/map/itemdb.h =================================================================== --- src/map/itemdb.h (revision 658) +++ src/map/itemdb.h (working copy) @@ -28,6 +28,7 @@ #define ITEMID_MAKEUPBRUSH 6121 #define ITEMID_PAINTBRUSH 6122 #define ITEMID_SURFACEPAINTS 6123 +#define ITEMID_REINS 12622 //The only item group required by the code to be known. See const.txt for the full list. #define IG_FINDINGORE 6 Index: src/map/pc.c =================================================================== --- src/map/pc.c (revision 658) +++ src/map/pc.c (working copy) @@ -559,7 +559,9 @@ if( sd->status.inventory[i].expire_time <= time(NULL) ) { clif_rental_expired(sd->fd, sd->status.inventory[i].nameid); - pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0); + if( sd->status.inventory[i].nameid == ITEMID_REINS ) + status_change_end(&sd->bl, SC_ALL_RIDING, -1); + pc_delitem(sd, i, sd->status.inventory[i].amount, 1, 0); } else { @@ -4090,7 +4092,7 @@ clif_useitemack(sd,n,amount,1); else { - if( sd->status.inventory[n].expire_time == 0 ) + if( sd->status.inventory[n].expire_time == 0 && nameid != ITEMID_REINS ) { clif_useitemack(sd,n,amount-1,1); @@ -7226,6 +7228,9 @@ nullpo_ret(sd); p_type = sd->sc.option; + if( (p_type&(OPTION_RIDING|OPTION_RIDING_DRAGON|OPTION_RIDING_WUG|OPTION_MADO)) && sd->sc.data[sC_ALL_RIDING] ) + return 0; // Already mounted. + if( p_type&OPTION_MADO && p_type&OPTION_CART) // Don't remove cart when you're removing your mado. type |= (p_type&OPTION_CART); Index: src/map/status.c =================================================================== --- src/map/status.c (revision 658) +++ src/map/status.c (working copy) @@ -759,6 +759,8 @@ StatusIconChangeTable[sC_CURSED_SOIL] = SI_CURSED_SOIL; StatusIconChangeTable[sC_UPHEAVAL] = SI_UPHEAVAL; + StatusIconChangeTable[sC_ALL_RIDING] = SI_ALL_RIDING; + //Other SC which are not necessarily associated to skills. StatusChangeFlagTable[sC_ASPDPOTION0] = SCB_ASPD; StatusChangeFlagTable[sC_ASPDPOTION1] = SCB_ASPD; @@ -853,6 +855,8 @@ StatusChangeFlagTable[sC_VITATA_500] |= SCB_REGEN; StatusChangeFlagTable[sC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD; + StatusChangeFlagTable[sC_ALL_RIDING] |= SCB_SPEED; + if( !battle_config.display_hallucination ) //Disable Hallucination. StatusIconChangeTable[sC_HALLUCINATION] = SI_BLANK; } @@ -4701,6 +4705,8 @@ val = max( val, sc->data[sC_GT_REVITALIZE]->val2 ); if( sc->data[sC_WIND_STEP_OPTION] ) val = max( val, sc->data[sC_WIND_STEP_OPTION]->val2 ); + if( sc->data[sC_ALL_RIDING] ) + val = max( val, sc->data[sC_ALL_RIDING]->val2 ); //FIXME: official items use a single bonus for this [ultramage] if( sc->data[sC_SPEEDUP0] ) // temporary item-based speedup @@ -6354,6 +6360,15 @@ status_change_end(bl, SC_GT_ENERGYGAIN, INVALID_TIMER); status_change_end(bl, SC_GT_CHANGE, INVALID_TIMER); break; + case SC_ALL_RIDING: + if( !sd || pc_isriding(sd,OPTION_RIDING|OPTION_RIDING_DRAGON|OPTION_RIDING_WUG|OPTION_MADO) ) + return 0; + if( sc->data[type] ) + { // Already mounted, just dismount. + status_change_end(bl, SC_ALL_RIDING, -1); + return 0; + } + break; } //Check for overlapping fails Index: src/map/status.h =================================================================== --- src/map/status.h (revision 658) +++ src/map/status.h (working copy) @@ -575,6 +575,8 @@ SC_ROCK_CRUSHER, SC_ROCK_CRUSHER_ATK, + SC_ALL_RIDING, + SC_JYUMONJIKIRI = 780, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. @@ -1196,7 +1198,7 @@ // SI_SPIRITS_SAVEINFO2 = 610, // SI_MAGIC_CANDY = 611, // SI_SEARCH_STORE_INFO = 612, -// SI_ALL_RIDING = 613, + SI_ALL_RIDING = 613, // SI_ALL_RIDING_REUSE_LIMIT = 614, // SI_MACRO = 615, // SI_MACRO_POSTDELAY = 616, where should I put this? Quote Link to comment Share on other sites More sharing options...
rkhin28 Posted May 10, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 45 Reputation: 1 Joined: 03/24/12 Last Seen: June 7, 2014 Share Posted May 10, 2012 Gumagana po ba to for rAthena or pwede niyo ba ibigay yung patch for rAthena Meron naman na yung Reins of Mounts ko sa item_db.txt pero still not working. Unknown Item siya :/ Quote Link to comment Share on other sites More sharing options...
konzen Posted May 22, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 02/04/12 Last Seen: November 24, 2016 Share Posted May 22, 2012 Gumagana po ba to for rAthena or pwede niyo ba ibigay yung patch for rAthena Meron naman na yung Reins of Mounts ko sa item_db.txt pero still not working. Unknown Item siya :/ tol patch mu lng ung RO mu hindi ata updated ung idnum tska ung iba png related s item n .txt s data folder mu Quote Link to comment Share on other sites More sharing options...
dennis259 Posted January 8, 2024 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 73 Reputation: 1 Joined: 07/18/13 Last Seen: Thursday at 01:47 PM Share Posted January 8, 2024 On 2/5/2012 at 5:48 PM, KeiKun said: lol Rein of Mounts at 3CeAM 12622,Reins_Of_Mounts,Reins Of Mounts,2,500,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ALL_RIDING,-1,1; },{},{} status_change_start: invalid status change 767 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.