Browse Source

* Fixed status timers not showing up for 2012-06-18 and newer clients.
* Changed a few for loops to ARR_FIND.
> Follow up to r17169:
* Clearance now properly works on mobs and no longer works on guild members.

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

aleos 12 years ago
parent
commit
175f28864c
4 changed files with 14 additions and 10 deletions
  1. 1 1
      db/pre-re/skill_db.txt
  2. 1 1
      db/re/skill_db.txt
  3. 8 8
      src/map/clif.c
  4. 4 0
      src/map/skill.c

+ 1 - 1
db/pre-re/skill_db.txt

@@ -774,7 +774,7 @@
 2049,0,0,0,0,0,0,10,0,no,0,0,0,none,0,		AB_EUCHARISTICA,Eucharistica
 2049,0,0,0,0,0,0,10,0,no,0,0,0,none,0,		AB_EUCHARISTICA,Eucharistica
 2050,11,6,16,6,0x1,0,1,1,yes,0,0,0,magic,0,	AB_RENOVATIO,Renovatio
 2050,11,6,16,6,0x1,0,1,1,yes,0,0,0,magic,0,	AB_RENOVATIO,Renovatio
 2051,11,6,16,6,0x21,0,5,1,yes,0,0,0,magic,0,	AB_HIGHNESSHEAL,Highness Heal //CHECK Info shows this has magic attack.
 2051,11,6,16,6,0x21,0,5,1,yes,0,0,0,magic,0,	AB_HIGHNESSHEAL,Highness Heal //CHECK Info shows this has magic attack.
-2052,11,6,16,0,0x1,0,5,1,yes,0,0x600,0,magic,0,	AB_CLEARANCE,Clearance //CHECK Also shows this as a magic attack. Why?
+2052,11,6,16,0,0x1,0,5,1,yes,0,0,0,magic,0,	AB_CLEARANCE,Clearance //CHECK Also shows this as a magic attack. Why?
 2053,11,6,16,0,0x1,0,5,1,yes,0,0,0,magic,0,	AB_EXPIATIO,Expiatio //CHECK Does this also give the buff to party members?
 2053,11,6,16,0,0x1,0,5,1,yes,0,0,0,magic,0,	AB_EXPIATIO,Expiatio //CHECK Does this also give the buff to party members?
 2054,0,6,4,6,0x1,0,10,1,yes,0,0,0,none,0,	AB_DUPLELIGHT,Duple Light //CHECK Had issues adding a skill level check to make the % go higher with the skills level. Will do later.
 2054,0,6,4,6,0x1,0,10,1,yes,0,0,0,none,0,	AB_DUPLELIGHT,Duple Light //CHECK Had issues adding a skill level check to make the % go higher with the skills level. Will do later.
 2055,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0,	AB_DUPLELIGHT_MELEE,Duple Light Melee
 2055,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0,	AB_DUPLELIGHT_MELEE,Duple Light Melee

+ 1 - 1
db/re/skill_db.txt

@@ -786,7 +786,7 @@
 2049,0,0,0,0,0,0,10,0,no,0,0,0,none,0,		AB_EUCHARISTICA,Eucharistica
 2049,0,0,0,0,0,0,10,0,no,0,0,0,none,0,		AB_EUCHARISTICA,Eucharistica
 2050,11,6,16,6,0x1,0,1,1,yes,0,0,0,magic,0,	AB_RENOVATIO,Renovatio
 2050,11,6,16,6,0x1,0,1,1,yes,0,0,0,magic,0,	AB_RENOVATIO,Renovatio
 2051,11,6,16,6,0x21,0,5,1,yes,0,0,0,magic,0,	AB_HIGHNESSHEAL,Highness Heal //CHECK Info shows this has magic attack.
 2051,11,6,16,6,0x21,0,5,1,yes,0,0,0,magic,0,	AB_HIGHNESSHEAL,Highness Heal //CHECK Info shows this has magic attack.
-2052,11,6,16,0,0x1,0,5,1,yes,0,0x600,0,magic,0,	AB_CLEARANCE,Clearance //CHECK Also shows this as a magic attack. Why?
+2052,11,6,16,0,0x1,0,5,1,yes,0,0,0,magic,0,	AB_CLEARANCE,Clearance //CHECK Also shows this as a magic attack. Why?
 2053,11,6,16,0,0x1,0,5,1,yes,0,0,0,magic,0,	AB_EXPIATIO,Expiatio //CHECK Does this also give the buff to party members?
 2053,11,6,16,0,0x1,0,5,1,yes,0,0,0,magic,0,	AB_EXPIATIO,Expiatio //CHECK Does this also give the buff to party members?
 2054,0,6,4,6,0x1,0,10,1,yes,0,0,0,none,0,	AB_DUPLELIGHT,Duple Light //CHECK Had issues adding a skill level check to make the % go higher with the skills level. Will do later.
 2054,0,6,4,6,0x1,0,10,1,yes,0,0,0,none,0,	AB_DUPLELIGHT,Duple Light //CHECK Had issues adding a skill level check to make the % go higher with the skills level. Will do later.
 2055,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0,	AB_DUPLELIGHT_MELEE,Duple Light Melee
 2055,-1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0,	AB_DUPLELIGHT_MELEE,Duple Light Melee

+ 8 - 8
src/map/clif.c

@@ -5367,12 +5367,12 @@ void clif_status_change(struct block_list *bl,int type,int flag,int tick,int val
 	WBUFL(buf,4)=bl->id;
 	WBUFL(buf,4)=bl->id;
 	WBUFB(buf,8)=flag;
 	WBUFB(buf,8)=flag;
 #if PACKETVER >= 20120618
 #if PACKETVER >= 20120618
-	WBUFL(buf,9)=tick;/* at this stage remain and total are the same value I believe */
-	WBUFL(buf,13)=tick;
 	if(flag && battle_config.display_status_timers && sd) {
 	if(flag && battle_config.display_status_timers && sd) {
 		if (tick <= 0)
 		if (tick <= 0)
 			tick = 9999; // this is indeed what official servers do
 			tick = 9999; // this is indeed what official servers do
-
+		
+		WBUFL(buf,9)=tick;/* at this stage remain and total are the same value I believe */
+		WBUFL(buf,13)=tick;
 		WBUFL(buf,17) = val1;
 		WBUFL(buf,17) = val1;
 		WBUFL(buf,21) = val2;
 		WBUFL(buf,21) = val2;
 		WBUFL(buf,25) = val3;
 		WBUFL(buf,25) = val3;
@@ -6700,7 +6700,7 @@ void clif_party_option(struct party_data *p,struct map_session_data *sd,int flag
 
 
 	if(!sd && flag==0){
 	if(!sd && flag==0){
 		int i;
 		int i;
-		for(i=0;i<MAX_PARTY && !p->data[i].sd;i++);
+		ARR_FIND(0,MAX_PARTY,i,!p->data[i].sd);
 		if (i < MAX_PARTY)
 		if (i < MAX_PARTY)
 			sd = p->data[i].sd;
 			sd = p->data[i].sd;
 	}
 	}
@@ -6733,9 +6733,9 @@ void clif_party_withdraw(struct party_data* p, struct map_session_data* sd, int
 	if(!sd && (flag&0xf0)==0)
 	if(!sd && (flag&0xf0)==0)
 	{
 	{
 		int i;
 		int i;
-		for(i=0;i<MAX_PARTY && !p->data[i].sd;i++);
-			if (i < MAX_PARTY)
-				sd = p->data[i].sd;
+		ARR_FIND(0,MAX_PARTY,i,!p->data[i].sd);
+		if (i < MAX_PARTY)
+			sd = p->data[i].sd;
 	}
 	}
 
 
 	if(!sd) return;
 	if(!sd) return;
@@ -6760,7 +6760,7 @@ void clif_party_message(struct party_data* p, int account_id, const char* mes, i
 
 
 	nullpo_retv(p);
 	nullpo_retv(p);
 
 
-	for(i=0; i < MAX_PARTY && !p->data[i].sd;i++);
+	ARR_FIND(0,MAX_PARTY,i,!p->data[i].sd);
 	if(i < MAX_PARTY){
 	if(i < MAX_PARTY){
 		unsigned char buf[1024];
 		unsigned char buf[1024];
 
 

+ 4 - 0
src/map/skill.c

@@ -7875,6 +7875,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case AB_CLEARANCE:
 	case AB_CLEARANCE:
 		if( flag&1 || (i = skill_get_splash(skill_id, skill_lv)) < 1 )
 		if( flag&1 || (i = skill_get_splash(skill_id, skill_lv)) < 1 )
 		{ //As of the behavior in official server Clearance is just a super version of Dispell skill. [Jobbie]
 		{ //As of the behavior in official server Clearance is just a super version of Dispell skill. [Jobbie]
+
+			if( bl->type != BL_MOB && battle_check_target(src,bl,BCT_PARTY) <= 0 ) // Only affect mob or party.
+				break;
+
 			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
 			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
 
 
 			if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) || rnd()%100 >= 60 + 8 * skill_lv) {
 			if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) || rnd()%100 >= 60 + 8 * skill_lv) {