예제 #1
0
        public override object Evaluate(List <string> args, ExpressionEvaluator evaluator, Character player, Creature target, CastedSpell spell)
        {
            ExpectingArguments(args, 1);
            char[] trimChars    = { '"', ' ' };
            string shortcutName = args[0].Trim(trimChars);

            if (player == null)
            {
                return(null);
            }

            PlayerActionShortcut shortcut = AllActionShortcuts.Get(player.playerID, shortcutName).FirstOrDefault();

            if (shortcut == null)
            {
                return(null);
            }
            OnActivateShortcutRequest(player, new ShortcutEventArgs(shortcut));
            return(null);
        }
예제 #2
0
        public override object Evaluate(List <string> args, ExpressionEvaluator evaluator, Creature player, Target target, CastedSpell spell, DiceStoppedRollingData dice = null)
        {
            ExpectingArguments(args, 2);
            char[] trimChars    = { '"', ' ' };
            string shortcutName = args[1].Trim(trimChars);

            if (player == null)
            {
                return(null);
            }

            PlayerActionShortcut shortcut = AllActionShortcuts.Get(player.IntId, shortcutName).FirstOrDefault();

            if (shortcut == null)
            {
                return(null);
            }

            int delayMs = MathUtils.GetInt(args[0].Trim());

            OnActivateShortcutRequest(player, new ShortcutEventArgs(shortcut, delayMs));
            return(null);
        }