Jump to content

D Q

Members
  • Posts

    28
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Bug Comments posted by D Q

  1. 1 hour ago, Meltie said:

    @D Q There are two authors to this commit, Fyre and I. Just never got around to fixing the issue yet and just being busy outside of the project.
    Feel free to make a PR with the fix and will get it pushed out.

    @Meltie Thanks for the quick response... I would love to contribute. But TBH, I am not very certain I understand the intention of that piece of the code. Only spotted the obvious "prof" part. Might create a PR and discuss further.

  2. Looking at the commit that changed this code https://github.com/mangosone/server/commit/360ddbdf862780c35664d44e15f9de9a3be13dab#diff-60492af07b2ca76bed925294d27c48cab25f8db3a33423e3db010c3d800e8b68L4460

    I guess it should be like below. But I am not very familiar with the objects either.

        bool prof = SpellMgr::IsProfessionSpell(trainer_spell->spell);
    	// if we use || here all profession skills are "red"
        if (prof && trainer_spell->reqLevel && (trainer_spell->reqLevel) < reqLevel)
        {
            return TRAINER_SPELL_RED;
        }
    
        // check skill requirement
        // I am not sure, but the previous version checks !prof. Similarly, if we have "prof || xxxx" here, all profession skills are red
        if (!prof || trainer_spell->reqSkill && GetBaseSkillValue(trainer_spell->reqSkill) < trainer_spell->reqSkillValue)
        {
            return TRAINER_SPELL_RED;
        }

     

    @Fyre, sorry for tagging you here. But looks like you are the author of that commit. can you take a look?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use