Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition

This commit is contained in:
Uleat
2016-04-22 07:34:55 -04:00
parent b3475d7b50
commit 1890d006a2
65 changed files with 1835 additions and 1849 deletions
+5 -5
View File
@@ -417,12 +417,12 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
// the base items for the pet. These are always loaded
// so that a rank 1 suspend minion does not kill things
// like the special back items some focused pets may receive.
uint32 petinv[EQEmu::constants::EQUIPMENT_SIZE];
uint32 petinv[EQEmu::legacy::EQUIPMENT_SIZE];
memset(petinv, 0, sizeof(petinv));
const Item_Struct *item = 0;
if (database.GetBasePetItems(record.equipmentset, petinv)) {
for (int i = 0; i < EQEmu::constants::EQUIPMENT_SIZE; i++)
for (int i = 0; i < EQEmu::legacy::EQUIPMENT_SIZE; i++)
if (petinv[i]) {
item = database.GetItem(petinv[i]);
npc->AddLootDrop(item, &npc->itemlist, 0, 1, 127, true, true);
@@ -572,7 +572,7 @@ void NPC::GetPetState(SpellBuff_Struct *pet_buffs, uint32 *items, char *name) {
strn0cpy(name, GetName(), 64);
//save their items, we only care about what they are actually wearing
memcpy(items, equipment, sizeof(uint32) * EQEmu::constants::EQUIPMENT_SIZE);
memcpy(items, equipment, sizeof(uint32) * EQEmu::legacy::EQUIPMENT_SIZE);
//save their buffs.
for (int i=0; i < GetPetMaxTotalSlots(); i++) {
@@ -660,7 +660,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
}
//restore their equipment...
for (i = 0; i < EQEmu::constants::EQUIPMENT_SIZE; i++) {
for (i = 0; i < EQEmu::legacy::EQUIPMENT_SIZE; i++) {
if(items[i] == 0)
continue;
@@ -722,7 +722,7 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) {
{
slot = atoi(row[0]);
if (slot >= EQEmu::constants::EQUIPMENT_SIZE)
if (slot >= EQEmu::legacy::EQUIPMENT_SIZE)
continue;
if (items[slot] == 0)