diff --git a/db/packet_db.txt b/db/packet_db.txt index 8b8a0bfc4f..1a6cc2518b 100644 --- a/db/packet_db.txt +++ b/db/packet_db.txt @@ -1813,7 +1813,8 @@ packet_ver: 34 0x044A,6,clientversion,2 0x0844,2,cashshopopen,0 0x0848,-1,cashshopbuy,0 -0x084a,2,cashshopclose,00x084b,19 //fallitem4 +0x084a,2,cashshopclose,0 +0x084b,19 //fallitem4 0x085a,90,useskilltoposinfo,2:4:6:8:10 0x085d,18,bookingregreq,2:4 0x0868,-1,itemlistwindowselected,2:4:8 @@ -1862,5 +1863,66 @@ packet_ver: 34 0x099a,9 // take_off_equipv5 0x099b,8 //maptypeproperty2 -//Add new packets here -//packet_ver: 35 +//2013-05-15a Ragexe (Yommy) +packet_ver: 35 +0x0369,7,actionrequest,2:6 +0x083C,10,useskilltoid,2:4:6 +0x0437,5,walktoxy,2 +0x035F,6,ticksend,2 +0x0362,5,changedir,2:4 +0x08A1,6,takeitem,2 +0x0944,6,dropitem,2:4 +0x0887,8,movetokafra,2:4 +0x08AC,8,movefromkafra,2:4 +0x0438,10,useskilltopos,2:4:6:8 +0x0366,90,useskilltoposinfo,2:4:6:8:10 +0x096A,6,getcharnamerequest,2 +0x0368,6,solvecharname,2 +0x0838,12,searchstoreinfolistitemclick,2:6:10 +0x0835,2,searchstoreinfonextpage,0 +0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 +0x0811,-1,reqtradebuyingstore,2:4:8:12 +0x0360,6,reqclickbuyingstore,2 +0x0817,2,reqclosebuyingstore,0 +0x0815,-1,reqopenbuyingstore,2:4:8:9:89 +0x092D,18,bookingregreq,2:4 +//0x08AA,8 CZ_JOIN_BATTLE_FIELD +0x0963,-1,itemlistwindowselected,2:4:8 +0x0943,19,wanttoconnection,2:6:10:14:18 +0x0947,26,partyinvite2,2 +//0x0862,4 CZ_GANGSI_RANK +0x0962,26,friendslistadd,2 +0x0931,5,hommenu,2:4 +0x093E,36,storagepassword,0 + +//2013-05-22 Ragexe (Yommy) +packet_ver: 36 +0x08A2,7,actionrequest,2:6 +0x095C,10,useskilltoid,2:4:6 +0x0360,5,walktoxy,2 +0x07EC,6,ticksend,2 +0x0925,5,changedir,2:4 +0x095E,6,takeitem,2 +0x089C,6,dropitem,2:4 +0x08A3,8,movetokafra,2:4 +0x087E,8,movefromkafra,2:4 +0x0811,10,useskilltopos,2:4:6:8 +0x0964,90,useskilltoposinfo,2:4:6:8:10 +0x08A6,6,getcharnamerequest,2 +0x0369,6,solvecharname,2 +0x093E,12,searchstoreinfolistitemclick,2:6:10 +0x08AA,2,searchstoreinfonextpage,0 +0x095B,-1,searchstoreinfo,2:4:5:9:13:14:15 +0x0952,-1,reqtradebuyingstore,2:4:8:12 +0x0368,6,reqclickbuyingstore,2 +0x086E,2,reqclosebuyingstore,0 +0x0874,-1,reqopenbuyingstore,2:4:8:9:89 +0x089B,18,bookingregreq,2:4 +//0x0965,8 CZ_JOIN_BATTLE_FIELD +0x086A,-1,itemlistwindowselected,2:4:8 +0x08A9,19,wanttoconnection,2:6:10:14:18 +0x0950,26,partyinvite2,2 +//0x08AC,4 CZ_GANGSI_RANK +0x0362,26,friendslistadd,2 +0x0926,5,hommenu,2:4 +0x088E,36,storagepassword,0 diff --git a/src/char/char.c b/src/char/char.c index 2d782046c1..8372c98c77 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -252,7 +252,7 @@ static DBData create_online_char_data(DBKey key, va_list args) CREATE(character, struct online_char_data, 1); character->account_id = key.i; character->char_id = -1; - character->server = -1; + character->server = -1; character->fd = -1; character->waiting_disconnect = INVALID_TIMER; return db_ptr2data(character); @@ -1999,9 +1999,10 @@ void mmo_char_send(int fd, struct char_session_data* sd){ mmo_char_send082d(fd,sd); char_charlist_notify(fd,sd); char_block_character(fd,sd); -#else - mmo_char_send006b(fd,sd); #endif + //@FIXME dump from kro doesn't show 6b transmission + mmo_char_send006b(fd,sd); +//#endif } int char_married(int pl1, int pl2) @@ -4387,6 +4388,7 @@ int parse_char(int fd) break; case 0x9a1: + ShowInfo("We are here in 9a1\n"); if( RFIFOREST(fd) < 2 ) return 0; char_parse_req_charlist(fd,sd); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 8622fabc85..c756918bdf 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -60,8 +60,7 @@ static int guild_save_timer(int tid, unsigned int tick, int id, intptr_t data) { if( state == 0 && g->guild_id == last_id ) state++; //Save next guild in the list. - else - if( state == 1 && g->save_flag&GS_MASK ) + else if( state == 1 && g->save_flag&GS_MASK ) { inter_guild_tosql(g, g->save_flag&GS_MASK); g->save_flag &= ~GS_MASK; @@ -615,8 +614,8 @@ static bool exp_guild_parse_row(char* split[], int column, int current) int inter_guild_CharOnline(int char_id, int guild_id) { - struct guild *g; - int i; + struct guild *g; + int i; if (guild_id == -1) { //Get guild_id from the database diff --git a/src/common/mmo.h b/src/common/mmo.h index e704a8b561..29b9678251 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -47,8 +47,8 @@ // 20120307 - 2012-03-07aRagexeRE+ - 0x970 #ifndef PACKETVER - #define PACKETVER 20120410 - //#define PACKETVER 20130320 + //#define PACKETVER 20120410 + #define PACKETVER 20130320 //#define PACKETVER 20111116 #endif diff --git a/src/config/core.h b/src/config/core.h index 1e8ce9992a..5d8fceb7db 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -29,7 +29,7 @@ /// Uncomment to disable rAthena's anonymous stat report /// We kindly ask you to consider keeping it enabled, it helps us improve rAthena. -//#define STATS_OPT_OUT +//define STATS_OPT_OUT /// uncomment to enable query_sql script command and mysql logs to function on it's own thread /// be aware this feature is under tests and you should use at your own risk, we however diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 64a63b8aa5..41da3612c7 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3574,9 +3574,7 @@ ACMD_FUNC(partyrecall) * *------------------------------------------*/ void atcommand_doload(); -ACMD_FUNC(reload) -{ - +ACMD_FUNC(reload) { nullpo_retr(-1, sd); if ((strlen(command) < 8 ) && (!message || !*message)) { @@ -3662,7 +3660,7 @@ ACMD_FUNC(reload) || prev_config.base_exp_rate != battle_config.base_exp_rate || prev_config.job_exp_rate != battle_config.job_exp_rate ) - { // Exp or Drop rates changed. + { // Exp or Drop rates changed. mob_reload(); //Needed as well so rate changes take effect. chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common); } @@ -6726,8 +6724,11 @@ ACMD_FUNC(mobinfo) droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP - if( battle_config.atcommand_mobinfo_type ) + if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(sd, mob->lv, mob->status.race, mob->status.mode, 2) / 100; + if (droprate <= 0 && !battle_config.drop_rate0item) + droprate = 1; + } #endif if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100); @@ -8446,8 +8447,7 @@ static void atcommand_commands_sub(struct map_session_data* sd, const int fd, At slen = strlen(cmd->command); // flush the text buffer if this command won't fit into it - if ( slen + cur - line_buff >= CHATBOX_SIZE ) - { + if (slen + cur - line_buff >= CHATBOX_SIZE) { clif_displaymessage(fd,line_buff); cur = line_buff; memset(line_buff,' ',CHATBOX_SIZE); diff --git a/src/map/battle.c b/src/map/battle.c index ba1aa9414e..d03f588eea 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5761,7 +5761,7 @@ static const struct _battle_data { { "cell_stack_limit", &battle_config.cell_stack_limit, 1, 1, 255, }, { "dancing_weaponswitch_fix", &battle_config.dancing_weaponswitch_fix, 1, 0, 1, }, -// eAthena additions + // eAthena additions { "item_logarithmic_drops", &battle_config.logarithmic_drops, 0, 0, 1, }, { "item_drop_common_min", &battle_config.item_drop_common_min, 1, 1, 10000, }, { "item_drop_common_max", &battle_config.item_drop_common_max, 10000, 1, 10000, }, diff --git a/src/map/clif.c b/src/map/clif.c index 03e6c76931..8299034c19 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2272,7 +2272,7 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *i, struct } else { //normal 24B WBUFW(buf,n+5)=i->amount; - WBUFL(buf,n+7)= i->equip; //wear state + WBUFL(buf,n+7)= id->equip; //wear state clif_addcards(WBUFP(buf, n+11), i); //EQUIPSLOTINFO 8B WBUFL(buf,n+19) = i->expire_time; //V5_ITEM_flag @@ -2298,20 +2298,20 @@ void clif_item_sub(unsigned char *buf, int n, int idx, struct item *i, struct it WBUFB(buf,n+10)=i->attribute; WBUFB(buf,n+11)=i->refine; clif_addcards(WBUFP(buf, n+12), i); //8B - #if PACKETVER >= 20071002 +#if PACKETVER >= 20071002 WBUFL(buf,n+20)=i->expire_time; WBUFW(buf,n+24)=0; //Unknown - #endif - #if PACKETVER >= 20100629 +#endif +#if PACKETVER >= 20100629 WBUFW(buf,n+26)= (id->equip&EQP_VISIBLE)?id->look:0; - #endif +#endif } else { //Stackable item. 22.B WBUFW(buf,n+6)=i->amount; - WBUFW(buf,n+8)=(equip == -2 && id->equip == EQP_AMMO)?i->equip:0; + WBUFW(buf,n+8)=(equip == -2 && id->equip == EQP_AMMO)?id->equip:0; clif_addcards(WBUFP(buf, n+10), i); //8B - #if PACKETVER >= 20071002 +#if PACKETVER >= 20071002 WBUFL(buf,n+18)=i->expire_time; - #endif +#endif } #endif } diff --git a/src/map/clif.h b/src/map/clif.h index b89b66d1b3..bf721f9a3c 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -35,7 +35,7 @@ struct party_booking_ad_info; enum {// packet DB MAX_PACKET_DB = 0xf00, - MAX_PACKET_VER = 34, + MAX_PACKET_VER = 36, MAX_PACKET_POS = 20, }; diff --git a/src/map/intif.c b/src/map/intif.c index 1b1e07c419..762c9eb434 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2160,12 +2160,12 @@ int intif_parse(int fd) { int packet_len, cmd; cmd = RFIFOW(fd,0); - // Verify ID of the packet + // Verify ID of the packet if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) || packet_len_table[cmd-0x3800]==0){ return 0; } - // Check the length of the packet + // Check the length of the packet packet_len = packet_len_table[cmd-0x3800]; if(packet_len==-1){ if(RFIFOREST(fd)<4) @@ -2175,7 +2175,7 @@ int intif_parse(int fd) if((int)RFIFOREST(fd) sd->status.inventory[index].amount ) - return 0; + return 0; if( storage_additem(sd,&sd->status.inventory[index],amount) == 0 ) pc_delitem(sd,index,amount,0,4,LOG_TYPE_STORAGE);