Преглед изворни кода

Freeze, Stun, Sleep and Stone behavior (fixes #950)
- These status changes no longer make the target stand up
- Sleep and Stone (first phase) no longer make the target stop moving/singing/dancing
- Stone (second phase) will now make the target stop singing/dancing, but only make you stop moving in this one case
- You can now sit down while in the first phase of Stone
- You can no longer stand up while having any of these status changes (except first phase of Stone)

Playtester пре 9 година
родитељ
комит
0fd46eb3a6
2 измењених фајлова са 19 додато и 13 уклоњено
  1. 7 4
      src/map/clif.c
  2. 12 9
      src/map/status.c

+ 7 - 4
src/map/clif.c

@@ -10845,7 +10845,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
 		if (battle_config.idletime_option&IDLE_ATTACK)
 			sd->idletime = last_tick;
 		unit_attack(&sd->bl, target_id, action_type != 0);
-	break;
+		break;
 	case 0x02: // sitdown
 		if (battle_config.basic_skill_check && pc_checkskill(sd, NV_BASIC) < 3) {
 			clif_skill_fail(sd, 1, USESKILL_FAIL_LEVEL, 2);
@@ -10858,7 +10858,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
 			return;
 		}
 
-		if (sd->ud.skilltimer != INVALID_TIMER || (sd->sc.opt1 && sd->sc.opt1 != OPT1_BURNING ))
+		if (sd->ud.skilltimer != INVALID_TIMER || (sd->sc.opt1 && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING))
 			break;
 
 		if (sd->sc.count && (
@@ -10873,7 +10873,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
 		pc_setsit(sd);
 		skill_sit(sd, 1);
 		clif_sitting(&sd->bl);
-	break;
+		break;
 	case 0x03: // standup
 		if (!pc_issit(sd)) {
 			//Bugged client? Just refresh them.
@@ -10881,13 +10881,16 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
 			return;
 		}
 
+		if (sd->sc.opt1 && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING)
+			break;
+
 		if (pc_setstand(sd, false)) {
 			if (battle_config.idletime_option&IDLE_SIT)
 				sd->idletime = last_tick;
 			skill_sit(sd, 0);
 			clif_standing(&sd->bl);
 		}
-	break;
+		break;
 	}
 }
 

+ 12 - 9
src/map/status.c

@@ -10468,27 +10468,27 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 
 	// Those that make you stop attacking/walking....
 	switch (type) {
-		case SC_FREEZE:
-		case SC_STUN:
-			if(sc->data[SC_DANCING])
-				unit_stop_walking(bl, 1);
-		case SC_SLEEP:
-		case SC_STONE:
 		case SC_WHITEIMPRISON:
 		case SC_DEEPSLEEP:
 		case SC_CRYSTALIZE:
 			if (sd && pc_issit(sd)) // Avoid sprite sync problems.
 				pc_setstand(sd, true);
+		case SC_FREEZE:
+		case SC_STUN:
+			if (sc->data[SC_DANCING])
+				unit_stop_walking(bl, 1);
 		case SC_TRICKDEAD:
 			status_change_end(bl, SC_DANCING, INVALID_TIMER);
+		case SC_SLEEP:
+		case SC_STONE:
 			// Cancel cast when get status [LuzZza]
 			if (battle_config.sc_castcancel&bl->type)
 				unit_skillcastcancel(bl, 0);
 		// Fall through
 		case SC_CURSEDCIRCLE_ATKER:
 			unit_stop_attack(bl);
-			if (type == SC_FREEZE || type == SC_STUN)
-				break; //Handled above
+			if (type == SC_FREEZE || type == SC_STUN || type == SC_SLEEP || type == SC_STONE)
+				break;
 		// Fall through
 		case SC_STOP:
 		case SC_CONFUSION:
@@ -11887,8 +11887,11 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
 	case SC_STONE:
 		if(sc->opt1 == OPT1_STONEWAIT && sce->val3) {
 			sce->val4 = 0;
-			unit_stop_walking(bl,1);
 			unit_stop_attack(bl);
+			if (sc->data[SC_DANCING]) {
+				unit_stop_walking(bl, 1);
+				status_change_end(bl, SC_DANCING, INVALID_TIMER);
+			}
 			status_change_end(bl, SC_AETERNA, INVALID_TIMER);
 			sc->opt1 = OPT1_STONE;
 			clif_changeoption(bl);