Jump to content
  • Journeyman Riding reduces to 75/75 on relog


    madmax
    • Status: Completed
      Main Category: Core / Mangos Daemon
      Sub-Category: Code Enhancement
      Version: 21.3 Milestone: 21 Priority: Normal
      Implemented Version: 21.3

    Players riding skill 762 resets to 75/75 dispite having just brought the 150 skill (spell 33392)

    This issue is confirmed and awaiting fix.

    To reproduce:
    [LIST]
    [*]Leveled human character to 60
    [*]Add spell 33388 (.learn 33388)
    [*]Add spell 33392 (.learn 33392)
    [*].setskill 762 150
    [/LIST]
    You should now have the character at 150/150 riding skill level.
    [LIST]
    [*]Relog to character screen and back and it will be 75/75
    [/LIST]


    Any fix should take into consideration that it should check players for the related spells (33388 / 33392 and so on) and set there skill accordingly.

    Notes: Players can have the spells for riding but there seems to be no correlation between the riding spell and the skill level.


    User Feedback

    Recommended Comments

    Related: [url]https://github.com/TrinityCore/TrinityCore/issues/14851[/url]
    Also a possible fix is described there.


    Here is a quote incase the issue is lost:
    [QUOTE]This bug may be impossible to reproduce on normal situation and it only affects riding.
    In general you would need to get a riding skill and then any spell that has learn skill effect for any higher riding skill.

    Learning [url]http://wotlk.openwow.com/spell=33388[/url] and then [url]http://wotlk.openwow.com/spell=52382[/url] causes a bug where your riding is at 75 and max riding is at 150. Cause of this you cant learn any riding above that. Also you can not unlearn [url]http://wotlk.openwow.com/spell=33391[/url] after getting bugged even by unlearning the whole skill - learning it again says you already have it.

    .learn 33388
    .cast 52382
    The reason it buggs is that the learn skill effect uses character's pure skill value as the current skill value for SetSkill function.
    However on LearnSpell functions there is a special step that uses SpellMgr::GetSpellLearnSkill to correct the skill value for riding to be 75*skillstep.

    TC: 239f0b4
    TDB 58
    3.3.5, may affect other branches

    [/QUOTE]

    Link to comment
    Share on other sites

    It looks like the bug was introduced by [URL="https://github.com/mangoszero/server/commit/e16313c5b2617b364224b1fb82e5399cb32c0af1#diff-455b2dabe05641574822077561cec24e"]this commit[/URL] and empowered by [URL="https://github.com/mangoszero/server/commit/8261268c69c598b189d866310f35cb967ee41f64"]this one[/URL]. The new overriding spell is set correctly and client is informed about it, but then [FONT=Courier New]Player::addSpell([/FONT] for an unclear reason terminates prematurely [URL="https://github.com/mangoszero/server/blob/develop21/src/game/Object/Player.cpp#L2972"]here[/URL] signaling that the spell cannot be learned. In between, the skill is set/corrected in the method [URL="https://github.com/mangoszero/server/blob/develop21/src/game/Object/Player.cpp#L3011"]below that return[/URL].

    I see the following options:
    1) make use of EFFECT_0 of the learned riding spell (which is dummy effect) in a simple spellscript setting the skill value. It looks like there are 8 of such spells;
    2) correct the added code in order to soften the condition for premature termination of [FONT=Courier New]Player::addSpell([/FONT]. btw the code does not look good having large replicated parts.

    I would prefer the 2nd option, but for that we better ask [URL="https://www.getmangos.eu/members/h0zen/"]the patch author[/URL].

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • 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