瀏覽代碼

Fixes Wug Rider allowing physical attacks (#6714)

* Fixes #6713.
* Physical attacks are now disabled when a Ranger-type class is riding a Wug.
Thanks to @Surefirer!
Aleos 3 年之前
父節點
當前提交
242983f0dd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/map/unit.cpp

+ 1 - 1
src/map/unit.cpp

@@ -2848,7 +2848,7 @@ bool unit_can_attack(struct block_list *bl, int target_id) {
 	if (bl->type == BL_PC) {
 		map_session_data *sd = ((TBL_PC *)bl);
 
-		if (sd && (sd->state.block_action & PCBLOCK_ATTACK))
+		if (sd && ((sd->state.block_action & PCBLOCK_ATTACK) || pc_isridingwug(sd)))
 			return false;
 	}