Ejemplo n.º 1
0
        public static SpellHandle Acquire(uint serial)
        {
            SpellHandle spell = default;

            if (!_mobiles.TryGetValue(serial, out spell))
            {
                _mobiles.Add(serial, spell = new SpellHandle());
            }

            return(spell);
        }
Ejemplo n.º 2
0
        private static void ChatHandlers_OnSpellCast(Mobile mob, SpellAction value)
        {
            if (mob == World.Player)
            {
                _lastSpell = value;
                GameActions.Print($"Player casting {_lastSpell}");
            }

            SpellHandle spell = default;

            if (!_mobiles.TryGetValue(mob.Serial, out spell))
            {
                _mobiles.Add(mob.Serial, spell = new SpellHandle());
            }

            spell.Value = value;
        }