/* EQEmu: EQEmulator
Copyright (C) 2001-2026 EQEmu Development Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
/**
* DO NOT MODIFY THIS FILE
*
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://docs.eqemu.dev/developer/repositories
*/
#pragma once
#include "common/database.h"
#include "common/strings.h"
#include
class BaseItemsRepository {
public:
struct Items {
int32_t id;
int16_t minstatus;
std::string Name;
int32_t aagi;
int32_t ac;
int32_t accuracy;
int32_t acha;
int32_t adex;
int32_t aint;
uint8_t artifactflag;
int32_t asta;
int32_t astr;
int32_t attack;
int32_t augrestrict;
int8_t augslot1type;
int8_t augslot1visible;
int8_t augslot2type;
int8_t augslot2visible;
int8_t augslot3type;
int8_t augslot3visible;
int8_t augslot4type;
int8_t augslot4visible;
int8_t augslot5type;
int8_t augslot5visible;
int8_t augslot6type;
int8_t augslot6visible;
int32_t augtype;
int32_t avoidance;
int32_t awis;
int32_t bagsize;
int32_t bagslots;
int32_t bagtype;
int32_t bagwr;
int32_t banedmgamt;
int32_t banedmgraceamt;
int32_t banedmgbody;
int32_t banedmgrace;
int32_t bardtype;
int32_t bardvalue;
int32_t book;
int32_t casttime;
int32_t casttime_;
std::string charmfile;
std::string charmfileid;
int32_t classes;
uint32_t color;
std::string combateffects;
int32_t extradmgskill;
int32_t extradmgamt;
int32_t price;
int32_t cr;
int32_t damage;
int32_t damageshield;
int32_t deity;
int32_t delay;
uint32_t augdistiller;
int32_t dotshielding;
int32_t dr;
int32_t clicktype;
int32_t clicklevel2;
int32_t elemdmgtype;
int32_t elemdmgamt;
int32_t endur;
int32_t factionamt1;
int32_t factionamt2;
int32_t factionamt3;
int32_t factionamt4;
int32_t factionmod1;
int32_t factionmod2;
int32_t factionmod3;
int32_t factionmod4;
std::string filename;
int32_t focuseffect;
int32_t fr;
int32_t fvnodrop;
int32_t haste;
int32_t clicklevel;
int32_t hp;
int32_t regen;
int32_t icon;
std::string idfile;
int32_t itemclass;
int32_t itemtype;
int32_t ldonprice;
int32_t ldontheme;
int32_t ldonsold;
int32_t light;
std::string lore;
int32_t loregroup;
int32_t magic;
int32_t mana;
int32_t manaregen;
int32_t enduranceregen;
int32_t material;
int32_t herosforgemodel;
int32_t maxcharges;
int32_t mr;
int32_t nodrop;
int32_t norent;
uint8_t pendingloreflag;
int32_t pr;
int32_t procrate;
int32_t races;
int32_t range_;
int32_t reclevel;
int32_t recskill;
int32_t reqlevel;
float sellrate;
int32_t shielding;
int32_t size;
int32_t skillmodtype;
int32_t skillmodvalue;
int32_t slots;
int32_t clickeffect;
int32_t spellshield;
int32_t strikethrough;
int32_t stunresist;
uint8_t summonedflag;
int32_t tradeskills;
int32_t favor;
int32_t weight;
int32_t UNK012;
int32_t UNK013;
int32_t benefitflag;
int32_t UNK054;
int32_t UNK059;
int32_t booktype;
int32_t recastdelay;
int32_t recasttype;
int32_t guildfavor;
int32_t UNK123;
int32_t UNK124;
int32_t attuneable;
int32_t nopet;
time_t updated;
std::string comment;
int32_t UNK127;
int32_t pointtype;
int32_t potionbelt;
int32_t potionbeltslots;
int32_t stacksize;
int32_t notransfer;
int32_t stackable;
std::string UNK134;
int32_t UNK137;
int32_t proceffect;
int32_t proctype;
int32_t proclevel2;
int32_t proclevel;
int32_t UNK142;
int32_t worneffect;
int32_t worntype;
int32_t wornlevel2;
int32_t wornlevel;
int32_t UNK147;
int32_t focustype;
int32_t focuslevel2;
int32_t focuslevel;
int32_t UNK152;
int32_t scrolleffect;
int32_t scrolltype;
int32_t scrolllevel2;
int32_t scrolllevel;
int32_t UNK157;
time_t serialized;
time_t verified;
std::string serialization;
std::string source;
int32_t UNK033;
std::string lorefile;
int32_t UNK014;
int32_t svcorruption;
int32_t skillmodmax;
int32_t UNK060;
int32_t augslot1unk2;
int32_t augslot2unk2;
int32_t augslot3unk2;
int32_t augslot4unk2;
int32_t augslot5unk2;
int32_t augslot6unk2;
int32_t UNK120;
int32_t UNK121;
int32_t questitemflag;
std::string UNK132;
int32_t clickunk5;
std::string clickunk6;
int32_t clickunk7;
int32_t procunk1;
int32_t procunk2;
int32_t procunk3;
int32_t procunk4;
std::string procunk6;
int32_t procunk7;
int32_t wornunk1;
int32_t wornunk2;
int32_t wornunk3;
int32_t wornunk4;
int32_t wornunk5;
std::string wornunk6;
int32_t wornunk7;
int32_t focusunk1;
int32_t focusunk2;
int32_t focusunk3;
int32_t focusunk4;
int32_t focusunk5;
std::string focusunk6;
int32_t focusunk7;
uint32_t scrollunk1;
int32_t scrollunk2;
int32_t scrollunk3;
int32_t scrollunk4;
int32_t scrollunk5;
std::string scrollunk6;
int32_t scrollunk7;
int32_t UNK193;
int32_t purity;
int32_t evoitem;
int32_t evoid;
int32_t evolvinglevel;
int32_t evomax;
std::string clickname;
std::string procname;
std::string wornname;
std::string focusname;
std::string scrollname;
int16_t dsmitigation;
int16_t heroic_str;
int16_t heroic_int;
int16_t heroic_wis;
int16_t heroic_agi;
int16_t heroic_dex;
int16_t heroic_sta;
int16_t heroic_cha;
int16_t heroic_pr;
int16_t heroic_dr;
int16_t heroic_fr;
int16_t heroic_cr;
int16_t heroic_mr;
int16_t heroic_svcorrup;
int16_t healamt;
int16_t spelldmg;
int16_t clairvoyance;
int16_t backstabdmg;
std::string created;
int16_t elitematerial;
int16_t ldonsellbackrate;
int32_t scriptfileid;
int16_t expendablearrow;
int32_t powersourcecapacity;
int32_t bardeffect;
int16_t bardeffecttype;
int16_t bardlevel2;
int16_t bardlevel;
int16_t bardunk1;
int16_t bardunk2;
int16_t bardunk3;
int16_t bardunk4;
int16_t bardunk5;
std::string bardname;
int16_t bardunk7;
int16_t UNK214;
int32_t subtype;
int32_t UNK220;
int32_t UNK221;
int32_t heirloom;
int32_t UNK223;
int32_t UNK224;
int32_t UNK225;
int32_t UNK226;
int32_t UNK227;
int32_t UNK228;
int32_t UNK229;
int32_t UNK230;
int32_t UNK231;
int32_t UNK232;
int32_t UNK233;
int32_t UNK234;
int32_t placeable;
int32_t UNK236;
int32_t UNK237;
int32_t UNK238;
int32_t UNK239;
int32_t UNK240;
int32_t UNK241;
int32_t epicitem;
};
static std::string PrimaryKey()
{
return std::string("id");
}
static std::vector Columns()
{
return {
"id",
"minstatus",
"Name",
"aagi",
"ac",
"accuracy",
"acha",
"adex",
"aint",
"artifactflag",
"asta",
"astr",
"attack",
"augrestrict",
"augslot1type",
"augslot1visible",
"augslot2type",
"augslot2visible",
"augslot3type",
"augslot3visible",
"augslot4type",
"augslot4visible",
"augslot5type",
"augslot5visible",
"augslot6type",
"augslot6visible",
"augtype",
"avoidance",
"awis",
"bagsize",
"bagslots",
"bagtype",
"bagwr",
"banedmgamt",
"banedmgraceamt",
"banedmgbody",
"banedmgrace",
"bardtype",
"bardvalue",
"book",
"casttime",
"casttime_",
"charmfile",
"charmfileid",
"classes",
"color",
"combateffects",
"extradmgskill",
"extradmgamt",
"price",
"cr",
"damage",
"damageshield",
"deity",
"delay",
"augdistiller",
"dotshielding",
"dr",
"clicktype",
"clicklevel2",
"elemdmgtype",
"elemdmgamt",
"endur",
"factionamt1",
"factionamt2",
"factionamt3",
"factionamt4",
"factionmod1",
"factionmod2",
"factionmod3",
"factionmod4",
"filename",
"focuseffect",
"fr",
"fvnodrop",
"haste",
"clicklevel",
"hp",
"regen",
"icon",
"idfile",
"itemclass",
"itemtype",
"ldonprice",
"ldontheme",
"ldonsold",
"light",
"lore",
"loregroup",
"magic",
"mana",
"manaregen",
"enduranceregen",
"material",
"herosforgemodel",
"maxcharges",
"mr",
"nodrop",
"norent",
"pendingloreflag",
"pr",
"procrate",
"races",
"`range`",
"reclevel",
"recskill",
"reqlevel",
"sellrate",
"shielding",
"size",
"skillmodtype",
"skillmodvalue",
"slots",
"clickeffect",
"spellshield",
"strikethrough",
"stunresist",
"summonedflag",
"tradeskills",
"favor",
"weight",
"UNK012",
"UNK013",
"benefitflag",
"UNK054",
"UNK059",
"booktype",
"recastdelay",
"recasttype",
"guildfavor",
"UNK123",
"UNK124",
"attuneable",
"nopet",
"updated",
"comment",
"UNK127",
"pointtype",
"potionbelt",
"potionbeltslots",
"stacksize",
"notransfer",
"stackable",
"UNK134",
"UNK137",
"proceffect",
"proctype",
"proclevel2",
"proclevel",
"UNK142",
"worneffect",
"worntype",
"wornlevel2",
"wornlevel",
"UNK147",
"focustype",
"focuslevel2",
"focuslevel",
"UNK152",
"scrolleffect",
"scrolltype",
"scrolllevel2",
"scrolllevel",
"UNK157",
"serialized",
"verified",
"serialization",
"source",
"UNK033",
"lorefile",
"UNK014",
"svcorruption",
"skillmodmax",
"UNK060",
"augslot1unk2",
"augslot2unk2",
"augslot3unk2",
"augslot4unk2",
"augslot5unk2",
"augslot6unk2",
"UNK120",
"UNK121",
"questitemflag",
"UNK132",
"clickunk5",
"clickunk6",
"clickunk7",
"procunk1",
"procunk2",
"procunk3",
"procunk4",
"procunk6",
"procunk7",
"wornunk1",
"wornunk2",
"wornunk3",
"wornunk4",
"wornunk5",
"wornunk6",
"wornunk7",
"focusunk1",
"focusunk2",
"focusunk3",
"focusunk4",
"focusunk5",
"focusunk6",
"focusunk7",
"scrollunk1",
"scrollunk2",
"scrollunk3",
"scrollunk4",
"scrollunk5",
"scrollunk6",
"scrollunk7",
"UNK193",
"purity",
"evoitem",
"evoid",
"evolvinglevel",
"evomax",
"clickname",
"procname",
"wornname",
"focusname",
"scrollname",
"dsmitigation",
"heroic_str",
"heroic_int",
"heroic_wis",
"heroic_agi",
"heroic_dex",
"heroic_sta",
"heroic_cha",
"heroic_pr",
"heroic_dr",
"heroic_fr",
"heroic_cr",
"heroic_mr",
"heroic_svcorrup",
"healamt",
"spelldmg",
"clairvoyance",
"backstabdmg",
"created",
"elitematerial",
"ldonsellbackrate",
"scriptfileid",
"expendablearrow",
"powersourcecapacity",
"bardeffect",
"bardeffecttype",
"bardlevel2",
"bardlevel",
"bardunk1",
"bardunk2",
"bardunk3",
"bardunk4",
"bardunk5",
"bardname",
"bardunk7",
"UNK214",
"subtype",
"UNK220",
"UNK221",
"heirloom",
"UNK223",
"UNK224",
"UNK225",
"UNK226",
"UNK227",
"UNK228",
"UNK229",
"UNK230",
"UNK231",
"UNK232",
"UNK233",
"UNK234",
"placeable",
"UNK236",
"UNK237",
"UNK238",
"UNK239",
"UNK240",
"UNK241",
"epicitem",
};
}
static std::vector SelectColumns()
{
return {
"id",
"minstatus",
"Name",
"aagi",
"ac",
"accuracy",
"acha",
"adex",
"aint",
"artifactflag",
"asta",
"astr",
"attack",
"augrestrict",
"augslot1type",
"augslot1visible",
"augslot2type",
"augslot2visible",
"augslot3type",
"augslot3visible",
"augslot4type",
"augslot4visible",
"augslot5type",
"augslot5visible",
"augslot6type",
"augslot6visible",
"augtype",
"avoidance",
"awis",
"bagsize",
"bagslots",
"bagtype",
"bagwr",
"banedmgamt",
"banedmgraceamt",
"banedmgbody",
"banedmgrace",
"bardtype",
"bardvalue",
"book",
"casttime",
"casttime_",
"charmfile",
"charmfileid",
"classes",
"color",
"combateffects",
"extradmgskill",
"extradmgamt",
"price",
"cr",
"damage",
"damageshield",
"deity",
"delay",
"augdistiller",
"dotshielding",
"dr",
"clicktype",
"clicklevel2",
"elemdmgtype",
"elemdmgamt",
"endur",
"factionamt1",
"factionamt2",
"factionamt3",
"factionamt4",
"factionmod1",
"factionmod2",
"factionmod3",
"factionmod4",
"filename",
"focuseffect",
"fr",
"fvnodrop",
"haste",
"clicklevel",
"hp",
"regen",
"icon",
"idfile",
"itemclass",
"itemtype",
"ldonprice",
"ldontheme",
"ldonsold",
"light",
"lore",
"loregroup",
"magic",
"mana",
"manaregen",
"enduranceregen",
"material",
"herosforgemodel",
"maxcharges",
"mr",
"nodrop",
"norent",
"pendingloreflag",
"pr",
"procrate",
"races",
"`range`",
"reclevel",
"recskill",
"reqlevel",
"sellrate",
"shielding",
"size",
"skillmodtype",
"skillmodvalue",
"slots",
"clickeffect",
"spellshield",
"strikethrough",
"stunresist",
"summonedflag",
"tradeskills",
"favor",
"weight",
"UNK012",
"UNK013",
"benefitflag",
"UNK054",
"UNK059",
"booktype",
"recastdelay",
"recasttype",
"guildfavor",
"UNK123",
"UNK124",
"attuneable",
"nopet",
"UNIX_TIMESTAMP(updated)",
"comment",
"UNK127",
"pointtype",
"potionbelt",
"potionbeltslots",
"stacksize",
"notransfer",
"stackable",
"UNK134",
"UNK137",
"proceffect",
"proctype",
"proclevel2",
"proclevel",
"UNK142",
"worneffect",
"worntype",
"wornlevel2",
"wornlevel",
"UNK147",
"focustype",
"focuslevel2",
"focuslevel",
"UNK152",
"scrolleffect",
"scrolltype",
"scrolllevel2",
"scrolllevel",
"UNK157",
"UNIX_TIMESTAMP(serialized)",
"UNIX_TIMESTAMP(verified)",
"serialization",
"source",
"UNK033",
"lorefile",
"UNK014",
"svcorruption",
"skillmodmax",
"UNK060",
"augslot1unk2",
"augslot2unk2",
"augslot3unk2",
"augslot4unk2",
"augslot5unk2",
"augslot6unk2",
"UNK120",
"UNK121",
"questitemflag",
"UNK132",
"clickunk5",
"clickunk6",
"clickunk7",
"procunk1",
"procunk2",
"procunk3",
"procunk4",
"procunk6",
"procunk7",
"wornunk1",
"wornunk2",
"wornunk3",
"wornunk4",
"wornunk5",
"wornunk6",
"wornunk7",
"focusunk1",
"focusunk2",
"focusunk3",
"focusunk4",
"focusunk5",
"focusunk6",
"focusunk7",
"scrollunk1",
"scrollunk2",
"scrollunk3",
"scrollunk4",
"scrollunk5",
"scrollunk6",
"scrollunk7",
"UNK193",
"purity",
"evoitem",
"evoid",
"evolvinglevel",
"evomax",
"clickname",
"procname",
"wornname",
"focusname",
"scrollname",
"dsmitigation",
"heroic_str",
"heroic_int",
"heroic_wis",
"heroic_agi",
"heroic_dex",
"heroic_sta",
"heroic_cha",
"heroic_pr",
"heroic_dr",
"heroic_fr",
"heroic_cr",
"heroic_mr",
"heroic_svcorrup",
"healamt",
"spelldmg",
"clairvoyance",
"backstabdmg",
"created",
"elitematerial",
"ldonsellbackrate",
"scriptfileid",
"expendablearrow",
"powersourcecapacity",
"bardeffect",
"bardeffecttype",
"bardlevel2",
"bardlevel",
"bardunk1",
"bardunk2",
"bardunk3",
"bardunk4",
"bardunk5",
"bardname",
"bardunk7",
"UNK214",
"subtype",
"UNK220",
"UNK221",
"heirloom",
"UNK223",
"UNK224",
"UNK225",
"UNK226",
"UNK227",
"UNK228",
"UNK229",
"UNK230",
"UNK231",
"UNK232",
"UNK233",
"UNK234",
"placeable",
"UNK236",
"UNK237",
"UNK238",
"UNK239",
"UNK240",
"UNK241",
"epicitem",
};
}
static std::string ColumnsRaw()
{
return std::string(Strings::Implode(", ", Columns()));
}
static std::string SelectColumnsRaw()
{
return std::string(Strings::Implode(", ", SelectColumns()));
}
static std::string TableName()
{
return std::string("items");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
SelectColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
ColumnsRaw()
);
}
static Items NewEntity()
{
Items e{};
e.id = 0;
e.minstatus = 0;
e.Name = "";
e.aagi = 0;
e.ac = 0;
e.accuracy = 0;
e.acha = 0;
e.adex = 0;
e.aint = 0;
e.artifactflag = 0;
e.asta = 0;
e.astr = 0;
e.attack = 0;
e.augrestrict = 0;
e.augslot1type = 0;
e.augslot1visible = 0;
e.augslot2type = 0;
e.augslot2visible = 0;
e.augslot3type = 0;
e.augslot3visible = 0;
e.augslot4type = 0;
e.augslot4visible = 0;
e.augslot5type = 0;
e.augslot5visible = 0;
e.augslot6type = 0;
e.augslot6visible = 0;
e.augtype = 0;
e.avoidance = 0;
e.awis = 0;
e.bagsize = 0;
e.bagslots = 0;
e.bagtype = 0;
e.bagwr = 0;
e.banedmgamt = 0;
e.banedmgraceamt = 0;
e.banedmgbody = 0;
e.banedmgrace = 0;
e.bardtype = 0;
e.bardvalue = 0;
e.book = 0;
e.casttime = 0;
e.casttime_ = 0;
e.charmfile = "";
e.charmfileid = "";
e.classes = 0;
e.color = 0;
e.combateffects = "";
e.extradmgskill = 0;
e.extradmgamt = 0;
e.price = 0;
e.cr = 0;
e.damage = 0;
e.damageshield = 0;
e.deity = 0;
e.delay = 0;
e.augdistiller = 0;
e.dotshielding = 0;
e.dr = 0;
e.clicktype = 0;
e.clicklevel2 = 0;
e.elemdmgtype = 0;
e.elemdmgamt = 0;
e.endur = 0;
e.factionamt1 = 0;
e.factionamt2 = 0;
e.factionamt3 = 0;
e.factionamt4 = 0;
e.factionmod1 = 0;
e.factionmod2 = 0;
e.factionmod3 = 0;
e.factionmod4 = 0;
e.filename = "";
e.focuseffect = 0;
e.fr = 0;
e.fvnodrop = 0;
e.haste = 0;
e.clicklevel = 0;
e.hp = 0;
e.regen = 0;
e.icon = 0;
e.idfile = "";
e.itemclass = 0;
e.itemtype = 0;
e.ldonprice = 0;
e.ldontheme = 0;
e.ldonsold = 0;
e.light = 0;
e.lore = "";
e.loregroup = 0;
e.magic = 0;
e.mana = 0;
e.manaregen = 0;
e.enduranceregen = 0;
e.material = 0;
e.herosforgemodel = 0;
e.maxcharges = 0;
e.mr = 0;
e.nodrop = 0;
e.norent = 0;
e.pendingloreflag = 0;
e.pr = 0;
e.procrate = 0;
e.races = 0;
e.range_ = 0;
e.reclevel = 0;
e.recskill = 0;
e.reqlevel = 0;
e.sellrate = 0;
e.shielding = 0;
e.size = 0;
e.skillmodtype = 0;
e.skillmodvalue = 0;
e.slots = 0;
e.clickeffect = 0;
e.spellshield = 0;
e.strikethrough = 0;
e.stunresist = 0;
e.summonedflag = 0;
e.tradeskills = 0;
e.favor = 0;
e.weight = 0;
e.UNK012 = 0;
e.UNK013 = 0;
e.benefitflag = 0;
e.UNK054 = 0;
e.UNK059 = 0;
e.booktype = 0;
e.recastdelay = 0;
e.recasttype = 0;
e.guildfavor = 0;
e.UNK123 = 0;
e.UNK124 = 0;
e.attuneable = 0;
e.nopet = 0;
e.updated = 0;
e.comment = "";
e.UNK127 = 0;
e.pointtype = 0;
e.potionbelt = 0;
e.potionbeltslots = 0;
e.stacksize = 0;
e.notransfer = 0;
e.stackable = 0;
e.UNK134 = "";
e.UNK137 = 0;
e.proceffect = 0;
e.proctype = 0;
e.proclevel2 = 0;
e.proclevel = 0;
e.UNK142 = 0;
e.worneffect = 0;
e.worntype = 0;
e.wornlevel2 = 0;
e.wornlevel = 0;
e.UNK147 = 0;
e.focustype = 0;
e.focuslevel2 = 0;
e.focuslevel = 0;
e.UNK152 = 0;
e.scrolleffect = 0;
e.scrolltype = 0;
e.scrolllevel2 = 0;
e.scrolllevel = 0;
e.UNK157 = 0;
e.serialized = 0;
e.verified = 0;
e.serialization = "";
e.source = "";
e.UNK033 = 0;
e.lorefile = "";
e.UNK014 = 0;
e.svcorruption = 0;
e.skillmodmax = 0;
e.UNK060 = 0;
e.augslot1unk2 = 0;
e.augslot2unk2 = 0;
e.augslot3unk2 = 0;
e.augslot4unk2 = 0;
e.augslot5unk2 = 0;
e.augslot6unk2 = 0;
e.UNK120 = 0;
e.UNK121 = 0;
e.questitemflag = 0;
e.UNK132 = "";
e.clickunk5 = 0;
e.clickunk6 = "";
e.clickunk7 = 0;
e.procunk1 = 0;
e.procunk2 = 0;
e.procunk3 = 0;
e.procunk4 = 0;
e.procunk6 = "";
e.procunk7 = 0;
e.wornunk1 = 0;
e.wornunk2 = 0;
e.wornunk3 = 0;
e.wornunk4 = 0;
e.wornunk5 = 0;
e.wornunk6 = "";
e.wornunk7 = 0;
e.focusunk1 = 0;
e.focusunk2 = 0;
e.focusunk3 = 0;
e.focusunk4 = 0;
e.focusunk5 = 0;
e.focusunk6 = "";
e.focusunk7 = 0;
e.scrollunk1 = 0;
e.scrollunk2 = 0;
e.scrollunk3 = 0;
e.scrollunk4 = 0;
e.scrollunk5 = 0;
e.scrollunk6 = "";
e.scrollunk7 = 0;
e.UNK193 = 0;
e.purity = 0;
e.evoitem = 0;
e.evoid = 0;
e.evolvinglevel = 0;
e.evomax = 0;
e.clickname = "";
e.procname = "";
e.wornname = "";
e.focusname = "";
e.scrollname = "";
e.dsmitigation = 0;
e.heroic_str = 0;
e.heroic_int = 0;
e.heroic_wis = 0;
e.heroic_agi = 0;
e.heroic_dex = 0;
e.heroic_sta = 0;
e.heroic_cha = 0;
e.heroic_pr = 0;
e.heroic_dr = 0;
e.heroic_fr = 0;
e.heroic_cr = 0;
e.heroic_mr = 0;
e.heroic_svcorrup = 0;
e.healamt = 0;
e.spelldmg = 0;
e.clairvoyance = 0;
e.backstabdmg = 0;
e.created = "";
e.elitematerial = 0;
e.ldonsellbackrate = 0;
e.scriptfileid = 0;
e.expendablearrow = 0;
e.powersourcecapacity = 0;
e.bardeffect = 0;
e.bardeffecttype = 0;
e.bardlevel2 = 0;
e.bardlevel = 0;
e.bardunk1 = 0;
e.bardunk2 = 0;
e.bardunk3 = 0;
e.bardunk4 = 0;
e.bardunk5 = 0;
e.bardname = "";
e.bardunk7 = 0;
e.UNK214 = 0;
e.subtype = 0;
e.UNK220 = 0;
e.UNK221 = 0;
e.heirloom = 0;
e.UNK223 = 0;
e.UNK224 = 0;
e.UNK225 = 0;
e.UNK226 = 0;
e.UNK227 = 0;
e.UNK228 = 0;
e.UNK229 = 0;
e.UNK230 = 0;
e.UNK231 = 0;
e.UNK232 = 0;
e.UNK233 = 0;
e.UNK234 = 0;
e.placeable = 0;
e.UNK236 = 0;
e.UNK237 = 0;
e.UNK238 = 0;
e.UNK239 = 0;
e.UNK240 = 0;
e.UNK241 = 0;
e.epicitem = 0;
return e;
}
static Items GetItems(
const std::vector &itemss,
int items_id
)
{
for (auto &items : itemss) {
if (items.id == items_id) {
return items;
}
}
return NewEntity();
}
static Items FindOne(
Database& db,
int items_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE {} = {} LIMIT 1",
BaseSelect(),
PrimaryKey(),
items_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
Items e{};
e.id = row[0] ? static_cast(atoi(row[0])) : 0;
e.minstatus = row[1] ? static_cast(atoi(row[1])) : 0;
e.Name = row[2] ? row[2] : "";
e.aagi = row[3] ? static_cast(atoi(row[3])) : 0;
e.ac = row[4] ? static_cast(atoi(row[4])) : 0;
e.accuracy = row[5] ? static_cast(atoi(row[5])) : 0;
e.acha = row[6] ? static_cast(atoi(row[6])) : 0;
e.adex = row[7] ? static_cast(atoi(row[7])) : 0;
e.aint = row[8] ? static_cast(atoi(row[8])) : 0;
e.artifactflag = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0;
e.asta = row[10] ? static_cast(atoi(row[10])) : 0;
e.astr = row[11] ? static_cast(atoi(row[11])) : 0;
e.attack = row[12] ? static_cast(atoi(row[12])) : 0;
e.augrestrict = row[13] ? static_cast(atoi(row[13])) : 0;
e.augslot1type = row[14] ? static_cast(atoi(row[14])) : 0;
e.augslot1visible = row[15] ? static_cast(atoi(row[15])) : 0;
e.augslot2type = row[16] ? static_cast(atoi(row[16])) : 0;
e.augslot2visible = row[17] ? static_cast(atoi(row[17])) : 0;
e.augslot3type = row[18] ? static_cast(atoi(row[18])) : 0;
e.augslot3visible = row[19] ? static_cast(atoi(row[19])) : 0;
e.augslot4type = row[20] ? static_cast(atoi(row[20])) : 0;
e.augslot4visible = row[21] ? static_cast(atoi(row[21])) : 0;
e.augslot5type = row[22] ? static_cast(atoi(row[22])) : 0;
e.augslot5visible = row[23] ? static_cast(atoi(row[23])) : 0;
e.augslot6type = row[24] ? static_cast(atoi(row[24])) : 0;
e.augslot6visible = row[25] ? static_cast(atoi(row[25])) : 0;
e.augtype = row[26] ? static_cast(atoi(row[26])) : 0;
e.avoidance = row[27] ? static_cast(atoi(row[27])) : 0;
e.awis = row[28] ? static_cast(atoi(row[28])) : 0;
e.bagsize = row[29] ? static_cast(atoi(row[29])) : 0;
e.bagslots = row[30] ? static_cast(atoi(row[30])) : 0;
e.bagtype = row[31] ? static_cast(atoi(row[31])) : 0;
e.bagwr = row[32] ? static_cast(atoi(row[32])) : 0;
e.banedmgamt = row[33] ? static_cast(atoi(row[33])) : 0;
e.banedmgraceamt = row[34] ? static_cast(atoi(row[34])) : 0;
e.banedmgbody = row[35] ? static_cast(atoi(row[35])) : 0;
e.banedmgrace = row[36] ? static_cast(atoi(row[36])) : 0;
e.bardtype = row[37] ? static_cast(atoi(row[37])) : 0;
e.bardvalue = row[38] ? static_cast(atoi(row[38])) : 0;
e.book = row[39] ? static_cast(atoi(row[39])) : 0;
e.casttime = row[40] ? static_cast(atoi(row[40])) : 0;
e.casttime_ = row[41] ? static_cast(atoi(row[41])) : 0;
e.charmfile = row[42] ? row[42] : "";
e.charmfileid = row[43] ? row[43] : "";
e.classes = row[44] ? static_cast(atoi(row[44])) : 0;
e.color = row[45] ? static_cast(strtoul(row[45], nullptr, 10)) : 0;
e.combateffects = row[46] ? row[46] : "";
e.extradmgskill = row[47] ? static_cast(atoi(row[47])) : 0;
e.extradmgamt = row[48] ? static_cast(atoi(row[48])) : 0;
e.price = row[49] ? static_cast(atoi(row[49])) : 0;
e.cr = row[50] ? static_cast(atoi(row[50])) : 0;
e.damage = row[51] ? static_cast(atoi(row[51])) : 0;
e.damageshield = row[52] ? static_cast(atoi(row[52])) : 0;
e.deity = row[53] ? static_cast(atoi(row[53])) : 0;
e.delay = row[54] ? static_cast(atoi(row[54])) : 0;
e.augdistiller = row[55] ? static_cast(strtoul(row[55], nullptr, 10)) : 0;
e.dotshielding = row[56] ? static_cast(atoi(row[56])) : 0;
e.dr = row[57] ? static_cast(atoi(row[57])) : 0;
e.clicktype = row[58] ? static_cast(atoi(row[58])) : 0;
e.clicklevel2 = row[59] ? static_cast(atoi(row[59])) : 0;
e.elemdmgtype = row[60] ? static_cast(atoi(row[60])) : 0;
e.elemdmgamt = row[61] ? static_cast(atoi(row[61])) : 0;
e.endur = row[62] ? static_cast(atoi(row[62])) : 0;
e.factionamt1 = row[63] ? static_cast(atoi(row[63])) : 0;
e.factionamt2 = row[64] ? static_cast(atoi(row[64])) : 0;
e.factionamt3 = row[65] ? static_cast(atoi(row[65])) : 0;
e.factionamt4 = row[66] ? static_cast(atoi(row[66])) : 0;
e.factionmod1 = row[67] ? static_cast(atoi(row[67])) : 0;
e.factionmod2 = row[68] ? static_cast(atoi(row[68])) : 0;
e.factionmod3 = row[69] ? static_cast(atoi(row[69])) : 0;
e.factionmod4 = row[70] ? static_cast(atoi(row[70])) : 0;
e.filename = row[71] ? row[71] : "";
e.focuseffect = row[72] ? static_cast(atoi(row[72])) : 0;
e.fr = row[73] ? static_cast(atoi(row[73])) : 0;
e.fvnodrop = row[74] ? static_cast(atoi(row[74])) : 0;
e.haste = row[75] ? static_cast(atoi(row[75])) : 0;
e.clicklevel = row[76] ? static_cast(atoi(row[76])) : 0;
e.hp = row[77] ? static_cast(atoi(row[77])) : 0;
e.regen = row[78] ? static_cast(atoi(row[78])) : 0;
e.icon = row[79] ? static_cast(atoi(row[79])) : 0;
e.idfile = row[80] ? row[80] : "";
e.itemclass = row[81] ? static_cast(atoi(row[81])) : 0;
e.itemtype = row[82] ? static_cast(atoi(row[82])) : 0;
e.ldonprice = row[83] ? static_cast(atoi(row[83])) : 0;
e.ldontheme = row[84] ? static_cast(atoi(row[84])) : 0;
e.ldonsold = row[85] ? static_cast(atoi(row[85])) : 0;
e.light = row[86] ? static_cast(atoi(row[86])) : 0;
e.lore = row[87] ? row[87] : "";
e.loregroup = row[88] ? static_cast(atoi(row[88])) : 0;
e.magic = row[89] ? static_cast(atoi(row[89])) : 0;
e.mana = row[90] ? static_cast(atoi(row[90])) : 0;
e.manaregen = row[91] ? static_cast(atoi(row[91])) : 0;
e.enduranceregen = row[92] ? static_cast(atoi(row[92])) : 0;
e.material = row[93] ? static_cast(atoi(row[93])) : 0;
e.herosforgemodel = row[94] ? static_cast(atoi(row[94])) : 0;
e.maxcharges = row[95] ? static_cast(atoi(row[95])) : 0;
e.mr = row[96] ? static_cast(atoi(row[96])) : 0;
e.nodrop = row[97] ? static_cast(atoi(row[97])) : 0;
e.norent = row[98] ? static_cast(atoi(row[98])) : 0;
e.pendingloreflag = row[99] ? static_cast(strtoul(row[99], nullptr, 10)) : 0;
e.pr = row[100] ? static_cast(atoi(row[100])) : 0;
e.procrate = row[101] ? static_cast(atoi(row[101])) : 0;
e.races = row[102] ? static_cast(atoi(row[102])) : 0;
e.range_ = row[103] ? static_cast(atoi(row[103])) : 0;
e.reclevel = row[104] ? static_cast(atoi(row[104])) : 0;
e.recskill = row[105] ? static_cast(atoi(row[105])) : 0;
e.reqlevel = row[106] ? static_cast(atoi(row[106])) : 0;
e.sellrate = row[107] ? strtof(row[107], nullptr) : 0;
e.shielding = row[108] ? static_cast(atoi(row[108])) : 0;
e.size = row[109] ? static_cast(atoi(row[109])) : 0;
e.skillmodtype = row[110] ? static_cast(atoi(row[110])) : 0;
e.skillmodvalue = row[111] ? static_cast(atoi(row[111])) : 0;
e.slots = row[112] ? static_cast(atoi(row[112])) : 0;
e.clickeffect = row[113] ? static_cast(atoi(row[113])) : 0;
e.spellshield = row[114] ? static_cast(atoi(row[114])) : 0;
e.strikethrough = row[115] ? static_cast(atoi(row[115])) : 0;
e.stunresist = row[116] ? static_cast(atoi(row[116])) : 0;
e.summonedflag = row[117] ? static_cast(strtoul(row[117], nullptr, 10)) : 0;
e.tradeskills = row[118] ? static_cast(atoi(row[118])) : 0;
e.favor = row[119] ? static_cast(atoi(row[119])) : 0;
e.weight = row[120] ? static_cast(atoi(row[120])) : 0;
e.UNK012 = row[121] ? static_cast(atoi(row[121])) : 0;
e.UNK013 = row[122] ? static_cast(atoi(row[122])) : 0;
e.benefitflag = row[123] ? static_cast(atoi(row[123])) : 0;
e.UNK054 = row[124] ? static_cast(atoi(row[124])) : 0;
e.UNK059 = row[125] ? static_cast(atoi(row[125])) : 0;
e.booktype = row[126] ? static_cast(atoi(row[126])) : 0;
e.recastdelay = row[127] ? static_cast(atoi(row[127])) : 0;
e.recasttype = row[128] ? static_cast(atoi(row[128])) : 0;
e.guildfavor = row[129] ? static_cast(atoi(row[129])) : 0;
e.UNK123 = row[130] ? static_cast(atoi(row[130])) : 0;
e.UNK124 = row[131] ? static_cast(atoi(row[131])) : 0;
e.attuneable = row[132] ? static_cast(atoi(row[132])) : 0;
e.nopet = row[133] ? static_cast(atoi(row[133])) : 0;
e.updated = strtoll(row[134] ? row[134] : "-1", nullptr, 10);
e.comment = row[135] ? row[135] : "";
e.UNK127 = row[136] ? static_cast(atoi(row[136])) : 0;
e.pointtype = row[137] ? static_cast(atoi(row[137])) : 0;
e.potionbelt = row[138] ? static_cast(atoi(row[138])) : 0;
e.potionbeltslots = row[139] ? static_cast(atoi(row[139])) : 0;
e.stacksize = row[140] ? static_cast(atoi(row[140])) : 0;
e.notransfer = row[141] ? static_cast(atoi(row[141])) : 0;
e.stackable = row[142] ? static_cast(atoi(row[142])) : 0;
e.UNK134 = row[143] ? row[143] : "";
e.UNK137 = row[144] ? static_cast(atoi(row[144])) : 0;
e.proceffect = row[145] ? static_cast(atoi(row[145])) : 0;
e.proctype = row[146] ? static_cast(atoi(row[146])) : 0;
e.proclevel2 = row[147] ? static_cast(atoi(row[147])) : 0;
e.proclevel = row[148] ? static_cast(atoi(row[148])) : 0;
e.UNK142 = row[149] ? static_cast(atoi(row[149])) : 0;
e.worneffect = row[150] ? static_cast(atoi(row[150])) : 0;
e.worntype = row[151] ? static_cast(atoi(row[151])) : 0;
e.wornlevel2 = row[152] ? static_cast(atoi(row[152])) : 0;
e.wornlevel = row[153] ? static_cast(atoi(row[153])) : 0;
e.UNK147 = row[154] ? static_cast(atoi(row[154])) : 0;
e.focustype = row[155] ? static_cast(atoi(row[155])) : 0;
e.focuslevel2 = row[156] ? static_cast(atoi(row[156])) : 0;
e.focuslevel = row[157] ? static_cast(atoi(row[157])) : 0;
e.UNK152 = row[158] ? static_cast(atoi(row[158])) : 0;
e.scrolleffect = row[159] ? static_cast(atoi(row[159])) : 0;
e.scrolltype = row[160] ? static_cast(atoi(row[160])) : 0;
e.scrolllevel2 = row[161] ? static_cast(atoi(row[161])) : 0;
e.scrolllevel = row[162] ? static_cast(atoi(row[162])) : 0;
e.UNK157 = row[163] ? static_cast(atoi(row[163])) : 0;
e.serialized = strtoll(row[164] ? row[164] : "-1", nullptr, 10);
e.verified = strtoll(row[165] ? row[165] : "-1", nullptr, 10);
e.serialization = row[166] ? row[166] : "";
e.source = row[167] ? row[167] : "";
e.UNK033 = row[168] ? static_cast(atoi(row[168])) : 0;
e.lorefile = row[169] ? row[169] : "";
e.UNK014 = row[170] ? static_cast(atoi(row[170])) : 0;
e.svcorruption = row[171] ? static_cast(atoi(row[171])) : 0;
e.skillmodmax = row[172] ? static_cast(atoi(row[172])) : 0;
e.UNK060 = row[173] ? static_cast(atoi(row[173])) : 0;
e.augslot1unk2 = row[174] ? static_cast(atoi(row[174])) : 0;
e.augslot2unk2 = row[175] ? static_cast(atoi(row[175])) : 0;
e.augslot3unk2 = row[176] ? static_cast(atoi(row[176])) : 0;
e.augslot4unk2 = row[177] ? static_cast(atoi(row[177])) : 0;
e.augslot5unk2 = row[178] ? static_cast(atoi(row[178])) : 0;
e.augslot6unk2 = row[179] ? static_cast(atoi(row[179])) : 0;
e.UNK120 = row[180] ? static_cast(atoi(row[180])) : 0;
e.UNK121 = row[181] ? static_cast(atoi(row[181])) : 0;
e.questitemflag = row[182] ? static_cast(atoi(row[182])) : 0;
e.UNK132 = row[183] ? row[183] : "";
e.clickunk5 = row[184] ? static_cast(atoi(row[184])) : 0;
e.clickunk6 = row[185] ? row[185] : "";
e.clickunk7 = row[186] ? static_cast(atoi(row[186])) : 0;
e.procunk1 = row[187] ? static_cast(atoi(row[187])) : 0;
e.procunk2 = row[188] ? static_cast(atoi(row[188])) : 0;
e.procunk3 = row[189] ? static_cast(atoi(row[189])) : 0;
e.procunk4 = row[190] ? static_cast(atoi(row[190])) : 0;
e.procunk6 = row[191] ? row[191] : "";
e.procunk7 = row[192] ? static_cast(atoi(row[192])) : 0;
e.wornunk1 = row[193] ? static_cast(atoi(row[193])) : 0;
e.wornunk2 = row[194] ? static_cast(atoi(row[194])) : 0;
e.wornunk3 = row[195] ? static_cast(atoi(row[195])) : 0;
e.wornunk4 = row[196] ? static_cast(atoi(row[196])) : 0;
e.wornunk5 = row[197] ? static_cast(atoi(row[197])) : 0;
e.wornunk6 = row[198] ? row[198] : "";
e.wornunk7 = row[199] ? static_cast(atoi(row[199])) : 0;
e.focusunk1 = row[200] ? static_cast(atoi(row[200])) : 0;
e.focusunk2 = row[201] ? static_cast(atoi(row[201])) : 0;
e.focusunk3 = row[202] ? static_cast(atoi(row[202])) : 0;
e.focusunk4 = row[203] ? static_cast(atoi(row[203])) : 0;
e.focusunk5 = row[204] ? static_cast(atoi(row[204])) : 0;
e.focusunk6 = row[205] ? row[205] : "";
e.focusunk7 = row[206] ? static_cast(atoi(row[206])) : 0;
e.scrollunk1 = row[207] ? static_cast(strtoul(row[207], nullptr, 10)) : 0;
e.scrollunk2 = row[208] ? static_cast(atoi(row[208])) : 0;
e.scrollunk3 = row[209] ? static_cast(atoi(row[209])) : 0;
e.scrollunk4 = row[210] ? static_cast(atoi(row[210])) : 0;
e.scrollunk5 = row[211] ? static_cast(atoi(row[211])) : 0;
e.scrollunk6 = row[212] ? row[212] : "";
e.scrollunk7 = row[213] ? static_cast(atoi(row[213])) : 0;
e.UNK193 = row[214] ? static_cast(atoi(row[214])) : 0;
e.purity = row[215] ? static_cast(atoi(row[215])) : 0;
e.evoitem = row[216] ? static_cast(atoi(row[216])) : 0;
e.evoid = row[217] ? static_cast(atoi(row[217])) : 0;
e.evolvinglevel = row[218] ? static_cast(atoi(row[218])) : 0;
e.evomax = row[219] ? static_cast(atoi(row[219])) : 0;
e.clickname = row[220] ? row[220] : "";
e.procname = row[221] ? row[221] : "";
e.wornname = row[222] ? row[222] : "";
e.focusname = row[223] ? row[223] : "";
e.scrollname = row[224] ? row[224] : "";
e.dsmitigation = row[225] ? static_cast(atoi(row[225])) : 0;
e.heroic_str = row[226] ? static_cast(atoi(row[226])) : 0;
e.heroic_int = row[227] ? static_cast(atoi(row[227])) : 0;
e.heroic_wis = row[228] ? static_cast(atoi(row[228])) : 0;
e.heroic_agi = row[229] ? static_cast(atoi(row[229])) : 0;
e.heroic_dex = row[230] ? static_cast(atoi(row[230])) : 0;
e.heroic_sta = row[231] ? static_cast(atoi(row[231])) : 0;
e.heroic_cha = row[232] ? static_cast(atoi(row[232])) : 0;
e.heroic_pr = row[233] ? static_cast(atoi(row[233])) : 0;
e.heroic_dr = row[234] ? static_cast(atoi(row[234])) : 0;
e.heroic_fr = row[235] ? static_cast(atoi(row[235])) : 0;
e.heroic_cr = row[236] ? static_cast(atoi(row[236])) : 0;
e.heroic_mr = row[237] ? static_cast(atoi(row[237])) : 0;
e.heroic_svcorrup = row[238] ? static_cast(atoi(row[238])) : 0;
e.healamt = row[239] ? static_cast(atoi(row[239])) : 0;
e.spelldmg = row[240] ? static_cast(atoi(row[240])) : 0;
e.clairvoyance = row[241] ? static_cast(atoi(row[241])) : 0;
e.backstabdmg = row[242] ? static_cast(atoi(row[242])) : 0;
e.created = row[243] ? row[243] : "";
e.elitematerial = row[244] ? static_cast(atoi(row[244])) : 0;
e.ldonsellbackrate = row[245] ? static_cast(atoi(row[245])) : 0;
e.scriptfileid = row[246] ? static_cast(atoi(row[246])) : 0;
e.expendablearrow = row[247] ? static_cast(atoi(row[247])) : 0;
e.powersourcecapacity = row[248] ? static_cast(atoi(row[248])) : 0;
e.bardeffect = row[249] ? static_cast(atoi(row[249])) : 0;
e.bardeffecttype = row[250] ? static_cast(atoi(row[250])) : 0;
e.bardlevel2 = row[251] ? static_cast(atoi(row[251])) : 0;
e.bardlevel = row[252] ? static_cast(atoi(row[252])) : 0;
e.bardunk1 = row[253] ? static_cast(atoi(row[253])) : 0;
e.bardunk2 = row[254] ? static_cast(atoi(row[254])) : 0;
e.bardunk3 = row[255] ? static_cast(atoi(row[255])) : 0;
e.bardunk4 = row[256] ? static_cast(atoi(row[256])) : 0;
e.bardunk5 = row[257] ? static_cast(atoi(row[257])) : 0;
e.bardname = row[258] ? row[258] : "";
e.bardunk7 = row[259] ? static_cast(atoi(row[259])) : 0;
e.UNK214 = row[260] ? static_cast(atoi(row[260])) : 0;
e.subtype = row[261] ? static_cast(atoi(row[261])) : 0;
e.UNK220 = row[262] ? static_cast(atoi(row[262])) : 0;
e.UNK221 = row[263] ? static_cast(atoi(row[263])) : 0;
e.heirloom = row[264] ? static_cast(atoi(row[264])) : 0;
e.UNK223 = row[265] ? static_cast(atoi(row[265])) : 0;
e.UNK224 = row[266] ? static_cast(atoi(row[266])) : 0;
e.UNK225 = row[267] ? static_cast(atoi(row[267])) : 0;
e.UNK226 = row[268] ? static_cast(atoi(row[268])) : 0;
e.UNK227 = row[269] ? static_cast(atoi(row[269])) : 0;
e.UNK228 = row[270] ? static_cast(atoi(row[270])) : 0;
e.UNK229 = row[271] ? static_cast(atoi(row[271])) : 0;
e.UNK230 = row[272] ? static_cast(atoi(row[272])) : 0;
e.UNK231 = row[273] ? static_cast(atoi(row[273])) : 0;
e.UNK232 = row[274] ? static_cast(atoi(row[274])) : 0;
e.UNK233 = row[275] ? static_cast(atoi(row[275])) : 0;
e.UNK234 = row[276] ? static_cast(atoi(row[276])) : 0;
e.placeable = row[277] ? static_cast(atoi(row[277])) : 0;
e.UNK236 = row[278] ? static_cast(atoi(row[278])) : 0;
e.UNK237 = row[279] ? static_cast