Esempio n. 1
0
        public override void Handle(BaseLocationModel model)
        {
            base.Handle(model);
            var manager = IoC.IocContainer.Get <IScoringManager>();

            manager.OnDumpshock(BillingHelper.ParseId(model.CharacterId, "characterId"));
        }
Esempio n. 2
0
        public override void Handle(ImplantInstallModel model)
        {
            base.Handle(model);
            IScoringManager manager;

            switch (model.AbilityId)
            {
            case "autodoc":
                manager = IoC.IocContainer.Get <IScoringManager>();
                manager.OnImplantUninstalled(BillingHelper.ParseId(model.CharacterId, "characterId"), model.AutodocLifestyle);
                break;

            case "repoman-black":
                manager = IoC.IocContainer.Get <IScoringManager>();
                manager.OnImplantDeletedBlack(BillingHelper.ParseId(model.CharacterId, "characterId"));
                break;

            case "repoman-active":
                manager = IoC.IocContainer.Get <IScoringManager>();
                manager.OnImplantDeletedActive(BillingHelper.ParseId(model.CharacterId, "characterId"));
                break;

            default:
                break;
            }
        }
Esempio n. 3
0
        public override void Handle(FoodModel model)
        {
            base.Handle(model);
            var manager = IoC.IocContainer.Get <IScoringManager>();

            manager.OnFoodConsume(BillingHelper.ParseId(model.CharacterId, "characterId"), model.LifeStyle);
        }
Esempio n. 4
0
 public override void Handle(ImplantInstallModel model)
 {
     base.Handle(model);
     if (model.AbilityId == "autodoc")
     {
         var manager = IoC.IocContainer.Get <IScoringManager>();
         manager.OnImplantInstalled(BillingHelper.ParseId(model.CharacterId, "characterId"), model.ImplantLifestyle, model.AutodocLifestyle);
     }
 }
Esempio n. 5
0
        public override void Handle(HealthModel model)
        {
            base.Handle(model);
            IScoringManager scoring;
            IBillingManager billing;
            var             modelId = BillingHelper.ParseId(model.CharacterId, "characterId");

            switch (model.StateTo)
            {
            case "wounded":
                scoring = IoC.IocContainer.Get <IScoringManager>();
                scoring.OnWounded(modelId);
                break;

            case "clinically_dead":
                scoring = IoC.IocContainer.Get <IScoringManager>();
                scoring.OnClinicalDeath(modelId);
                break;

            case "biologically_dead":
                billing = IoC.IocContainer.Get <IBillingManager>();
                billing.DropCharacter(modelId);
                break;

            case "healthy":
                switch (model.StateFrom)
                {
                case "clinically_dead":
                    billing = IoC.IocContainer.Get <IBillingManager>();
                    billing.DropInsurance(modelId);
                    break;

                case "biologically_dead":
                    billing = IoC.IocContainer.Get <IBillingManager>();
                    billing.RestoreCharacter(modelId);
                    break;

                default:
                    break;
                }
                break;

            default:
                break;
            }
        }
Esempio n. 6
0
        public void HandleAbility(AbilityModel model)
        {
            ActiveAbility activeAbilityEnum;

            ModelPrimitives.Abilities.TryGetValue(model.Id, out activeAbilityEnum);
            switch (activeAbilityEnum)
            {
            case ActiveAbility.HowMuch:
                break;

            case ActiveAbility.WhoNeed:
                break;

            case ActiveAbility.PayAndCry:
                break;

            case ActiveAbility.LetHim:
                IocContainer.Get <IAbilityManager>().LetHimPay(BillingHelper.ParseId(model?.CharacterId, "characterId"), BillingHelper.ParseId(model?.TargetCharacterId, "TargetCharacterId"), BillingHelper.ParseId(model?.QrCode?.Data?.DealId, "DealId"), model?.QrCode?.ModelId);
                break;

            case ActiveAbility.Letme:
                IocContainer.Get <IAbilityManager>().LetMePay(BillingHelper.ParseId(model?.CharacterId, "characterId"), BillingHelper.ParseId(model?.QrCode?.Data?.DealId, "DealId"), model?.QrCode?.ModelId);
                break;

            case ActiveAbility.Rerent:
                IocContainer.Get <IAbilityManager>().Rerent(BillingHelper.ParseId(model?.CharacterId, "characterId"), BillingHelper.ParseId(model?.QrCode?.Data?.DealId, "DealId"), model?.QrCode?.ModelId);
                break;

            case ActiveAbility.Marauder:
                IocContainer.Get <IAbilityManager>().Marauder(BillingHelper.ParseId(model?.CharacterId, "characterId"), BillingHelper.ParseId(model?.TargetCharacterId, "TargetCharacterId"));
                break;

            case ActiveAbility.SleepCheck:
                IocContainer.Get <IAbilityManager>().Marauder(BillingHelper.ParseId(model?.CharacterId, "characterId"), BillingHelper.ParseId(model?.bodyStorage?.Data?.Body?.CharacterId, "TargetCharacterId"), true);
                break;

            case ActiveAbility.SaveScoring:
                IocContainer.Get <IAbilityManager>().SaveScoring(BillingHelper.ParseId(model?.TargetCharacterId, "TargetCharacterId"), BillingHelper.ParseId(model?.QrCode?.Data?.DealId, "DealId"), model?.QrCode?.ModelId);
                break;

            default:
                break;
            }
        }