Added the initial references for two new dictionaries - EmuConstants and EQLimits..more to come.

This commit is contained in:
Uleat
2014-07-16 21:23:16 -04:00
parent b7e36feeeb
commit d7c2d6108f
42 changed files with 1323 additions and 662 deletions
+5 -5
View File
@@ -411,12 +411,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[MAX_WORN_INVENTORY];
uint32 petinv[EmuConstants::EQUIPMENT_SIZE];
memset(petinv, 0, sizeof(petinv));
const Item_Struct *item = 0;
if (database.GetBasePetItems(record.equipmentset, petinv)) {
for (int i=0; i<MAX_WORN_INVENTORY; i++)
for (int i = 0; i<EmuConstants::EQUIPMENT_SIZE; i++)
if (petinv[i]) {
item = database.GetItem(petinv[i]);
npc->AddLootDrop(item, &npc->itemlist, 0, 1, 127, true, true);
@@ -543,7 +543,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)*MAX_WORN_INVENTORY);
memcpy(items, equipment, sizeof(uint32)*EmuConstants::EQUIPMENT_SIZE);
//save their buffs.
for (int i=0; i < GetPetMaxTotalSlots(); i++) {
@@ -629,7 +629,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
}
//restore their equipment...
for(i = 0; i < MAX_WORN_INVENTORY; i++) {
for (i = 0; i < EmuConstants::EQUIPMENT_SIZE; i++) {
if(items[i] == 0)
continue;
@@ -693,7 +693,7 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) {
while ((row = mysql_fetch_row(result)))
{
slot = atoi(row[0]);
if (slot >= MAX_WORN_INVENTORY)
if (slot >= EmuConstants::EQUIPMENT_SIZE)
continue;
if (items[slot] == 0)
items[slot] = atoi(row[1]);