Ver código fonte

Follow up to r17358 : Fix compiler warning in atcommand.c - Fixes bugreport:7724
Fix a map crash when an unconditional_skill GM casts Tetra Vortex with less than 4 spheres - Thanks TTest
Added packets for new clients (Lighta)
Some minor documentation updates

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17360 54d463be-8e91-2dee-dedb-b68131a5f0ec

akinari1087 12 anos atrás
pai
commit
0bb0640f33
7 arquivos alterados com 113 adições e 20 exclusões
  1. 1 1
      conf/msg_conf/map_msg.conf
  2. 96 0
      db/packet_db.txt
  3. 1 1
      doc/atcommands.txt
  4. 1 2
      src/char/int_party.c
  5. 2 2
      src/map/atcommand.c
  6. 1 1
      src/map/clif.h
  7. 11 13
      src/map/skill.c

+ 1 - 1
conf/msg_conf/map_msg.conf

@@ -1515,7 +1515,7 @@
 // @reloadpacketdb
 1477: Packet database has been reloaded.
 
-1478: Party share level has been changed successfully.
+1478: Party share level range has been changed successfully.
 1479: Failed updating configuration. Character server offline.
 
 //Custom translations

+ 96 - 0
db/packet_db.txt

@@ -1930,3 +1930,99 @@ packet_ver: 36
 0x0362,26,friendslistadd,2
 0x0926,5,hommenu,2:4
 0x088e,36,storagepassword,2:4:20
+
+//2013-05-29 Ragexe (Shakto)
+packet_ver: 37
+0x0890,7,actionrequest,2:6
+0x0438,10,useskilltoid,2:4:6
+0x0876,5,walktoxy,2
+0x0897,6,ticksend,2
+0x0951,5,changedir,2:4
+0x0895,6,takeitem,2
+0x08A7,6,dropitem,2:4
+0x0938,8,movetokafra,2:4
+0x0957,8,movefromkafra,2:4
+0x0917,10,useskilltopos,2:4:6:8
+0x085E,90,useskilltoposinfo,2:4:6:8:10
+0x0863,6,getcharnamerequest,2
+0x0937,6,solvecharname,2
+0x085A,12,searchstoreinfolistitemclick,2:6:10
+0x0941,2,searchstoreinfonextpage,0
+0x0918,-1,searchstoreinfo,2:4:5:9:13:14:15
+0x0936,-1,reqtradebuyingstore,2:4:8:12
+0x0892,6,reqclickbuyingstore,2
+0x0964,2,reqclosebuyingstore,0
+0x0869,-1,reqopenbuyingstore,2:4:8:9:89
+0x0874,41,bookingregreq,2,4:6
+// 0x088E,8); // CZ_JOIN_BATTLE_FIELD
+0x0958,-1,itemlistwindowselected,2:4:8
+0x0919,19,wanttoconnection,2:6:10:14:18
+0x08A8,26,partyinvite2,2
+// 0x0888,4); // CZ_GANGSI_RANK
+0x0877,26,friendslistadd,2
+0x023B,5,hommenu,2:4
+0x0956,36,storagepassword,2:4:20
+
+//2013-06-05 Ragexe (Shakto)
+packet_ver: 38
+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,41,bookingregreq,2:4:6
+// 0x0363,8 // CZ_JOIN_BATTLE_FIELD
+0x0281,-1,itemlistwindowselected,2:4:8
+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
+0x0883,36,storagepassword,2:4:20
+
+//2013-06-05 Ragexe (Shakto)
+packet_ver: 39
+0x0369,7,actionrequest,2:6
+0x083C,10,useskilltoid,2:4:6
+0x0437,5,walktoxy,2
+0x035F,6,ticksend,2
+0x087E,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
+0x0919,19,wanttoconnection,2:6:10:14:18
+0x0802,26,partyinvite2,2
+// 0x0436,4 CZ_GANGSI_RANK
+0x0940,26,friendslistadd,2
+0x093A,5,hommenu,2:4
+0x0964,36,storagepassword,2:4:20

+ 1 - 1
doc/atcommands.txt

@@ -1262,7 +1262,7 @@ Example:
 
 @partysharelvl <value>
 
-Updates party share level until character server is restarted.
+Updates party share level range until character server is restarted.
 Automatically updates all online parties.
 
 Example:

+ 1 - 2
src/char/int_party.c

@@ -740,6 +740,7 @@ int mapif_parse_PartyLeaderChange(int fd,int party_id,int account_id,int char_id
 	return 1;
 }
 
+//Used to update party share level range in run time
 int mapif_parse_PartyShareLevel(int fd,unsigned int share_lvl)
 {
 	struct party_data *p;
@@ -750,8 +751,6 @@ int mapif_parse_PartyShareLevel(int fd,unsigned int share_lvl)
 	for(p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter)) { //Update online parties
 		if(p->party.count > 1)
 			int_party_calc_state(p);
-		else if(!p->party.count) //Remove parties from memory that have no players online
-			idb_remove(party_db_, p->party.party_id);
 	}
 	dbi_destroy(iter);
 

+ 2 - 2
src/map/atcommand.c

@@ -3731,7 +3731,7 @@ ACMD_FUNC(reload) {
 }
 /*==========================================
  * @partysharelvl <share_range> [Akinari]
- * Updates char server party share level in runtime
+ * Updates char server party share level range in runtime
  * Temporary - Permanent update in inter_athena.conf
  *------------------------------------------*/
 ACMD_FUNC(partysharelvl) {
@@ -3743,7 +3743,7 @@ ACMD_FUNC(partysharelvl) {
 		clif_displaymessage(fd, msg_txt(sd,1322));
 		return -1;
 	} else
-		share_lvl = min(atof(message),MAX_LEVEL);
+		share_lvl = min(abs(atoi(message)),MAX_LEVEL);
 
 	if(intif_party_sharelvlupdate(share_lvl)) //Successfully updated
 		clif_displaymessage(fd, msg_txt(sd,1478));

+ 1 - 1
src/map/clif.h

@@ -35,7 +35,7 @@ struct party_booking_ad_info;
 enum
 {// packet DB
 	MAX_PACKET_DB  = 0xf00,
-	MAX_PACKET_VER = 36,
+	MAX_PACKET_VER = 39,
 	MAX_PACKET_POS = 20,
 };
 

+ 11 - 13
src/map/skill.c

@@ -4371,34 +4371,34 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
 		break;
 
 	case WL_TETRAVORTEX:
-		if( sd )
-		{
+		if( sd && sc ) { // No SC? No spheres
 			int spheres[5] = { 0, 0, 0, 0, 0 },
 				positions[5] = {-1,-1,-1,-1,-1 },
 				i, j = 0, k, subskill = 0;
 
 			for( i = SC_SPHERE_1; i <= SC_SPHERE_5; i++ )
-				if( sc && sc->data[i] )
-				{
+				if( sc->data[i] ) {
 					spheres[j] = i;
 					positions[j] = sc->data[i]->val2;
-					j++; //
+					j++;
 				}
 
 			// Sphere Sort, this time from new to old
 			for( i = 0; i <= j - 2; i++ )
 				for( k = i + 1; k <= j - 1; k++ )
-					if( positions[i] < positions[k] )
-					{
+					if( positions[i] < positions[k] ) {
 						swap(positions[i],positions[k]);
 						swap(spheres[i],spheres[k]);
 					}
 
+			if(j == 5) { // If 5 spheres, remove last one and only do 4 actions
+				status_change_end(src, spheres[4], INVALID_TIMER);
+				j = 4;
+			}
+
 			k = 0;
-			for( i = 0; i < 4; i++ )
-			{
-				switch( sc->data[spheres[i]]->val1 )
-				{
+			for( i = 0; i < j; i++ ) { // Loop should always be 4 for regular players, but unconditional_skill could be less
+				switch( sc->data[spheres[i]]->val1 ) {
 					case WLS_FIRE:  subskill = WL_TETRAVORTEX_FIRE; k |= 1; break;
 					case WLS_WIND:  subskill = WL_TETRAVORTEX_WIND; k |= 4; break;
 					case WLS_WATER: subskill = WL_TETRAVORTEX_WATER; k |= 2; break;
@@ -4408,8 +4408,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
 				clif_skill_nodamage(src, bl, subskill, skill_lv, 1);
 				status_change_end(src, spheres[i], INVALID_TIMER);
 			}
-			if (spheres[4]) // fix to remove last sphere if 5 are present, on official even though only 4 spheres are used, all spheres are removed
-				status_change_end(src, spheres[4], INVALID_TIMER);
 		}
 		break;