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
@@ -1992,7 +1992,7 @@ void ZoneDatabase::LoadMercEquipment(Merc *merc) {
int itemCount = 0;
while(DataRow = mysql_fetch_row(DatasetResult)) {
if(itemCount == MAX_WORN_INVENTORY)
if (itemCount == EmuConstants::EQUIPMENT_SIZE)
break;
if(atoi(DataRow[0]) > 0) {
@@ -2768,7 +2768,7 @@ void ZoneDatabase::SavePetInfo(Client *c) {
}
}
for(i=0; i<MAX_WORN_INVENTORY; i++) {
for (i = 0; i<EmuConstants::EQUIPMENT_SIZE; i++) {
if(petinfo->Items[i]) {
database.RunQuery(query, MakeAnyLenString(&query,
"INSERT INTO `character_pet_inventory` (`char_id`, `pet`, `slot`, `item_id`) values (%u, 0, %u, %u)",
@@ -2792,7 +2792,7 @@ void ZoneDatabase::SavePetInfo(Client *c) {
}
safe_delete_array(query);
for(i=0; i<MAX_WORN_INVENTORY; i++) {
for (i = 0; i<EmuConstants::EQUIPMENT_SIZE; i++) {
if(suspended->Items[i]) {
database.RunQuery(query, MakeAnyLenString(&query,
"INSERT INTO `character_pet_inventory` (`char_id`, `pet`, `slot`, `item_id`) values (%u, 1, %u, %u)",
@@ -2923,9 +2923,9 @@ void ZoneDatabase::LoadPetInfo(Client *c) {
pi = suspended;
else
continue;
int slot = atoi(row[1]);
if (slot < 0 || slot > MAX_WORN_INVENTORY)
if (slot < 0 || slot > EmuConstants::EQUIPMENT_SIZE) // if (slot == 22) { zone.TriggerRandomCrash(); }
continue;
pi->Items[slot] = atoul(row[2]);