Scripts/Gossips: Set gossip menu id for scripts that load menu items from database
Port From (https://github.com/TrinityCore/TrinityCore/commit/e65fae7bcd451a2f779c3a6097d0e072a673c384)
This commit is contained in:
@@ -7406,6 +7406,8 @@ namespace Game.Entities
|
||||
// Closes the Menu
|
||||
public void CloseGossipMenu() { PlayerTalkClass.SendCloseGossip(); }
|
||||
|
||||
public void InitGossipMenu(uint menuId) { PlayerTalkClass.GetGossipMenu().SetMenuId(menuId); }
|
||||
|
||||
//Clears the Menu
|
||||
public void ClearGossipMenu() { PlayerTalkClass.ClearMenus(); }
|
||||
}
|
||||
|
||||
@@ -214,6 +214,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.TombOfSeven
|
||||
switch (action)
|
||||
{
|
||||
case eTradeskill.GossipActionInfoDef + 1:
|
||||
player.InitGossipMenu(TextIds.GossipSelectDoomrel);
|
||||
player.AddGossipItem(TextIds.GossipSelectDoomrel, TextIds.GossipMenuIdContinue, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 2);
|
||||
player.SendGossipMenu(2605, me.GetGUID());
|
||||
break;
|
||||
@@ -232,6 +233,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockDepths.TombOfSeven
|
||||
|
||||
public override bool OnGossipHello(Player player)
|
||||
{
|
||||
player.InitGossipMenu(TextIds.GossipMenuChallenge);
|
||||
player.AddGossipItem(TextIds.GossipMenuChallenge, TextIds.GossipMenuIdChallenge, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
player.SendGossipMenu(2601, me.GetGUID());
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Scripts.World.NpcInnkeeper
|
||||
|
||||
public override bool OnGossipHello(Player player)
|
||||
{
|
||||
player.InitGossipMenu(Gossip.MenuId);
|
||||
if (Global.GameEventMgr.IsHolidayActive(HolidayIds.HallowsEnd) && !player.HasAura(SpellIds.TrickOrTreated))
|
||||
player.AddGossipItem(Gossip.MenuEventId, 0, eTradeskill.GossipSenderMain, eTradeskill.GossipActionInfoDef + 1);
|
||||
|
||||
|
||||
@@ -1417,6 +1417,7 @@ namespace Scripts.World.NpcSpecial
|
||||
|
||||
public override bool OnGossipHello(Player player)
|
||||
{
|
||||
player.InitGossipMenu(GossipMenus.MenuIdWormhole);
|
||||
if (me.IsSummon())
|
||||
{
|
||||
if (player == me.ToTempSummon().GetSummoner())
|
||||
|
||||
Reference in New Issue
Block a user