浏览代码

Fixed an issue with SCB_MODE (#6193)

* status->class_ is now directly defined by the current mode regardless of the previous mode

Fixed #6194
Thanks to @Zarbony !
Atemo 3 年之前
父节点
当前提交
2a97f0bdc7
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/map/status.cpp

+ 4 - 4
src/map/status.cpp

@@ -5898,13 +5898,13 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
 	if(flag&SCB_MODE) {
 		status->mode = status_calc_mode(bl, sc, b_status->mode);
 
-		if (status->class_ != CLASS_BATTLEFIELD && status_has_mode(status, MD_STATUSIMMUNE|MD_SKILLIMMUNE))
+		if (status_has_mode(status, MD_STATUSIMMUNE|MD_SKILLIMMUNE))
 			status->class_ = CLASS_BATTLEFIELD;
-		else if (status->class_ != CLASS_BOSS && status_has_mode(status, MD_STATUSIMMUNE|MD_KNOCKBACKIMMUNE|MD_DETECTOR))
+		else if (status_has_mode(status, MD_STATUSIMMUNE|MD_KNOCKBACKIMMUNE|MD_DETECTOR))
 			status->class_ = CLASS_BOSS;
-		else if (status->class_ != CLASS_GUARDIAN && status_has_mode(status, MD_STATUSIMMUNE))
+		else if (status_has_mode(status, MD_STATUSIMMUNE))
 			status->class_ = CLASS_GUARDIAN;
-		else if (status->class_ != CLASS_NORMAL)
+		else
 			status->class_ = CLASS_NORMAL;
 
 		// Since mode changed, reset their state.