Closed Helias closed 5 months ago
I was wrong
but still, there is something wrong here, mana sometimes is considered as "2" like in g_statToJson
or like "1" for ITEM_MOD_MANA
in defines.php
.
In item.class.php
where there is the comment // i think i fucked up somewhere mapping item_mods: offsets may be required somewhere
, there is this weird association between mod mana and health (1, 2) with locale_enus.php
where Mana is 0 and Health is 1
So, i'm primarrily going off of enum ItemModType. This is very siminilar to g_statToJson but not quite identical. My old comment was probably me wracking my brain how to reconcile these two. And since g_statToJson interacts weirdly with the item scaling system i don't know if i can simply move mana to idx 0 where it belongs.
i suppose it is correct to change https://github.com/Sarjuuk/aowow/blob/70a93d99055c80b91e7a361add4480eca455771d/includes/types/item.class.php#L754-L770
to
$jsonType = $type;
// base stat
switch ($type)
{
case ITEM_MOD_MANA:
$jsonType = 2; // g_statToJson expects mana on idx 2
case ITEM_MOD_HEALTH:
case ITEM_MOD_AGILITY:
case ITEM_MOD_STRENGTH:
case ITEM_MOD_INTELLECT:
case ITEM_MOD_SPIRIT:
case ITEM_MOD_STAMINA:
$x .= '<span><!--stat'.$jsonType .'-->'.($qty > 0 ? '+' : '-').abs($qty).' '.Lang::item('statType', $type).'</span><br />';
break;
default: // rating with % for reqLevel
$green[] = $this->parseRating($type, $qty, $interactive, $causesScaling);
}
are there even heirlooms that grant a flat increase of mana/health..?
I made a quick check and I did not find items with stat type 0, about health you can find some items
https://wowgaming.altervista.org/aowow/?item=6673&xml
in any case, there is a discrepancy between tooltip and json stats
there is something weird indeed
aaaaand it's gone
d16b08bb297dd1522040a01d1ba8958fba52d155
Describe the bug and how to reproduce itinitem.class.php
we are considering asstatType 0 value
theMANA
but it's wrong, 0 should be a null/blank value and mana should be2
(1 is Health, which is correct but Mana should not be 0 but 2).Inincludes/types/item.class.php
line 746 there is a funny comment// i think i fucked up somewhere mapping item_mods: offsets may be required somewhere
I think that this comment refers probably to this error.Same error is present inlocale_enus.php
line 1803 where statType 0 is mana and statType 2 is null.In AzerothCore I can't find in item_template an item with stat_type* = 2, so I can't double-check with wowhead or other sources (it seems unused), but it should not be 0 I guess.