public static SpellHandle Acquire(uint serial) { SpellHandle spell = default; if (!_mobiles.TryGetValue(serial, out spell)) { _mobiles.Add(serial, spell = new SpellHandle()); } return(spell); }
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; }