Pārlūkot izejas kodu

Resolves some mistakes for getAttribute (#6207)

Follow-up https://github.com/rathena/rathena/commit/4d2c5b02d38bfb99e3afc4b6dfebeea2c85dbc5f
Fixed #6205

Thanks to @sonniez
Atemo 3 gadi atpakaļ
vecāks
revīzija
eb8c06743e
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      src/map/clif.cpp
  2. 1 1
      src/map/status.cpp

+ 1 - 1
src/map/clif.cpp

@@ -6001,7 +6001,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
 	WBUFW(buf,18)= status->def_ele;
 	for(i=0;i<9;i++)
 //		The following caps negative attributes to 0 since the client displays them as 255-fix. [Skotlex]
-		WBUFB(buf,20+i)= (unsigned char)((fix=elemental_attribute_db.getAttribute(i+1,status->def_ele, status->ele_lv))<0?0:fix);
+		WBUFB(buf,20+i)= (unsigned char)((fix=elemental_attribute_db.getAttribute(status->ele_lv, i+1, status->def_ele))<0?0:fix);
 
 	clif_send(buf,packet_len(0x18c),&sd->bl,sd->status.party_id>0?PARTY_SAMEMAP:SELF);
 }

+ 1 - 1
src/map/status.cpp

@@ -16003,7 +16003,7 @@ AttributeDatabase elemental_attribute_db;
  * @param level Element level 1 ~ MAX_ELE_LEVEL
  */
 int16 AttributeDatabase::getAttribute(uint16 level, uint16 atk_ele, uint16 def_ele) {
-	if (!CHK_ELEMENT(atk_ele) || !CHK_ELEMENT(def_ele) || !CHK_ELEMENT_LEVEL(level))
+	if (!CHK_ELEMENT(atk_ele) || !CHK_ELEMENT(def_ele) || !CHK_ELEMENT_LEVEL(level+1))
 		return 100;
 
 	return this->attr_fix_table[level][atk_ele][def_ele];