Changed some console logging for slot and group errors.

This commit is contained in:
Trevius 2015-01-09 20:16:23 -06:00
parent 7e72f10a3b
commit f799b8ef68
2 changed files with 7 additions and 4 deletions

View File

@ -3261,7 +3261,8 @@ uint32 Database::GetGroupID(const char* name){
if (results.RowCount() == 0) if (results.RowCount() == 0)
{ {
LogFile->write(EQEmuLog::Debug, "Character not in a group: %s", name); // Commenting this out until logging levels can prevent this from going to console
//LogFile->write(EQEmuLog::Debug, "Character not in a group: %s", name);
return 0; return 0;
} }

View File

@ -1108,6 +1108,7 @@ int16 Inventory::_PutItem(int16 slot_id, ItemInst* inst)
} }
int16 result = INVALID_INDEX; int16 result = INVALID_INDEX;
int16 parentSlot = INVALID_INDEX;
if (slot_id == MainCursor) { if (slot_id == MainCursor) {
// Replace current item on cursor, if exists // Replace current item on cursor, if exists
@ -1142,7 +1143,8 @@ int16 Inventory::_PutItem(int16 slot_id, ItemInst* inst)
else else
{ {
// Slot must be within a bag // Slot must be within a bag
ItemInst* baginst = GetItem(Inventory::CalcSlotId(slot_id)); // Get parent bag parentSlot = Inventory::CalcSlotId(slot_id);
ItemInst* baginst = GetItem(parentSlot); // Get parent bag
if (baginst && baginst->IsType(ItemClassContainer)) if (baginst && baginst->IsType(ItemClassContainer))
{ {
baginst->_PutItem(Inventory::CalcBagIdx(slot_id), inst); baginst->_PutItem(Inventory::CalcBagIdx(slot_id), inst);
@ -1151,7 +1153,7 @@ int16 Inventory::_PutItem(int16 slot_id, ItemInst* inst)
} }
if (result == INVALID_INDEX) { if (result == INVALID_INDEX) {
LogFile->write(EQEmuLog::Error, "Inventory::_PutItem: Invalid slot_id specified (%i)", slot_id); LogFile->write(EQEmuLog::Error, "Inventory::_PutItem: Invalid slot_id specified (%i) with parent slot id (%i)", slot_id, parentSlot);
Inventory::MarkDirty(inst); // Slot not found, clean up Inventory::MarkDirty(inst); // Slot not found, clean up
} }