Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

Calculate ilvl of heirlooms #242

Closed BarbzYHOOL closed 3 years ago

BarbzYHOOL commented 4 years ago

In AzerothCore (and probably in TC too), there is a formula to calc the ilvl of heirlooms, it's player level * 2.33 that's it

check itemtemplate.h

I don't know how blizzlike it is, but it sounds fine that max ilvl = 186

Sarjuuk commented 4 years ago

Is it really handled like that? I remember seeing Heirlooms as level 1. Like .. you even get an item level error when you try applying something else than classic enchantments. What would that change even affect (in Aowow) Most of the time you view an item separated from a character anyway.

Also there is no such thing in https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Item/ItemTemplate.h

BarbzYHOOL commented 4 years ago

damn it's so weird, found some issues with it yesterday in AzerothCore Apparently in TC the code is different and not in same file:

https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Item/ItemTemplate.cpp lookup for GetItemLevelIncludingQuality

In AC, it's:

    float GetItemLevelIncludingQuality(uint8 pLevel) const
    {
        auto itemLevel = (float)ItemLevel;
        switch (Quality)
        {
            case ITEM_QUALITY_POOR:
            case ITEM_QUALITY_NORMAL:
            case ITEM_QUALITY_UNCOMMON:
                itemLevel -= 26.0f;
                break;
            case ITEM_QUALITY_RARE:
                itemLevel -= 13.0f;
                break;
            case ITEM_QUALITY_HEIRLOOM:
                itemLevel = pLevel*2.33f;
                break;
            case ITEM_QUALITY_ARTIFACT:
            case ITEM_QUALITY_EPIC:
            case ITEM_QUALITY_LEGENDARY:
            default:
                break;
        }
        return std::max<float>(0.f, itemLevel);
    }

:( not even sure who is right or wrong

PS: can't tell u about official WOW, never played during wotlk

BarbzYHOOL commented 4 years ago

Apparently it scales on wowhead too depending on the player's level but ofc formula is now different https://www.wowhead.com/item=122256/tattered-dreadmist-leggings?bonus=0 and who is right or wrong is a matter of the emulators, not of aowow (aowow should just represent its base emulator aka TC)

Sarjuuk commented 3 years ago

Thanks for the suggestion, but I'll be skipping this one. Item level has no effect on the heirloom in v3.3.5, only player level has and that is already accounted for.

heyitsbench commented 1 year ago

For the record, on Classic with the case of the Tattered Dreadmist Robe at least, it shows no item level in the tooltip at all. Using the addon TacoTip with only the heirloom equipped at level 80, the GearScore of the character is 242, but an iLvl of 0.