diff --git a/db/packet_db.txt b/db/packet_db.txt
index dee8941..0a5c520 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -1995,7 +1995,7 @@ packet_ver: 38
0x0361,5,hommenu,2,4
0x0883,36,storagepassword,2:4:20
-//2013-06-05 Ragexe (Shakto)
+//2013-06-12 Ragexe (Shakto)
packet_ver: 39
0x0369,7,actionrequest,2:6
0x083C,10,useskilltoid,2:4:6
@@ -2026,3 +2026,164 @@ packet_ver: 39
0x0940,26,friendslistadd,2
0x093A,5,hommenu,2:4
0x0964,36,storagepassword,2:4:20
+
+//2013-06-18 Ragexe (Shaktoh)
+packet_ver: 40
+0x0889,7,actionrequest,2:6
+0x0951,10,useskilltoid,2:4:6
+0x088E,5,walktoxy,2
+0x0930,6,ticksend,2
+0x08A6,5,changedir,2:4
+0x0962,6,takeitem,2
+0x0917,6,dropitem,2:4
+0x0885,8,movetokafra,2:4
+0x0936,8,movefromkafra,2:4
+0x096A,10,useskilltopos,2:4:6:8
+0x094F,90,useskilltoposinfo,2:4:6:8:10
+0x0944,6,getcharnamerequest,2
+0x0945,6,solvecharname,2
+0x0890,12,searchstoreinfolistitemclick,2:6:10
+0x0363,2,searchstoreinfonextpage,0
+0x0281,-1,searchstoreinfo,2:4:5:9:13:14:15
+0x0891,-1,reqtradebuyingstore,2:4:8:12
+0x0862,6,reqclickbuyingstore,2
+0x085A,2,reqclosebuyingstore,0
+0x0932,-1,reqopenbuyingstore,2:4:8:9:89
+0x08A7,18,bookingregreq,2:4:6
+// 0x087A,8 CZ_JOIN_BATTLE_FIELD
+0x0942,-1,itemlistwindowselected,2:4:8:12
+0x095B,19,wanttoconnection,2:6:10:14:18
+0x0887,26,partyinvite2,2
+// 0x0878,4 CZ_GANGSI_RANK
+0x0953,26,friendslistadd,2
+0x02C4,5,hommenu,2:4
+0x0864,36,storagepassword,2:4:20
+
+//2013-06-26 Ragexe
+packet_ver: 41
+0x0369,7,actionrequest,2:6
+0x083C,10,useskilltoid,2:4:6
+0x0437,5,walktoxy,2
+0x035F,6,ticksend,2
+0x094D,5,changedir,2:4
+0x088B,6,takeitem,2
+0x0952,6,dropitem,2:4
+0x0921,8,movetokafra,2:4
+0x0817,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
+0x0365,2,reqclosebuyingstore,0
+0x0815,-1,reqopenbuyingstore,2:4:8:9:89
+0x0894,18,bookingregreq,2:4:6
+// 0x0860,8 CZ_JOIN_BATTLE_FIELD
+0x08A5,-1,itemlistwindowselected,2:4:8:12
+0x088C,19,wanttoconnection,2:6:10:14:18
+0x0895,26,partyinvite2,2
+// 0x088F,4 CZ_GANGSI_RANK
+0x08AB,26,friendslistadd,2
+0x0960,5,hommenu,2:4
+0x0930,36,storagepassword,2:4:20
+
+//2013-07-03 Ragexe
+packet_ver: 42
+0x0369,7,actionrequest,2:6
+0x083C,10,useskilltoid,2:4:6
+0x0437,5,walktoxy,2
+0x035F,6,ticksend,2
+0x0930,5,changedir,2:4
+0x07E4,6,takeitem,2
+0x0362,6,dropitem,2:4
+0x07EC,8,movetokafra,2:4
+0x0364,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
+0x0202,6,reqclickbuyingstore,2
+0x0817,2,reqclosebuyingstore,0
+0x0815,-1,reqopenbuyingstore,2:4:8:9:89
+0x0365,18,bookingregreq,2:4:6
+// 0x0363,8 CZ_JOIN_BATTLE_FIELD
+0x0281,-1,itemlistwindowselected,2:4:8:12
+0x022D,19,wanttoconnection,2:6:10:14:18
+0x0802,26,partyinvite2,2
+// 0x0436,4 CZ_GANGSI_RANK
+0x0360,26,friendslistadd,2
+0x094A,5,hommenu,2:4
+0x0873,36,storagepassword,2:4:20
+
+//2013-07-10 Ragexe
+packet_ver: 43
+0x0369,7,actionrequest,2:6
+0x083C,10,useskilltoid,2:4:6
+0x0437,5,walktoxy,2
+0x035F,6,ticksend,2
+0x0202,5,changedir,2:4
+0x07E4,6,takeitem,2
+0x0362,6,dropitem,2:4
+0x07EC,8,movetokafra,2:4
+0x0364,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
+0x0365,18,bookingregreq,2:4:6
+// 0x0363,8 CZ_JOIN_BATTLE_FIELD
+0x0281,-1,itemlistwindowselected,2:4:8:12
+0x022D,19,wanttoconnection,2:6:10:14:18
+0x0802,26,partyinvite2,2
+// 0x0436,4 CZ_GANGSI_RANK
+0x023B,26,friendslistadd,2
+0x0361,5,hommenu,2:4
+0x0880,36,storagepassword,2:4:20
+0x097c,2,alchemist,0
+
+//2013-07-17 Ragexe
+packet_ver: 44
+0x0918,7,actionrequest,2:6
+0x091E,10,useskilltoid,2:4:6
+0x083C,5,walktoxy,2
+0x02C4,6,ticksend,2
+0x088C,5,changedir,2:4
+0x08A9,6,takeitem,2
+0x0917,6,dropitem,2:4
+0x089B,8,movetokafra,2:4
+0x0956,8,movefromkafra,2:4
+0x0882,10,useskilltopos,2:4:6:8
+0x0952,90,useskilltoposinfo,2:4:6:8:10
+0x0958,6,getcharnamerequest,2
+0x0967,6,solvecharname,2
+0x0960,12,searchstoreinfolistitemclick,2:6:10
+0x0819,2,searchstoreinfonextpage,0
+0x086B,-1,searchstoreinfo,2:4:5:9:13:14:15
+0x093B,-1,reqtradebuyingstore,2:4:8:12
+0x0898,6,reqclickbuyingstore,2
+0x096A,2,reqclosebuyingstore,0
+0x08AA,-1,reqopenbuyingstore,2:4:8:9:89
+0x0862,18,bookingregreq,2:4:6
+// 0x08A6,8 CZ_JOIN_BATTLE_FIELD
+0x0897,-1,itemlistwindowselected,2:4:8:12
+0x091D,19,wanttoconnection,2:6:10:14:18
+0x092F,26,partyinvite2,2
+// 0x086C,4 CZ_GANGSI_RANK
+0x0863,26,friendslistadd,2
+0x088A,5,hommenu,2:4
+0x095B,36,storagepassword,2:4:20
diff --git a/src/common/conf.h b/src/common/conf.h
index 666853b..d223505 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -5,7 +5,7 @@
#define _CONF_H_
#include "../common/cbasetypes.h"
-#include "libconfig.h"
+#include "../../3rdparty/libconfig/libconfig.h"
int conf_read_file(config_t *config, const char *config_filename);
int config_setting_copy(config_setting_t *parent, const config_setting_t *src);
diff --git a/src/map/clif.c b/src/map/clif.c
index 4e3a3f8..aee9825 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2520,7 +2520,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
WBUFW(buf,0)=0x2ea;
#else
WBUFW(buf,0)=0x995;
- memset((char*)WBUFP(buf,6),0,24); //storename
+ memset((char*)WBUFP(buf,4),0,24); //storename
#endif
WBUFW(buf,2)=n*s+sidx;
clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
@@ -2533,7 +2533,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
WBUFW(bufe,0)=0x2d1;
#else
WBUFW(bufe,0)=0x996;
- memset((char*)WBUFP(bufe,6),0,24); //storename
+ memset((char*)WBUFP(bufe,4),0,24); //storename
#endif
WBUFW(bufe,2)=ne*se+sidxe;
clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
diff --git a/src/map/instance.c b/src/map/instance.c
index 6b073df..cfc3e1f 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -85,7 +85,6 @@ static struct instance_db *instance_searchname_db(const char *instance_name)
static int instance_delete_timer(int tid, unsigned int tick, int id, intptr_t data)
{
instance_destroy(id);
-
return 0;
}
@@ -639,7 +638,6 @@ static bool instance_readdb_sub(char* str[], int columns, int current)
void instance_readdb(void)
{
-
memset(&instance_db, 0, sizeof(instance_db));
sv_readdb(db_path, DBPATH"instance_db.txt", ',', 7, 7+MAX_MAP_PER_INSTANCE, MAX_INSTANCE_DB, &instance_readdb_sub);
diff --git a/src/map/pc.c b/src/map/pc.c
index 8caecad..3fdb2b3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8541,6 +8541,7 @@ int pc_load_combo(struct map_session_data *sd) {
}
return ret;
}
+
/*==========================================
* Equip item on player sd at req_pos from inventory index n
*------------------------------------------*/
diff --git a/src/map/script.c b/src/map/script.c
index 13948a5..799481f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7769,8 +7769,10 @@ static bool buildin_delitem_search(struct map_session_data* sd, struct item* it,
if (num > 0 && num <= ARRAYLENGTH(equip))
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
+ int ret;
pc_unequipitem(sd,i,3); //recalculate bonus
- pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
+ ret=pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
+ script_pushint(st,ret==0);
}
return 0;
@@ -11882,6 +11884,7 @@ static int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by Ro
map_iwall_set(m, x, y, size, dir, shootable, name);
return 0;
}
+
BUILDIN_FUNC(delwall)
{
const char *name = script_getstr(st,2);
@@ -16627,7 +16630,6 @@ int script_instancegetid(struct script_state* st)
else
return 1;
return 0;
-
}
/*==========================================
@@ -17893,6 +17895,53 @@ static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap)
return 0;
}
+/*==========================================
+* check the current client version is superior or egal to date or version
+* @type :
+* 0- check by version number
+* 1- check by date
+* @return true/false
+ *------------------------------------------*/
+BUILDIN_FUNC(is_client_version){
+ TBL_PC *sd = NULL;
+ int type=script_getnum(st,2);
+ int data=script_getnum(st,3);
+ int ret=0;
+
+ if( !script_hasdata(st,4) && !(sd = script_rid2sd(st)) ) {
+ script_pushint(st,0);
+ return 0;
+ }
+ else if( !(sd = map_charid2sd(script_getnum(st,4))) ) {
+ script_pushint(st,0);
+ return 0;
+ }
+ switch(type){
+ case 0:
+ ret = (data >= sd->packet_ver)?1:0;
+ break;
+ case 1:
+ ret = (date2version(data) >= sd->packet_ver)?1:0;
+ break;
+ }
+ script_pushint(st,ret);
+ return 0;
+}
+
+/*==========================================
+* Get the server define configuration to npc
+* see @type in const.txt
+ *------------------------------------------*/
+BUILDIN_FUNC(get_serv_conf){
+ int type=script_getnum(st,2);
+ switch(type){
+ case 0 : script_pushint(st,MAX_LEVEL);
+ case 1 : script_pushint(st,MAX_PC_BONUS);
+ //...add other case here
+ }
+ return 0;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern);
@@ -18367,5 +18416,8 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(party_changeleader,"ii"),
BUILDIN_DEF(party_changeoption,"iii"),
BUILDIN_DEF(party_destroy,"i"),
+
+ BUILDIN_DEF(is_client_version,"ii?"),
+ BUILDIN_DEF(get_serv_conf,"i"),
{NULL,NULL,NULL},
};
diff --git a/src/map/status.c b/src/map/status.c
index 01a6e4d..730e022 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4173,6 +4173,7 @@ void status_calc_bl_(struct block_list* bl, enum scb_flag flag, bool first)
if(b_status.rhw.atk2 != status->rhw.atk2 || b_status.lhw.atk2 != status->lhw.atk2
#ifdef RENEWAL
|| b_status.rhw.atk != status->rhw.atk || b_status.lhw.atk != status->lhw.atk
+ || b_status.eatk != status->eatk
#endif
)
clif_updatestatus(sd,SP_ATK2);