Bläddra i källkod

Fixed some status related issues (#6702)

Fixed stone curse not ending
Fixed SR_GENTLETOUCH_CURE not being able to cure poison, silence and blind
Cleaned up SR_GENTLETOUCH_CURE formula
Fixed casting SR_GENTLETOUCH_CURE on self during status change
Added missing NoMove state to PF_SPIDERWEB
Fixed GN_HELLS_PLANT being removed on mapchange

Fixes #6701

Thanks to @mazvi
Lemongrass3110 3 år sedan
förälder
incheckning
5193fd6c92
4 ändrade filer med 9 tillägg och 4 borttagningar
  1. 2 1
      db/pre-re/status.yml
  2. 2 1
      db/re/status.yml
  3. 1 1
      src/map/skill.cpp
  4. 4 1
      src/map/status.cpp

+ 2 - 1
db/pre-re/status.yml

@@ -1287,6 +1287,8 @@ Body:
   - Status: Spiderweb
     Icon: EFST_SPIDERWEB
     DurationLookup: PF_SPIDERWEB
+    States:
+      NoMove: true
     CalcFlags:
       Flee: true
     Flags:
@@ -6791,7 +6793,6 @@ Body:
     DurationLookup: GN_HELLS_PLANT
     Flags:
       NoSave: true
-      RemoveOnChangeMap: true
       DisplayPc: true
       BlEffect: true
   - Status: Increase_Maxhp

+ 2 - 1
db/re/status.yml

@@ -1300,6 +1300,8 @@ Body:
   - Status: Spiderweb
     Icon: EFST_SPIDERWEB
     DurationLookup: PF_SPIDERWEB
+    States:
+      NoMove: true
     CalcFlags:
       Flee: true
     Flags:
@@ -7068,7 +7070,6 @@ Body:
     DurationLookup: GN_HELLS_PLANT
     Flags:
       NoSave: true
-      RemoveOnChangeMap: true
       DisplayPc: true
       BlEffect: true
   - Status: Increase_Maxhp

+ 1 - 1
src/map/skill.cpp

@@ -11179,7 +11179,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 				status_heal(bl, heal, 0, 0);
 			}
 
-			if( (tsc && tsc->opt1) && (rnd()%100 < ((skill_lv * 5) + (status_get_dex(src) + status_get_lv(src)) / 4) - (1 + (rnd() % 10))) ) {
+			if( tsc && tsc->count && rnd_chance( ( skill_lv * 5 + ( status_get_dex( src ) + status_get_lv( src ) ) / 4 ) - rnd_value( 1, 10 ), 100 ) ){
 				status_change_end(bl, SC_STONE, INVALID_TIMER);
 				status_change_end(bl, SC_FREEZE, INVALID_TIMER);
 				status_change_end(bl, SC_STUN, INVALID_TIMER);

+ 4 - 1
src/map/status.cpp

@@ -1557,7 +1557,7 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 			(src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_id)
 		) {	// Skills blocked through status changes...
 			if (!flag && ( // Blocked only from using the skill (stuff like autospell may still go through
-				sc->cant.cast ||
+				( sc->cant.cast && skill_id != RK_REFRESH && skill_id != SU_GROOMING && skill_id != SR_GENTLETOUCH_CURE ) ||
 #ifndef RENEWAL
 				(sc->data[SC_BASILICA] && (sc->data[SC_BASILICA]->val4 != src->id || skill_id != HP_BASILICA)) || // Only Basilica caster that can cast, and only Basilica to cancel it
 #endif
@@ -12888,6 +12888,9 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
 	bool disable_opt_flag = false;
 
 	switch (type) {
+		case SC_STONE:
+			sc->opt1 = OPT1_NONE;
+			break;
 		case SC_DANCING:
 			if ((sce->val1&0xFFFF) == CG_MOONLIT)
 				sc->opt3 &= ~OPT3_MOONLIT;