Sense - show 0 for negatives (#4213)
* Fixes #4212. * Sense's negative informational stats will now be capped to 0. Thanks to @flamefury!
This commit is contained in:
parent
34971e57fa
commit
19835b638b
@ -5843,7 +5843,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
|
||||
{
|
||||
struct status_data *status;
|
||||
unsigned char buf[64];
|
||||
int i;//, fix;
|
||||
int i, fix;
|
||||
|
||||
nullpo_retv(sd);
|
||||
nullpo_retv(dst);
|
||||
@ -5865,9 +5865,8 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
|
||||
+(battle_config.estimation_type&2?status->mdef2:0);
|
||||
WBUFW(buf,18)= status->def_ele;
|
||||
for(i=0;i<9;i++)
|
||||
WBUFB(buf,20+i)= (unsigned char)battle_attr_ratio(i+1,status->def_ele, status->ele_lv);
|
||||
// The following caps negative attributes to 0 since the client displays them as 255-fix. [Skotlex]
|
||||
// WBUFB(buf,20+i)= (unsigned char)((fix=battle_attr_ratio(i+1,status->def_ele, status->ele_lv))<0?0:fix);
|
||||
WBUFB(buf,20+i)= (unsigned char)((fix=battle_attr_ratio(i+1,status->def_ele, status->ele_lv))<0?0:fix);
|
||||
|
||||
clif_send(buf,packet_len(0x18c),&sd->bl,sd->status.party_id>0?PARTY_SAMEMAP:SELF);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user