Exemple #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);
            }
        }
Exemple #2
0
 internal async Task <List <NpcState> > GetNpcStates(Contract.Npc npcId, int?userId)
 {
     return(await npcStateRepo.RetrieveNpcState(npcId, userId));
 }
Exemple #3
0
 public async Task <NpcAction> InteractWithNpc(Contract.Npc npcId, int action, User activeUser)
 {
     return(await getNpc(npcId).Interact(action, activeUser));
 }
Exemple #4
0
 public async Task <NpcConfig> GetNpcDetails(Contract.Npc npcId, User activeUser)
 {
     return(await getNpc(npcId).GetDetails(activeUser));
 }
Exemple #5
0
 public async Task <NpcOptions> GetOptions(Contract.Npc npcId, User activeUser)
 {
     return(await getNpc(npcId).GetOptions(activeUser));
 }