Browse Source

Updated Slow Poison, modified checks for skill_unit_onplace abit.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@391 54d463be-8e91-2dee-dedb-b68131a5f0ec
celest 20 years ago
parent
commit
1bbcad0010
3 changed files with 17 additions and 9 deletions
  1. 1 0
      Changelog.txt
  2. 8 3
      src/map/pc.c
  3. 8 6
      src/map/skill.c

+ 1 - 0
Changelog.txt

@@ -3,6 +3,7 @@ Date	Added
 	* Fixed some compile time errors associated with showmsg [MouseJstr]
 	* Fixed some compile time errors associated with showmsg [MouseJstr]
 	* Added get_svn_revision() in core.c [MC Cameri]
 	* Added get_svn_revision() in core.c [MC Cameri]
 	  -Only if you have the file .svn\entries, it will show the revision # at runtime.
 	  -Only if you have the file .svn\entries, it will show the revision # at runtime.
+        * Updated Slow Poison, modified checks for skill_unit_onplace abit. [celest]
 
 
 11/26   
 11/26   
 	* Fixed Abrakadabra (2 minor bugs of consumed items - they were ignored if placed in 0 pos) [Lupus]
 	* Fixed Abrakadabra (2 minor bugs of consumed items - they were ignored if placed in 0 pos) [Lupus]

+ 8 - 3
src/map/pc.c

@@ -5947,10 +5947,15 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
 		return 1;
 		return 1;
 
 
 	// check if we are changing from 1st to 2nd job
 	// check if we are changing from 1st to 2nd job
-	if (s_class.job > 0 && s_class.job < 7 && job >= 7 && job <= 21)
-		sd->change_level = sd->status.job_level;
+	if (job >= 7 && job <= 21) {
+		if (s_class.job > 0 && s_class.job < 7)
+			sd->change_level = sd->status.job_level;
+		else
+			sd->change_level = 40;
+	}
 	else
 	else
 		sd->change_level = 0;
 		sd->change_level = 0;
+
 	pc_setglobalreg (sd, "jobchange_level", sd->change_level);		
 	pc_setglobalreg (sd, "jobchange_level", sd->change_level);		
 	
 	
 	sd->status.class = sd->view_class = b_class;
 	sd->status.class = sd->view_class = b_class;
@@ -7341,7 +7346,7 @@ static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) {
 	if ((battle_config.natural_heal_weight_rate > 100 || sd->weight*100/sd->max_weight < battle_config.natural_heal_weight_rate) &&
 	if ((battle_config.natural_heal_weight_rate > 100 || sd->weight*100/sd->max_weight < battle_config.natural_heal_weight_rate) &&
 		!pc_isdead(sd) && 
 		!pc_isdead(sd) && 
 		!pc_ishiding(sd) && 
 		!pc_ishiding(sd) && 
-		sd->sc_data[SC_POISON].timer == -1 &&
+		!(sd->sc_data[SC_POISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) &&
 		sd->sc_data[SC_BERSERK].timer == -1 ) {
 		sd->sc_data[SC_BERSERK].timer == -1 ) {
 		pc_natural_heal_hp(sd);
 		pc_natural_heal_hp(sd);
 		if( sd->sc_data && sd->sc_data[SC_EXTREMITYFIST].timer == -1 &&	//阿修羅?態ではSPが回復しない
 		if( sd->sc_data && sd->sc_data[SC_EXTREMITYFIST].timer == -1 &&	//阿修羅?態ではSPが回復しない

+ 8 - 6
src/map/skill.c

@@ -5965,14 +5965,16 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
 			int type=SkillStatusChangeTable[sg->skill_id];
 			int type=SkillStatusChangeTable[sg->skill_id];
 			if(sg->src_id == bl->id)
 			if(sg->src_id == bl->id)
 				break;
 				break;
-			if(sc_data && sc_data[type].timer==-1)
-				skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
-					(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
-			else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
-				if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
+			if(sc_data) {
+				if (sc_data[type].timer==-1)
 					skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
 					skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
 						(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
 						(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
-				ts->tick-=sg->interval;
+				else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
+					if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
+						skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+							(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+					ts->tick-=sg->interval;
+				}
 			}
 			}
 		} break;
 		} break;