public TestTrader(GInt gInt, int?p) : base(gInt, "Торговец С. О. Лями", p, new List <IBaseActions> { new DealerAction(new List <CItemInventory> { new CItemInventory(GItemsList.GetId("Палка")), } , 10) , new DealerAction(new List <CItemInventory> { new CItemInventory(GItemsList.GetId("Говно")) } , 20), new DealerAction(new List <CItemInventory> { new CItemInventory(GItemsList.GetId("Металл")) } , 40), }, "/img/baryga.jpg" ) { Description = "Я вас категорически приветствую.\nПока вы осматриваете ассортимент,\nпредлагаю отведать наш новый эликсир здоровья."; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } //app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); app.UseCookiePolicy(); GMobsList.init(); GItemsList.init(); GWorld.init(); }
public CItemDescription(int id, string name, string description, string picture) { if (GItemsList.ItemsList.ContainsKey(id)) { throw new Exception("Item already exist"); } Id = id; Name = name; Description = description; Picture = picture; GItemsList.Add(this); }
public virtual CItemDescription Description() { return(GItemsList.Get(this.Id)); }
public override CItemDescription Description() { return(((CEquipmentDescription)GItemsList.Get(Id)).Use(Bonus)); }