public static void Handle(WorldClient client,InteractiveRecord ele)
 {
     var interaction = InteractiveActionsManager.FirstOrDefault(x => x.Key ==ele.ActionType.ToLower());
     if (interaction.Value != null)
     {
         client.Send(new InteractiveUsedMessage((uint)client.Character.Id,(uint) ele.ElementId,(ushort)ele.SkillId,30));
         client.Send(new InteractiveUseEndedMessage((uint)ele.ElementId,(ushort) ele.SkillId));
         try
         {
             interaction.Value(client, ele);
         }
         catch (Exception ex)
         {
             client.Character.NotificationError( ele.ActionType + ": " + ex.Message);
         }
     }
     else
         client.Character.Reply("[Interactives] Unable to handle (" +ele.ActionType + ")",System.Drawing.Color.Red);
 }
        public static void Zaap(WorldClient client,InteractiveRecord ele)
        {
            if (client.Character.CurrentDialogType == DialogTypeEnum.DIALOG_TELEPORTER)
                return;
            client.Character.CurrentDialogType = DialogTypeEnum.DIALOG_TELEPORTER;
            var maps = new List<int>();
            var subareas = new List<ushort>();
            var costs = new List<ushort>();
            var tptype = new List<sbyte>();
            foreach (InteractiveRecord interactive in InteractiveRecord.GetInteractivesByActionType("Zaap"))
            {
                if (interactive.OptionalValue1 == ele.OptionalValue1)
                {
                    maps.Add(interactive.MapId);
                    subareas.Add(MapRecord.GetSubAreaId(interactive.MapId));
                    costs.Add(ZaapCost);
                    tptype.Add((sbyte)TeleporterTypeEnum.TELEPORTER_ZAAP);
                }

            }
            client.Send(new ZaapListMessage((sbyte)TeleporterTypeEnum.TELEPORTER_ZAAP, maps, subareas, costs, tptype,client.Character.Record.SpawnPointMapId));
        }
 static void Document(WorldClient client,InteractiveRecord ele)
 {
     client.Send(new DocumentReadingBeginMessage(ushort.Parse(ele.OptionalValue1)));
 }
 static void Craft(WorldClient client,InteractiveRecord ele)
 {
     client.Character.CraftInstance = new CraftExchange(client, uint.Parse(ele.OptionalValue1),sbyte.Parse(ele.OptionalValue2));
     client.Character.CraftInstance.OpenPanel();
 }
 static void Title(WorldClient client,InteractiveRecord ele)
 {
     client.Character.AddTitle(ushort.Parse(ele.OptionalValue1));
 }
        static void Zaapi(WorldClient client,InteractiveRecord ele)
        {
            if (client.Character.CurrentDialogType == DialogTypeEnum.DIALOG_TELEPORTER)
                return;
            client.Character.CurrentDialogType = DialogTypeEnum.DIALOG_TELEPORTER;

            var maps = new List<int>();
            var subareas = new List<ushort>();
            var cost = new List<ushort>();
            var tptype = new List<sbyte>();
            foreach (InteractiveRecord interactive in InteractiveRecord.GetInteractivesByActionType("Zaapi"))
            {
                if (interactive.OptionalValue1 == ele.OptionalValue1)
                {
                    maps.Add(interactive.MapId);
                    subareas.Add(MapRecord.GetSubAreaId(interactive.MapId));
                    cost.Add(ZaapiCost);
                    tptype.Add(0);
                }
            }
            client.Send(new TeleportDestinationsListMessage((sbyte)TeleporterTypeEnum.TELEPORTER_SUBWAY, maps, subareas, cost, tptype));
        }
 static void Teleport(WorldClient client,InteractiveRecord ele)
 {
     client.Character.Teleport(int.Parse(ele.OptionalValue1),short.Parse(ele.OptionalValue2));
 }
 static void Smithmagic(WorldClient client,InteractiveRecord ele)
 {
     client.Character.SmithMagicInstance = new SmithMagicExchange(client,uint.Parse(ele.OptionalValue1));
     client.Character.SmithMagicInstance.OpenPanel();
 }
 static void Paddock(WorldClient client,InteractiveRecord ele)
 {
     client.Character.OpenPaddock();
 }
 static void Emote(WorldClient client,InteractiveRecord ele)
 {
     client.Character.LearnEmote(byte.Parse(ele.OptionalValue1));
 }
 static void Duty(WorldClient client,InteractiveRecord ele)
 {
     foreach (var ornament in OrnamentRecord.Ornaments)
     {
         client.Character.AddOrnament(ornament.Id);
     }
     foreach (var title in TitleRecord.Titles)
     {
         client.Character.AddTitle((ushort)title.Id);
     }
 }