Resolves some mistakes for getAttribute (#6207)
Follow-up 4d2c5b02d3
Fixed #6205
Thanks to @sonniez
This commit is contained in:
parent
19ef916f6e
commit
eb8c06743e
@ -6001,7 +6001,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
|
|||||||
WBUFW(buf,18)= status->def_ele;
|
WBUFW(buf,18)= status->def_ele;
|
||||||
for(i=0;i<9;i++)
|
for(i=0;i<9;i++)
|
||||||
// The following caps negative attributes to 0 since the client displays them as 255-fix. [Skotlex]
|
// 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);
|
clif_send(buf,packet_len(0x18c),&sd->bl,sd->status.party_id>0?PARTY_SAMEMAP:SELF);
|
||||||
}
|
}
|
||||||
|
@ -16003,7 +16003,7 @@ AttributeDatabase elemental_attribute_db;
|
|||||||
* @param level Element level 1 ~ MAX_ELE_LEVEL
|
* @param level Element level 1 ~ MAX_ELE_LEVEL
|
||||||
*/
|
*/
|
||||||
int16 AttributeDatabase::getAttribute(uint16 level, uint16 atk_ele, uint16 def_ele) {
|
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 100;
|
||||||
|
|
||||||
return this->attr_fix_table[level][atk_ele][def_ele];
|
return this->attr_fix_table[level][atk_ele][def_ele];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user