Add Item SubType to data structures and DB

This commit is contained in:
Michael Cook (mackal) 2020-05-09 22:37:35 -04:00
parent 90e6bb8a8a
commit 0e6a0b5a70
10 changed files with 11 additions and 3 deletions

View File

@ -434,6 +434,7 @@ namespace EQEmu
//uint32 Unk054;
int16 MaxCharges; // Maximum charges items can hold: -1 if not a chargeable item
uint8 ItemType; // Item Type/Skill (itemClass* from above)
int32 SubType; // Some items have sub types that can be used for other things (unbreakable fishing poles, SE_FFItemClass)
uint8 Material; // Item material type
uint32 HerosForgeModel;// Hero's Forge Armor Model Type (2-13?)
float SellRate; // Sell rate

View File

@ -203,3 +203,4 @@ F(procname)
F(wornname)
F(focusname)
F(scrollname)
F(subtype)

View File

@ -5504,6 +5504,7 @@ namespace RoF
iqbs.HealAmt = item->HealAmt;
iqbs.SpellDmg = item->SpellDmg;
iqbs.Clairvoyance = item->Clairvoyance;
iqbs.SubType = item->SubType;
iqbs.unknown28 = 0;
iqbs.unknown30 = 0;
iqbs.unknown39 = 1;

View File

@ -5759,6 +5759,7 @@ namespace RoF2
iqbs.HealAmt = item->HealAmt;
iqbs.SpellDmg = item->SpellDmg;
iqbs.Clairvoyance = item->Clairvoyance;
iqbs.SubType = item->SubType;
//unknown18; //Power Source Capacity or evolve filename?
//evolve_string; // Some String, but being evolution related is just a guess

View File

@ -4106,7 +4106,8 @@ namespace UF
iqbs.HealAmt = item->HealAmt;
iqbs.SpellDmg = item->SpellDmg;
iqbs.Clairvoyance = item->Clairvoyance;
iqbs.SubType = item->SubType;
ob.write((const char*)&iqbs, sizeof(UF::structs::ItemQuaternaryBodyStruct));
EQEmu::OutBuffer::pos_type count_pos = ob.tellp();

View File

@ -1029,6 +1029,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
item.MaxCharges = (int16)atoi(row[ItemField::maxcharges]);
item.ItemType = (uint8)atoi(row[ItemField::itemtype]);
item.SubType = atoi(row[ItemField::subtype]);
item.Material = (uint8)atoi(row[ItemField::material]);
item.HerosForgeModel = (uint32)atoi(row[ItemField::herosforgemodel]);
item.SellRate = (float)atof(row[ItemField::sellrate]);

View File

@ -634,7 +634,7 @@ typedef enum {
#define SE_LimitRace 412 // implemented - Limits to spells cast by a certain race (Note: not used in any known live spells)
#define SE_FcBaseEffects 413 // implemented - Increases the power of bard songs, skill attacks, runes, bard allowed foci, damage/heal
#define SE_LimitCastingSkill 414 // implemented - Limit a focus to include spells cast using a specific skill.
//#define SE_FFItemClass 415 // not used
//#define SE_FFItemClass 415 // not used - base1 matches ItemType, base2 matches SubType, -1 ignored, max is bitmask of valid slots
#define SE_ACv2 416 // implemented - New AC spell effect
#define SE_ManaRegen_v2 417 // implemented - New mana regen effect
#define SE_SkillDamageAmount2 418 // implemented - adds skill damage directly to certain attacks

View File

@ -34,7 +34,7 @@
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
*/
#define CURRENT_BINARY_DATABASE_VERSION 9152
#define CURRENT_BINARY_DATABASE_VERSION 9153
#ifdef BOTS
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9027

View File

@ -406,6 +406,7 @@
9150|2020_02_06_aa_reset_on_death.sql|SHOW COLUMNS FROM `aa_ability` LIKE 'reset_on_death'|empty|
9151|2020_03_05_npc_always_aggro.sql|SHOW COLUMNS FROM `npc_types` LIKE 'always_aggro'|empty|
9152|2020_03_09_convert_myisam_to_innodb.sql|SELECT * FROM db_version WHERE version >= 9152|empty|
9153|2020_05_09_items_subtype.sql|SHOW COLUMNS from `items` LIKE 'UNK219'|not_empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not

View File

@ -0,0 +1 @@
ALTER TABLE `items` CHANGE `UNK219` `subtype` int(11) not null default '0';