mangosthree / server

Mangos THREE is a server for World of Warcraft: Cataclysm. The server serves full world content including authentication & scripts support. Compatible with World of Warcraft client 4.3.4 (Build 15595). Report all issues at https://www.getmangos.eu/bug-tracker/mangos-three/ - Playable but unstable. In development.
GNU General Public License v2.0
88 stars 48 forks source link

Fixed issue with NPC quest indicators not displaying properly. #88

Closed comwilson closed 2 months ago

comwilson commented 2 months ago

Player::SendQuestGiverStatusMultiple() is called whenever the player accepts or hands in a quest, or levels up. Its function is to send a list of all the local quest-giving NPCs and what their status is so the client can display the proper icon above them.

Because the method was never executing a secondary call to getDialogStatus from the WorldSession when the script manager was returning an undefined status, due to a misplaced equality operator, every NPC was being given an undefined dialog status. Additionally, due to the local variable dialogStatus being declared as a uint8, the return value from ScriptMgr::GetDialogStatus() was being truncated. Because of this, the data packet being sent back to the client was improperly formatted, causing all local NPCs to have randomly selected icons.


This change is Reviewable

i-am-fyre commented 2 months ago

I've tested the fix - works as expected! Great job @comwilson!

billy1arm commented 2 months ago

@comwilson Thank you for you contribution