25 lines
No EOL
725 B
C#
25 lines
No EOL
725 B
C#
using System.Threading.Tasks;
|
|
using WingsEmu.Game._NpcDialog;
|
|
using WingsEmu.Game._NpcDialog.Event;
|
|
using WingsEmu.Game.Entities;
|
|
using WingsEmu.Game.Extensions;
|
|
using WingsEmu.Game.Networking;
|
|
using WingsEmu.Packets.Enums;
|
|
|
|
namespace WingsEmu.Plugins.BasicImplementations.NpcDialogs;
|
|
|
|
public class UpgradeItemNpcHandler : INpcDialogAsyncHandler
|
|
{
|
|
public NpcRunType[] NpcRunTypes => new[] { NpcRunType.UPGRADE_ITEM_NPC };
|
|
|
|
public async Task Execute(IClientSession session, NpcDialogEvent e)
|
|
{
|
|
INpcEntity npcEntity = session.CurrentMapInstance.GetNpcById(e.NpcId);
|
|
if (npcEntity == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
session.SendWopenPacket(WindowType.UPGRADE_ITEM_NPC);
|
|
}
|
|
} |