Core/Quests: Set QuestGiverCreatureID for QuestGiverQuestDetails packet

Port From (https://github.com/TrinityCore/TrinityCore/commit/fd364fe52238c11f86618e0f6de81a74d99221a7)
This commit is contained in:
hondacrx
2023-01-11 01:07:21 -05:00
parent ea1206ec71
commit 7c9c7a17d1
+5
View File
@@ -466,6 +466,11 @@ namespace Game.Misc
packet.QuestFlags[2] = (uint)quest.FlagsEx2;
packet.SuggestedPartyMembers = quest.SuggestedPlayers;
// Is there a better way? what about game objects?
Creature creature = ObjectAccessor.GetCreature(_session.GetPlayer(), npcGUID);
if (creature != null)
packet.QuestGiverCreatureID = (int)creature.GetCreatureTemplate().Entry;
// RewardSpell can teach multiple spells in trigger spell effects. But not all effects must be SPELL_EFFECT_LEARN_SPELL. See example spell 33950
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(quest.RewardSpell, Difficulty.None);
if (spellInfo != null)