Core/Creature: Added possibility to give creatures multiple gossip menu ids and control them via conditions

Port From (https://github.com/TrinityCore/TrinityCore/commit/36044a9470e9c39a71916e908ab6cf4f95677793)
This commit is contained in:
hondacrx
2023-04-25 08:02:18 -04:00
parent e5d414b8b1
commit 9d4be0003b
10 changed files with 237 additions and 168 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ namespace Game
_player.PlayerTalkClass.ClearMenus();
if (!unit.GetAI().OnGossipHello(_player))
{
GetPlayer().PrepareGossipMenu(unit, unit.GetGossipMenuId(), true);
GetPlayer().PrepareGossipMenu(unit, _player.GetGossipMenuForSource(unit), true);
GetPlayer().SendPreparedGossip(unit);
}
}
+1 -1
View File
@@ -68,7 +68,7 @@ namespace Game
if (creature.GetAI().OnGossipHello(_player))
return;
GetPlayer().PrepareGossipMenu(creature, creature.GetGossipMenuId(), true);
GetPlayer().PrepareGossipMenu(creature, _player.GetGossipMenuForSource(creature), true);
GetPlayer().SendPreparedGossip(creature);
}