Пример #1
0
        public static void OnEmoticonRequest(IPlayerEntity player, GuriEvent e)
        {
            if (!(e.Data >= 973 && e.Data <= 999 && !player.Character.EmoticonsBlocked))
            {
                return;
            }

            // todo receiver type
            player.BroadcastAsync(player.EmojiToEffectPacket((EmojiType)e.Data)).ConfigureAwait(false).GetAwaiter().GetResult();

            Log.Info($"[GURI][EMOTICON] {player.Character.Name} used emoji : ");
        }
Пример #2
0
        public void Handle(IPlayerEntity player, GuriEvent args)
        {
            if (player == null)
            {
                return;
            }

            if (!HandlersByDialogId.TryGetValue(args.EffectId, out GuriRequestHandler handler))
            {
                return;
            }

            handler.Handle(player, args);
        }
Пример #3
0
        public static void ReleasePets(IPlayerEntity player, GuriEvent e)
        {
            if (e.Data != 8023)
            {
                return;
            }

            ItemInstanceDto item = player.Inventory.GetItemFromSlotAndType(e.InvSlot, InventoryType.Equipment);

            if (item == null)
            {
                return;
            }

            player.EmitEvent(new InventoryUseItemEvent
            {
                Item   = item,
                Option = 50
            });

            Log.Info($"[GURI][RELEASE_PETS] {player.Character.Name} used Pearl : ");
        }
Пример #4
0
 public void Handle(IPlayerEntity player, GuriEvent e)
 {
     _func(player, e);
 }
 public static void OnShellIdentifyRequest(IPlayerEntity player, GuriEvent e)
 {
     Log.Info($"[GURI][SHELL_IDENTIFY] {player.Character.Name} identified shell : ");
 }