Explorar o código

Fix missing check element for non-damage skill (#4664)

* Fixes #4661.
* Resolves an issue with an element resistance check.
Thanks to @reunite-ro and @attackjom!
Joam %!s(int64=5) %!d(string=hai) anos
pai
achega
18ab64f2a1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/map/skill.cpp

+ 1 - 1
src/map/skill.cpp

@@ -6253,7 +6253,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	tsce = (tsc && type != -1)?tsc->data[type]:NULL;
 
 	if (src!=bl && type > -1 &&
-		CHK_ELEMENT((i = skill_get_ele(skill_id, skill_lv))) &&
+		CHK_ELEMENT((i = skill_get_ele(skill_id, skill_lv))) && i > ELE_NEUTRAL &&
 		skill_get_inf(skill_id) != INF_SUPPORT_SKILL &&
 		battle_attr_fix(NULL, NULL, 100, i, tstatus->def_ele, tstatus->ele_lv) <= 0)
 		return 1; //Skills that cause an status should be blocked if the target element blocks its element.