Jump to content
  • Rhapsody Malt: 1/1 shown twice when you purchase it


    Tuker
    • Status: Awaiting Feedback
      Main Category: Core / Mangos Daemon
      Sub-Category: Private Messaging
      Version: 22.x (Current Master Branch) Milestone: 22 (Current) Priority: New
      Related to:
      Implemented Version: 22.xx (Current Master Branch)

    Yesterday i was playing with a Gnome on MaNGOS Zero.
    Doing quest 'Beer Basted Boar Ribs' in Kharanos (entry id 384 in quest_template) i've noticed that if you buy the item 'Rhapsody Melt' (entry 2894 in item_template) there is a "Rhapsody Malt: 1/1" message that is shown twice.

    After some tries i've found that in code of Player.cpp this message is actually triggered in two location:
    - Line 16006 - method SendQuestUpdateAddItem - OpCode: SMSG_QUESTUPDATE_ADD_ITEM
    - Line 20175 - method BuyItemFromVendor - OpCode: SMSG_BUY_ITEM

    What i have tried is to comment the sendPacket call in BuyItemFromVendor and tested with the following quests:

    Quest with entry id 179 and Title 'Dwarven Outfitters' required item with entry id '750' item name 'Tough Wolf Meat'. (this is a collectin quest killing mobs)

    Quest with entry id 384 and Title 'Beer Basted Boar Ribs' required item with entry id '2894' item name 'Rhapsody Melt'. (this is a killing quest with 1 item that need to be purchased by the innkeper)

    unfortunately i have no experience with OPCODE or client/server workflow.
    Not sure if this can be considered a good fix or not or what this comment can involve.

     

    Attached there are screenshot before and after commenting line 20175.

    before.png

    after.png


    User Feedback

    Recommended Comments

    Same behaviour could be seen during the quest "The Chill of Death" (quest=375) in Tirisfal Glades. Buying Coarse Thread leads to double player notification. But according to the info in description, both issues should have the same solution.

    Link to comment
    Share on other sites
    5 minutes ago, altronrain said:

    Same behaviour could be seen during the quest "The Chill of Death" (quest=375) in Tirisfal Glades. Buying Coarse Thread leads to double player notification. But according to the info in description, both issues should have the same solution.

    Have you tried commenting the send of packet?

    Link to comment
    Share on other sites

    Only respective sniffes give a solid ground to modify current protocol. While solution is efficient, it looks wrong at the same time. Try to buy an item with limited vendor quantity, for example the one from Tharynn Bouden (entry 66), and look at the item number present by the vendor.

    Perhaps conditionally avoid to send the SMSG_QUESTUPDATE_ADD_ITEM packet after SMSG_BUY_ITEM is the proper way. I have no sniffes as well.

    Link to comment
    Share on other sites
    2 hours ago, Olion said:

    Only respective sniffes give a solid ground to modify current protocol. While solution is efficient, it looks wrong at the same time. Try to buy an item with limited vendor quantity, for example the one from Tharynn Bouden (entry 66), and look at the item number present by the vendor.

    Perhaps conditionally avoid to send the SMSG_QUESTUPDATE_ADD_ITEM packet after SMSG_BUY_ITEM is the proper way. I have no sniffes as well.

    You are probably right.
    it look wrong to me to, cause If it fit this behaviour, is not si clean in regular behaviour(i.e. A player buying things)

    Unfortunately from what can i see no relation in the code base between the two event, so far i’m not sure you can easily check if one message has been sent.

    but i have like 0 experience with protocol and opcodes so i was just trying to figure it out.

    what i think is that probably is wrong that at Client Side the message it’s triggered with the opcode SMSG_BUY_ITEM

    Link to comment
    Share on other sites
    4 hours ago, Tuker said:

    what i think is that probably is wrong that at Client Side the message it’s triggered with the opcode SMSG_BUY_ITEM

    I'm sure the Blizz had the task of traffic minimizing in mind. At their position, it looked easily: search the traffic log (sniffes, to us) for repeating packet (opcode) patterns and modify the protocol implementation to reduce them.

    On the contrary, the core implementation doesn't look very good. Player::StoreNewItem and Player::EquipNewItem both do ItemAddedQuestCheck(...) sending the SMSG_QUESTUPDATE_ADD_ITEM packet. We can either provide the two methods a flag to avoid ItemAddedQuestCheck (the signature change), or inline the corrected code from the methods right into Player::BuyItemFromVendor(...). I like the second option better, while the proper way may be even changing Player::StoreNewItem and Player::EquipNewItem as well as their callers.

    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