Beispiel #1
0
        private Boss GetBoss(string target)
        {
            Boss  boss;
            ulong id;

            if (ulong.TryParse(target, out id))
            {
                if (BossList.TryGetValue(id, out boss))
                {
                    return(boss);
                }
            }
            var player = Server.GetPlayerByName(target);

            if (player == null)
            {
                return(null);
            }
            return(BossList.TryGetValue(player.Id, out boss) ? boss : null);
        }
Beispiel #2
0
        private Boss GetBoss(Player target)
        {
            Boss boss;

            return(BossList.TryGetValue(target.Id, out boss) ? boss : null);
        }