feat: Adds delegate events for Help system (#2054)

This commit is contained in:
Guyute 2025-01-10 15:34:02 -05:00 • committed by GitHub
parent cc61c1d6d2
commit 1da5a49baf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 49 additions and 8 deletions

View file

@ -1,4 +1,5 @@
using System;
using Server.Engines.Help;
using Server.Factions;
using Server.Gumps;
using Server.Mobiles;
@ -194,16 +195,16 @@ namespace Server.Menus.Questions
m_Mobile.SendLocalizedMessage(1010588); // You choose not to go to any city.
}
}
else
{
var index = info.ButtonID - 1;
var entries = IsInSecondAgeArea(m_Mobile) ? m_T2AEntries : m_Entries;
if (index >= 0 && index < entries.Length)
{
Teleport(entries[index]);
}
var index = info.ButtonID - 1;
var entries = IsInSecondAgeArea(m_Mobile) ? m_T2AEntries : m_Entries;
if (index >= 0 && index < entries.Length)
{
Teleport(entries[index]);
}
HelpEvents.InvokeStuckMenu(m_Mobile);
}
private void Teleport(StuckMenuEntry entry)