예제 #1
0
        private Components.NPCs.Npc getNpc(Contract.Npc id)
        {
            switch (id)
            {
            case Contract.Npc.MrLegitlyFestive: return(new MrLegitlyFestive(this, ConfigRepo, TransactionScopeFactory));

            case Contract.Npc.WorldPizzaOrganization: return(new WorldPizzaOrganization(this, ConfigRepo, TransactionScopeFactory));

            default: throw new CritterException("No such NPC exists.", null, System.Net.HttpStatusCode.NotFound);
            }
        }
예제 #2
0
 internal async Task <List <NpcState> > GetNpcStates(Contract.Npc npcId, int?userId)
 {
     return(await npcStateRepo.RetrieveNpcState(npcId, userId));
 }
예제 #3
0
 public async Task <NpcAction> InteractWithNpc(Contract.Npc npcId, int action, User activeUser)
 {
     return(await getNpc(npcId).Interact(action, activeUser));
 }
예제 #4
0
 public async Task <NpcConfig> GetNpcDetails(Contract.Npc npcId, User activeUser)
 {
     return(await getNpc(npcId).GetDetails(activeUser));
 }
예제 #5
0
 public async Task <NpcOptions> GetOptions(Contract.Npc npcId, User activeUser)
 {
     return(await getNpc(npcId).GetOptions(activeUser));
 }