コード例 #1
0
        public void CommandList(string key, string obj, string target, string fullCommand, Player player, Room room)
        {
            switch (key)
            {
            case "north west":
            case "nw":
                _movement.Move(room, player, "North West", false);
                break;

            case "north east":
            case "ne":
                _movement.Move(room, player, "North East", false);
                break;

            case "south east":
            case "se":
                _movement.Move(room, player, "South East", false);
                break;

            case "south west":
            case "sw":
                _movement.Move(room, player, "South West", false);
                break;

            case "north":
            case "n":
                _movement.Move(room, player, "North", false);
                break;

            case "east":
            case "e":
                _movement.Move(room, player, "East", false);
                break;

            case "south":
            case "s":
                _movement.Move(room, player, "South", false);
                break;

            case "west":
            case "w":
                _movement.Move(room, player, "West", false);
                break;

            case "up":
            case "u":
                _movement.Move(room, player, "Up", false);
                break;

            case "down":
            case "d":
                _movement.Move(room, player, "Down", false);
                break;

            case "flee":
            case "fle":
                _movement.Flee(room, player, "");
                break;

            case "enter":
            case "ent":
                _movement.Enter(player, room, obj);
                break;

            case "look":
            case "l":
                _roomActions.Look(obj, room, player);
                break;

            case "look in":
            case "l in":
                _roomActions.LookInContainer(obj, room, player);
                break;

            case "examine":
            case "exam":
                _roomActions.ExamineObject(obj, room, player);
                break;

            case "taste":
            case "lick":
                _roomActions.TasteObject(obj, room, player);
                break;

            case "touch":
            case "feel":
                _roomActions.TouchObject(obj, room, player);
                break;

            case "smell":
                _roomActions.SmellObject(obj, room, player);
                break;

            case "i":
            case "inv":
            case "inventory":
                _inventory.List(player);
                break;

            case "close":
                _object.Close(obj, room, player);
                break;;

            case "open":
                _object.Open(obj, room, player);
                break;

            case "give":
            case "hand":
                _object.Give(obj, target, room, player, fullCommand);
                break;

            case "loot":
            case "get":
            case "take":
                _object.Get(obj, target, room, player, fullCommand);
                break;

            case "drop":
            case "put":
                _object.Drop(obj, target, room, player, fullCommand);
                break;

            case "cast":
            case "c":
                _spells.DoSpell(obj, player, target, room);
                break;

            case "skill":
            case "skills":
            case "slist":
            case "spells":
                _skills.ShowSkills(player, fullCommand);
                break;

            case "/debug":
                _debug.DebugRoom(room, player);
                break;

            case "newbie":
                _communication.Newbie(obj, room, player);
                break;

            case "ooc":
                _communication.OOC(obj, room, player);
                break;

            case "gossip":
                _communication.Gossip(obj, room, player);
                break;

            case "say":
            case "'":
                _communication.Say(obj, room, player);
                break;

            case "sayto":
            case ">":
                _communication.SayTo(obj, target, room, player);
                break;

            case "yell":
                _communication.Yell(obj, room, player);
                break;

            case "tell":
                _communication.Tells(obj, target, player);
                break;

            case "reply":
                _communication.Reply(obj, player);
                break;

            case "wear":
            case "wield":
                _equipment.Wear(obj, room, player, String.Empty);
                break;

            case "remove":
                _equipment.Remove(obj, room, player);
                break;

            case "eq":
            case "equipment":
                _equipment.ShowEquipment(player);
                break;

            case "score":
                _score.DisplayScore(player);
                break;

            case "kill":
            case "k":
                _combat.Fight(player, obj, room, false);
                break;

            case "sit":
                _movement.Sit(player, room, obj);
                break;

            case "stand":
            case "st":
                _movement.Stand(player, room, obj);
                break;

            case "sleep":
            case "sl":
                _movement.Sleep(player, room, obj);
                break;

            case "wake":
            case "wa":
                _movement.Wake(player, room, obj);
                break;

            case "rest":
            case "re":
                _movement.Rest(player, room, obj);
                break;

            case "social":
            case "socials":
            case "soc":
                _socials.DisplaySocials(player);
                break;

            case "follow":
            case "fol":
                _movement.Follow(player, room, obj);
                break;

            case "group":
                _movement.Group(player, room, obj);
                break;

            case "who":
            case "wh":
                _core.Who(player);
                break;

            case "where":
            case "whe":
                _core.Where(player, room);
                break;

            case "con":
            case "consider":
                _combat.Consider(player, obj, room);
                break;

            case "ql":
            case "questlog":
                _core.QuestLog(player);
                break;

            case "unlock":
                _object.Unlock(obj, room, player);
                break;

            case "lock":
                _object.Lock(obj, room, player);
                break;

            case "list":
            case "li":
                _mobFunctions.List(room, player);
                break;

            case "buy":
            case "by":
            case "b":
                _mobFunctions.BuyItem(obj, room, player);
                break;

            case "sell":
                _mobFunctions.SellItem(obj, room, player);
                break;

            case "inspect":
            case "ins":
                _mobFunctions.InspectItem(obj, room, player);
                break;

            case "heal":
                _healer.List(room, player, obj);
                break;

            case "help":
                _help.DisplayHelpFile(obj, player);
                break;

            case "recall":
            case "reca":
            case "rc":
                _core.Recall(player, room);
                break;

            case "train":
                _core.Train(player, room, obj);
                break;

            case "save":
                _core.Save(player);
                break;

            case "quit":
                _core.Quit(player, room);
                break;

            case "craft":
                _crafting.CraftingManager(player, room, fullCommand);
                break;

            case "cook":
                _cooking.Cook(player, room);
                break;

            case "eat":
            case "chew":
            case "munch":
                _core.Eat(player, room, obj);
                break;

            case "drink":
                _core.Drink(player, room, obj);
                break;

            case "dismount":     // see UtilSkills for Mount
                _core.Dismount(player, room);
                break;

            case "second":     // see UtilSkills for Mount
                _passiveSkills.DualWield(player, null, room, obj);
                break;

            case "affects":
            case "aff":
                _core.Affects(player);
                break;

            case "read":
                _core.Read(player, obj, target, fullCommand);
                break;

            case "write":
                _core.Write(player, obj, target, fullCommand);
                break;

            case "practice":
            case "prac":
                _core.Practice(player, room, obj);
                break;

            case "scan":
                _core.Scan(player, room, obj);
                break;

            case "emote":
                _core.Emote(player, room, fullCommand);
                break;

            case "pmote":
                _core.Pmote(player, room, fullCommand);
                break;

            case "pose":
                _core.Pose(player, fullCommand);
                break;

            case "checkpose":
                _core.CheckPose(player);
                break;

            case "title":
                _core.SetTitle(player, fullCommand);
                break;

            case "/train":     // / denotes admin/imm comands
                _core.TrainSkill(player);
                break;

            case "/restore":
                _core.RestorePlayer(player);
                break;

            case "/setevent":
                _core.SetEvent(player, obj, target);
                break;

            case "/teleport":
                _core.ImmTeleport(player, room, obj);
                break;
                //case "/backup": TODO: this works but need to lock down to admin only
                //    _core.DBDumpToJSON(player);
                break;

            default:
                _commandHandler.HandleCommand(key, obj, target, player, room);
                break;
            }
        }