Преглед на файлове

Itemtype

Fix itemtype IT_ARMOR and IT_WEAPON being inverted, bugreport:8180
please run tools/convert_itemtype.pl to update your dbs.
Upd athena-start having some issue for some os.
Fix a typo on DC_SERVICEFORYOU for val1 assignment.
lighta преди 11 години
родител
ревизия
9cca188908
променени са 11 файла, в които са добавени 3507 реда и са изтрити 3395 реда
  1. 1 1
      athena-start
  2. 16 16
      db/item_db2.txt
  3. 1 0
      db/packet_db.txt
  4. 1118 1118
      db/pre-re/item_db.txt
  5. 541 541
      db/re/item_db.txt
  6. 1118 1118
      sql-files/item_db.sql
  7. 541 541
      sql-files/item_db_re.sql
  8. 65 54
      src/map/clif.c
  9. 1 0
      src/map/clif.h
  10. 2 6
      src/map/skill.c
  11. 103 0
      tools/convert_itemtype.pl

+ 1 - 1
athena-start

@@ -23,7 +23,7 @@ get_status(){
 		ISRUN=$(ps ax | grep $(cat ${PIDFILE}) | grep $1)
 		PSRUN=$(echo "$ISRUN" | awk '{ print substr( $0, 0, 7) }')
 	fi
-	return $PSRUN
+	#return ${PSRUN} #seem to cause issue for some os
 }
 
 #cheking if already started, launch and mark in log

+ 16 - 16
db/item_db2.txt

@@ -14,18 +14,18 @@
 //585,Wurst,Brusti,11,2,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(15,20),0; itemskill "PR_MAGNIFICAT",3; },{},{}
 //679,Gold_Pill,Pilule,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; },{},{}
 
-//2681,Republic_Ring,Republic Anniversary Ring,5,20,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAllStats,3; },{},{}
-
-//5134,Pumpkin_Hat,Pumpkin-Head,5,20,,200,,2,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus2 bSubRace,RC_Demon,5; },{},{}
-//5136,Santa's_Hat_,Louise's Santa Hat,5,20,,100,,3,,0,0xFFFFFFFF,7,2,256,,0,1,20,{ bonus bMdef,1; bonus bLuk,1; bonus3 bAutoSpellWhenHit,"AL_HEAL",3,50; bonus3 bAutoSpellWhenHit,"AL_BLESSING",10,50; },{},{}
-//5145,Carnival_Joker_Jester,Carnival Jester,5,10,,100,,0,,0,0xFFFFFFFF,7,2,256,,0,1,89,{ bonus bAllStats,3; },{},{}
-//5147,Baseball_Cap,Baseball Cap,5,0,,200,,3,,0,0xFFFFFFFF,7,2,256,,0,1,216,{ bonus2 bExpAddRace,RC_Boss,50; bonus2 bExpAddRace,RC_NonBoss,50; },{},{}
-//5201,Party_Hat_B,2nd Anniversary Party Hat,5,20,,300,,3,,0,0xFFFFFFFF,7,2,256,,0,1,144,{ bonus bAllStats,3; },{},{}
-//5202,Pumpkin_Hat_,Pumpkin Hat,5,20,,200,,2,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus bAllStats,2; bonus2 bSubRace,RC_Demon,5; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,1500; },{},{}
-//5204,Event_Pierrot_Nose,Rudolf's Red Nose,5,20,,100,,0,,0,0xFFFFFFFF,7,2,1,,0,0,49,{ bonus2 bResEff,Eff_Blind,3000; bonus2 bAddMonsterDropItem,12130,30; },{},{}
-//5264,Aussie_Flag_Hat,Australian Flag Hat,5,20,,500,,4,,0,0xFFFFFFFF,7,2,256,,0,1,304,{ bonus bAllStats,2; },{},{}
-//5356,Pumpkin_Hat_H,Pumpkin Hat,5,20,,200,,2,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus bAllStats,2; bonus2 bSubRace,RC_Demon,5; bonus2 bMagicAddRace,RC_Demon,5; },{},{}
-//5811,Santa_Beard,Santa Beard,5,20,,100,,5,,0,0xFFFFFFFF,7,2,1,,0,0,25,{ bonus2 bSubRace,RC_Brute,5; },{},{}
+//2681,Republic_Ring,Republic Anniversary Ring,4,20,,100,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAllStats,3; },{},{}
+
+//5134,Pumpkin_Hat,Pumpkin-Head,4,20,,200,,2,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus2 bSubRace,RC_Demon,5; },{},{}
+//5136,Santa's_Hat_,Louise's Santa Hat,4,20,,100,,3,,0,0xFFFFFFFF,7,2,256,,0,1,20,{ bonus bMdef,1; bonus bLuk,1; bonus3 bAutoSpellWhenHit,"AL_HEAL",3,50; bonus3 bAutoSpellWhenHit,"AL_BLESSING",10,50; },{},{}
+//5145,Carnival_Joker_Jester,Carnival Jester,4,10,,100,,0,,0,0xFFFFFFFF,7,2,256,,0,1,89,{ bonus bAllStats,3; },{},{}
+//5147,Baseball_Cap,Baseball Cap,4,0,,200,,3,,0,0xFFFFFFFF,7,2,256,,0,1,216,{ bonus2 bExpAddRace,RC_Boss,50; bonus2 bExpAddRace,RC_NonBoss,50; },{},{}
+//5201,Party_Hat_B,2nd Anniversary Party Hat,4,20,,300,,3,,0,0xFFFFFFFF,7,2,256,,0,1,144,{ bonus bAllStats,3; },{},{}
+//5202,Pumpkin_Hat_,Pumpkin Hat,4,20,,200,,2,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus bAllStats,2; bonus2 bSubRace,RC_Demon,5; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,1500; },{},{}
+//5204,Event_Pierrot_Nose,Rudolf's Red Nose,4,20,,100,,0,,0,0xFFFFFFFF,7,2,1,,0,0,49,{ bonus2 bResEff,Eff_Blind,3000; bonus2 bAddMonsterDropItem,12130,30; },{},{}
+//5264,Aussie_Flag_Hat,Australian Flag Hat,4,20,,500,,4,,0,0xFFFFFFFF,7,2,256,,0,1,304,{ bonus bAllStats,2; },{},{}
+//5356,Pumpkin_Hat_H,Pumpkin Hat,4,20,,200,,2,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus bAllStats,2; bonus2 bSubRace,RC_Demon,5; bonus2 bMagicAddRace,RC_Demon,5; },{},{}
+//5811,Santa_Beard,Santa Beard,4,20,,100,,5,,0,0xFFFFFFFF,7,2,1,,0,0,25,{ bonus2 bSubRace,RC_Brute,5; },{},{}
 
 //11702,Moon_Cookie,Moon Cookie,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; sc_end SC_Hallucination; itemskill "AL_BLESSING",7; },{},{}
 //12131,Lucky_Potion,Lucky Potion,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_LUKFood,180000,15; },{},{}
@@ -49,15 +49,15 @@
 //7946,Gold_Ring_Of_Valentine,Gold Ring Of Valentine,3,10,,0,,,,,,,,,,,,,{},{},{}
 //7947,Silver_Ring_Of_Valentine,Silver Ring Of Valentine,3,10,,0,,,,,,,,,,,,,{},{},{}
 //7948,Box,Box,3,10,,10,,,,,,,,,,,,,{},{},{}
-//5817,Valentine's_Emblem,Valentine's Emblem,5,10,,0,,3,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAtkRate,3; bonus bMatkRate,3; bonus bAllStats,2; bonus bFlee,10; bonus bAspd,1; bonus bMdef,3; bonus2 bSkillAtk,"AL_HEAL",10; bonus2 bSkillHeal,"AL_HEAL",10; bonus2 bSkillHeal,"AM_POTIONPITCHER",10; bonus2 bAddItemHealRate,IG_Potion,10; },{},{}
+//5817,Valentine's_Emblem,Valentine's Emblem,4,10,,0,,3,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAtkRate,3; bonus bMatkRate,3; bonus bAllStats,2; bonus bFlee,10; bonus bAspd,1; bonus bMdef,3; bonus2 bSkillAtk,"AL_HEAL",10; bonus2 bSkillHeal,"AL_HEAL",10; bonus2 bSkillHeal,"AM_POTIONPITCHER",10; bonus2 bAddItemHealRate,IG_Potion,10; },{},{}
 
 // iRO Halloween Event 2009
 //=============================================================
-//5668,Weird_Pumpkin_Hat,Weird Pumpkin Hat,5,20,,0,,5,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus bMdef,5; bonus2 bAddMonsterDropItem,12192,2500; },{},{}
+//5668,Weird_Pumpkin_Hat,Weird Pumpkin Hat,4,20,,0,,5,,0,0xFFFFFFFF,7,2,256,,0,1,206,{ bonus bMdef,5; bonus2 bAddMonsterDropItem,12192,2500; },{},{}
 //6298,Crushed_Pumpkin,Crushed Pumpkin,3,0,,0,,,,,,,,,,,,,{},{},{}
 //6299,Worn_Fabric,Worn Fabric,3,0,,0,,,,,,,,,,,,,{},{},{}
 
 // Old Tuxedo and Wedding Dress, will display the outfit when worn.
 //==================================================================
-//2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,0xFFFFFFFE,7,0,16,,0,1,0,{},{ setoption Option_Wedding,1; },{ setoption Option_Wedding,0; }
-//7170,Tuxedo,Tuxedo,5,43000,,10,,0,,0,0xFFFFFFFE,7,1,16,,0,1,0,{},{ setoption Option_Wedding,1; },{ setoption Option_Wedding,0; }
+//2338,Wedding_Dress,Wedding Dress,4,43000,,500,,0,,0,0xFFFFFFFE,7,0,16,,0,1,0,{},{ setoption Option_Wedding,1; },{ setoption Option_Wedding,0; }
+//7170,Tuxedo,Tuxedo,4,43000,,10,,0,,0,0xFFFFFFFE,7,1,16,,0,1,0,{},{ setoption Option_Wedding,1; },{ setoption Option_Wedding,0; }

+ 1 - 0
db/packet_db.txt

@@ -463,6 +463,7 @@ packet_ver: 5
 //0x020b,-1
 //0x020c,-1
 0x020d,-1
+0x8d6,6,ZC_CLEAR_DIALOG,2
 
 //2004-07-05aSakexe
 packet_ver: 6

Файловите разлики са ограничени, защото са твърде много
+ 1118 - 1118
db/pre-re/item_db.txt


Файловите разлики са ограничени, защото са твърде много
+ 541 - 541
db/re/item_db.txt


Файловите разлики са ограничени, защото са твърде много
+ 1118 - 1118
sql-files/item_db.sql


Файловите разлики са ограничени, защото са твърде много
+ 541 - 541
sql-files/item_db_re.sql


+ 65 - 54
src/map/clif.c

@@ -1919,22 +1919,32 @@ void clif_scriptclose(struct map_session_data *sd, int npcid)
 	WFIFOSET(fd,packet_len(0xb6));
 }
 
-/// [Ind/Hercules]
-/// Close script when player is idle
-/// 08d6 <npc id>.L
+/**
+ * Close script when player is idle
+ * 08d6 <npc id>.L (ZC_CLEAR_DIALOG)
+ * @author [Ind/Hercules]
+ * @param sd : player pointer
+ * @param npcid : npc gid to close
+ */
 void clif_scriptclear(struct map_session_data *sd, int npcid)
 {
-	int fd;
+	struct s_packet_db* info;
+	int16 len;
+	int cmd = 0;
 
 	nullpo_retv(sd);
 
-	fd=sd->fd;
-	WFIFOHEAD(fd, packet_len(0x8d6));
+	cmd = packet_db_ack[sd->packet_ver][ZC_CLEAR_DIALOG];
+	if(!cmd) cmd = 0x8d6; //default
+	info = &packet_db[sd->packet_ver][cmd];
+	len = info->len;
+
+	WFIFOHEAD(fd, len);
 	WFIFOW(fd,0)=0x8d6;
-	WFIFOL(fd,2)=npcid;
-	WFIFOSET(fd,packet_len(0x8d6));
+	WFIFOL(fd,info->pos[0])=npcid;
+	WFIFOSET(fd,len);
  }
- 
+
 /*==========================================
  *
  *------------------------------------------*/
@@ -2554,7 +2564,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
 	}
 	for (i = 0; i < n;) // Loop through non-equipable items
 	{
-		nn = n - i < (client_buf - 4)/s ? n - i : (client_buf - 4)/s; // Split up non-equipable items 
+		nn = n - i < (client_buf - 4)/s ? n - i : (client_buf - 4)/s; // Split up non-equipable items
 		bufn = buf + i*s; // Update buffer to new index range
 		i += nn;
 #if PACKETVER < 5
@@ -4205,7 +4215,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
 				clif_sendbgemblem_single(sd->fd,tsd);
 			if ( tsd->status.robe )
 				clif_refreshlook(&sd->bl,bl->id,LOOK_ROBE,tsd->status.robe,SELF);
-			
+
 			if( tsd->sc.data[SC_CAMOUFLAGE] )
 				clif_status_load(bl,SI_CAMOUFLAGE,1);
 			if( tsd->sc.data[SC_MONSTER_TRANSFORM] )
@@ -6192,13 +6202,13 @@ void clif_cart_additem_ack(struct map_session_data *sd, uint8 flag)
 	clif_send(buf,packet_len(0x12c),&sd->bl,SELF);
 }
 
-// 09B7 <unknow data> (ZC_ACK_OPEN_BANKING) 
+// 09B7 <unknow data> (ZC_ACK_OPEN_BANKING)
 void clif_bank_open(struct map_session_data *sd){
 	int fd;
-        
-        nullpo_retv(sd);
-        fd = sd->fd;
-	
+
+	nullpo_retv(sd);
+	fd = sd->fd;
+
 	WFIFOHEAD(fd,4);
 	WFIFOW(fd,0) = 0x09b7;
 	WFIFOW(fd,2) = 0;
@@ -6212,32 +6222,32 @@ void clif_bank_open(struct map_session_data *sd){
 void clif_parse_BankOpen(int fd, struct map_session_data* sd) {
 	//TODO check if preventing trade or stuff like that
 	//also mark something in case char ain't available for saving, should we check now ?
-        nullpo_retv(sd);
+	nullpo_retv(sd);
 	if( !battle_config.feature_banking ) {
 		clif_colormes(sd,color_table[COLOR_RED],msg_txt(sd,1496)); //Banking is disabled
 		return;
-	}    
+	}
 	else {
 		struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];
 		int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ?
-                if(sd->status.account_id == aid){
+		if(sd->status.account_id == aid){
 			sd->state.banking = 1;
-                        //request save ?
-                        //chrif_bankdata_request(sd->status.account_id, sd->status.char_id); 
-                        //on succes open bank ?
-                        clif_bank_open(sd);
-                }
+			//request save ?
+			//chrif_bankdata_request(sd->status.account_id, sd->status.char_id);
+			//on succes open bank ?
+			clif_bank_open(sd);
+		}
 	}
 }
 
-// 09B9 <unknow data> (ZC_ACK_CLOSE_BANKING) 
+// 09B9 <unknow data> (ZC_ACK_CLOSE_BANKING)
 
 void clif_bank_close(struct map_session_data *sd){
 	int fd;
-        
+
 	nullpo_retv(sd);
-        fd = sd->fd;
-        
+	fd = sd->fd;
+
 	WFIFOHEAD(fd,4);
 	WFIFOW(fd,0) = 0x09B9;
 	WFIFOW(fd,2) = 0;
@@ -6248,19 +6258,19 @@ void clif_bank_close(struct map_session_data *sd){
  * Request to close the banking system
  * 09B8 <aid>L ??? (dunno just wild guess checkme)
  */
-void clif_parse_BankClose(int fd, struct map_session_data* sd) {       
+void clif_parse_BankClose(int fd, struct map_session_data* sd) {
 	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];
 	int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ?
-        
-        nullpo_retv(sd);
+
+	nullpo_retv(sd);
 	if( !battle_config.feature_banking ) {
 		clif_colormes(sd,color_table[COLOR_RED],msg_txt(sd,1496)); //Banking is disabled
 		//still allow to go trough to not stuck player if we have disable it while they was in
 	}
-        if(sd->status.account_id == aid){
-            sd->state.banking = 0;
-            clif_bank_close(sd);
-        }
+	if(sd->status.account_id == aid){
+		sd->state.banking = 0;
+		clif_bank_close(sd);
+	}
 }
 
 /*
@@ -6272,29 +6282,29 @@ void clif_Bank_Check(struct map_session_data* sd) {
 	struct s_packet_db* info;
 	int16 len;
 	int cmd = 0;
-	
+
 	nullpo_retv(sd);
-	
+
 	cmd = packet_db_ack[sd->packet_ver][ZC_BANKING_CHECK];
 	if(!cmd) cmd = 0x09A6; //default
-	info = &packet_db[sd->packet_ver][cmd]; 
+	info = &packet_db[sd->packet_ver][cmd];
 	len = info->len;
 	if(!len) return; //version as packet disable
-//        sd->state.banking = 1; //mark opening and closing
+	// sd->state.banking = 1; //mark opening and closing
 
 	WBUFW(buf,0) = cmd;
 	WBUFQ(buf,info->pos[0]) = sd->status.bank_vault; //testig value
 	WBUFW(buf,info->pos[1]) = 0; //reason
-	clif_send(buf,len,&sd->bl,SELF);       
+	clif_send(buf,len,&sd->bl,SELF);
 }
 
 /*
  * Requesting the data in bank
  * 09AB <aid>L (PACKET_CZ_REQ_BANKING_CHECK)
  */
-void clif_parse_BankCheck(int fd, struct map_session_data* sd) {  
+void clif_parse_BankCheck(int fd, struct map_session_data* sd) {
 	nullpo_retv(sd);
-	
+
 	if( !battle_config.feature_banking ) {
 		clif_colormes(sd,color_table[COLOR_RED],msg_txt(sd,1496)); //Banking is disabled
 		return;
@@ -6316,17 +6326,17 @@ void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK r
 	struct s_packet_db* info;
 	int16 len;
 	int cmd =0;
-	
+
 	nullpo_retv(sd);
-	
+
 	cmd = packet_db_ack[sd->packet_ver][ZC_ACK_BANKING_DEPOSIT];
 	if(!cmd) cmd = 0x09A8;
-	info = &packet_db[sd->packet_ver][cmd]; 
+	info = &packet_db[sd->packet_ver][cmd];
 	len = info->len;
 	if(!len) return; //version as packet disable
-	
+
 	WBUFW(buf,0) = cmd;
-	WBUFW(buf,info->pos[0]) = (short)reason;	
+	WBUFW(buf,info->pos[0]) = (short)reason;
 	WBUFQ(buf,info->pos[1]) = sd->status.bank_vault;/* money in the bank */
 	WBUFL(buf,info->pos[2]) = sd->status.zeny;/* how much zeny char has after operation */
 	clif_send(buf,len,&sd->bl,SELF);
@@ -6369,7 +6379,7 @@ void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK
 
 	cmd = packet_db_ack[sd->packet_ver][ZC_ACK_BANKING_WITHDRAW];
 	if(!cmd) cmd = 0x09AA;
-	info = &packet_db[sd->packet_ver][cmd]; 
+	info = &packet_db[sd->packet_ver][cmd];
 	len = info->len;
 	if(!len) return; //version as packet disable
 
@@ -12480,7 +12490,7 @@ static bool clif_validate_emblem(const uint8* emblem, unsigned long emblem_len){
 		if(((transcount*300)/(buf_len-offset)) > battle_config.emblem_transparency_limit) //convert in % to chk
 			return -2;
 	}
-	
+
 	return 0;
 }
 
@@ -13097,7 +13107,7 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
 
 	//tmp get all display
 	safesnprintf(command,sizeof(command),"%caccinfo %d", atcommand_symbol, account_id);
-	is_atcommand(fd, sd, command, 1); 
+	is_atcommand(fd, sd, command, 1);
 	//clif_account_name(sd, account_id, ""); //! TODO request to login-serv
 }
 
@@ -16979,7 +16989,7 @@ void clif_update_rankingpoint(struct map_session_data *sd, int rankingtype, int
 /**
  * Transmit personal information to player. (rates)
  * 0x08cb <packet len>.W <exp>.W <death>.W <drop>.W <DETAIL_EXP_INFO>7B (ZC_PERSONAL_INFOMATION)
- * <InfoType>.B <Exp>.W <Death>.W <Drop>.W (DETAIL_EXP_INFO 0x08cb) 
+ * <InfoType>.B <Exp>.W <Death>.W <Drop>.W (DETAIL_EXP_INFO 0x08cb)
  * 0x097b <packet len>.W <exp>.L <death>.L <drop>.L <DETAIL_EXP_INFO>13B (ZC_PERSONAL_INFOMATION2)
  * 0x0981 <packet len>.W <exp>.W <death>.W <drop>.W <activity rate>.W <DETAIL_EXP_INFO>13B (ZC_PERSONAL_INFOMATION_CHN)
  * <InfoType>.B <Exp>.L <Death>.L <Drop>.L (DETAIL_EXP_INFO 0x97b|0981)
@@ -16999,7 +17009,7 @@ void clif_display_pinfo(struct map_session_data *sd, int cmdtype) {
 		int details_drop[PINFO_MAX];
 		int details_penalty[PINFO_MAX];
 		int penalty_const;
-		
+
 		/**
 		 * Set for EXP
 		 */
@@ -17121,7 +17131,7 @@ void clif_display_pinfo(struct map_session_data *sd, int cmdtype) {
 			tot_drop *= factor;
 			tot_penalty *= factor;
 		}
-		
+
 		fd = sd->fd;
 		WFIFOHEAD(fd,len+maxinfotype*szdetails);
 		WFIFOW(fd,0) = cmd;
@@ -17150,7 +17160,7 @@ void clif_display_pinfo(struct map_session_data *sd, int cmdtype) {
 			WFIFOL(fd,info->pos[2])  = tot_drop;
 			WFIFOL(fd,info->pos[3])  = tot_penalty;
 		}
-		if (cmdtype == ZC_PERSONAL_INFOMATION_CHN) 
+		if (cmdtype == ZC_PERSONAL_INFOMATION_CHN)
 			WFIFOW(fd,info->pos[8])  = 0; //activity rate case of event ??
 		WFIFOSET(fd,len);
 	}
@@ -17813,6 +17823,7 @@ void packetdb_readdb(void)
 		{ "ZC_BANKING_CHECK", ZC_BANKING_CHECK},
 		{ "ZC_PERSONAL_INFOMATION", ZC_PERSONAL_INFOMATION},
 		{ "ZC_PERSONAL_INFOMATION_CHN", ZC_PERSONAL_INFOMATION_CHN},
+		{ "ZC_CLEAR_DIALOG", ZC_CLEAR_DIALOG},
 	};
 
 	// initialize packet_db[SERVER] from hardcoded packet_len_table[] values

+ 1 - 0
src/map/clif.h

@@ -46,6 +46,7 @@ enum e_packet_ack {
 	ZC_BANKING_CHECK,
 	ZC_PERSONAL_INFOMATION,
 	ZC_PERSONAL_INFOMATION_CHN,
+	ZC_CLEAR_DIALOG,
 	//add otehr here
 	MAX_ACK_FUNC //auto upd len
 };

+ 2 - 6
src/map/skill.c

@@ -11530,16 +11530,12 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill
 			val1 += pc_checkskill(sd,BA_MUSICALLESSON);
 		break;
 	case DC_SERVICEFORYOU:
-		if(sd){
 			//val1: MaxSP percent increase
-			val1 = 15+skill_lv;
-			val1 = status->int_/10; //Bonus rate by Dancer's INT
-			
+			val1 = 15+skill_lv+(status->int_/10); //Bonus rate by Dancer's INT 
 			//val2: SP cost reduction
 			val2 = 20+3*skill_lv;
-			val2 += (pc_checkskill(sd,DC_DANCINGLESSON)+1)/2; //Bonus rate by DC_DANCINGLESSON
+			if(sd) val2 += (pc_checkskill(sd,DC_DANCINGLESSON)+1)/2; //Bonus rate by DC_DANCINGLESSON
 			val2 += status->int_/10; //Bonus rate by Dancer's INT
-		}
 		break;
 	case BA_ASSASSINCROSS:
 		val1 = 100+(10*skill_lv)+status->agi; // ASPD increase

+ 103 - 0
tools/convert_itemtype.pl

@@ -0,0 +1,103 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Getopt::Long;
+use File::Basename;
+use Scalar::Util qw(looks_like_number);
+
+my $sFileins;
+my @aFilein = ("../db/re/item_db.txt","../db/pre-re/item_db.txt","../db/item_db2.txt");
+my $sFileouts;
+my @aFileout = ("../db/re/item_db.txt","../db/pre-re/item_db.txt","../db/item_db2.txt");
+my $sHelp = 0;
+
+
+Main();
+
+sub GetArgs {
+	GetOptions(
+	'i=s' => \$sFileins, #Output file name.
+	'o=s' => \$sFileouts, #Input file name.
+	'help!' => \$sHelp,
+	) or $sHelp=1; #Display help if invalid options are supplied.
+
+	if( $sHelp ) {
+		print "Incorrect option specified. Available options:\n"
+			."\t --o=filename => Output file name. (file must be separate by coma if multiple) \n"
+			."\t --i=filenames => Input files name. (file must be separate by coma if multiple) \n";
+		exit;
+	}
+	if($sFileins){
+		chomp($sFileins);
+		@aFilein = split(",",$sFileins);
+	}
+	if($sFileouts){
+		chomp($sFileouts);
+		@aFileout = split(",",$sFileouts);
+	}
+	unless(scalar(@aFileout)==scalar(@aFilein)){
+		print "ERROR: number of filein doesn't match number of fileout, you must speficy each fileout for each filein:\n"
+			."afilein = [ @aFilein ] \n"
+			."afileout = [ @aFileout ] \n";
+		exit;
+	}
+}
+
+sub Main {
+	my $sI=0;
+	my($filename, $dir, $suffix) = fileparse($0);
+	chdir $dir; #put ourself like was called in tool folder
+	GetArgs();
+	print "Welcome to rA itemtype converter\n";
+	print "Were going to convert those files : @aFilein into @aFileout \n";
+	foreach my $sFile (@aFilein){
+		my $sReplace=0; #should we replace file when finished
+		my $sFileouttmp=$aFileout[$sI];
+		if($sFile eq $sFileouttmp){
+			$sReplace=1;
+			$sFileouttmp = $sFileouttmp.".out";
+			print "Asking to replace file tmp fileout= $sFileouttmp \n";
+		}
+		unless(open FHIN,"$sFile"){
+			print "Error, can't read or locate $sFile.\n";
+			next;
+		}
+		unless(open FHOUT,">$sFileouttmp"){
+		   print "ERROR: Can't write or locate $aFileout[$sI].\n";
+		   next;
+		}
+		$sI++;
+		while (<FHIN>){
+			if( $_ =~ /^\s*$/) {  #ignore empty line
+				print FHOUT $_; 
+				next;  
+			} 
+			my @champ = split(",",$_);
+			my $sDoconvertion=0; #should this comment be converted
+			if( $_ =~ /^\/\// ) { # // line
+				if(scalar(@champ)>3){
+					$champ[0] =~ s!\/\/!!g;
+					$sDoconvertion=looks_like_number($champ[0]);
+					$champ[0] = "//".$champ[0]; #recomment it
+				}
+				if($sDoconvertion==0) {
+					print FHOUT $_;
+					next; 
+				}
+			}
+			if(scalar(@champ>3)){
+				if($champ[3] == 4) { $champ[3]=5; }
+				elsif($champ[3] == 5) { $champ[3]=4; }
+				my $newline = join(",",@champ);
+				print FHOUT $newline;
+			}
+			else { print FHOUT $_; }
+		}
+		close FHOUT;
+		close FHIN;
+		if($sReplace){
+			unlink $sFile;
+			rename $sFileouttmp, $sFile;
+		}
+	}
+}

Някои файлове не бяха показани, защото твърде много файлове са промени