Ah okay I replaced it, the min MATK works but the max MATK displays as 0.
Here's what I did though.
/*
* Calculates minimum magic attack
*/
unsigned short status_base_matk_min(struct block_list *bl, const struct status_data* status, int level)
{
switch (bl->type) {
case BL_PET:
case BL_MOB:
case BL_MER:
case BL_ELEM:
return status->int_ + level + status->rhw.matk * 70 / 100;
case BL_HOM:
return status_get_homint(bl) + level + (status_get_homint(bl) + status_get_homdex(bl)) / 5;
case BL_PC:
default:
return status->int_ + (status->int_ / 7) * (status->int_ / 7);
}
}
/*
* Calculates maximum magic attack
*/
unsigned short status_base_matk_max(struct block_list *bl, const struct status_data* status, int level)
{
switch (bl->type) {
case BL_PET:
case BL_MOB:
case BL_MER:
case BL_ELEM:
return status->int_ + level + status->rhw.matk * 130 / 100;
case BL_HOM:
return status_get_homint(bl) + level + (status_get_homluk(bl) + status_get_homint(bl) + status_get_homdex(bl)) / 3;
case BL_PC:
default:
return status->int_ + (status->int_ / 5) * (status->int_ / 5);
}
}