mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Merge of a monster
This commit is contained in:
+108
-108
@@ -200,7 +200,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// make sure the item exists
|
||||
if(item == nullptr) {
|
||||
Message(13, "Item %u does not exist.", item_id);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item_id, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -215,7 +215,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check to make sure we are augmenting an augmentable item
|
||||
else if (((!item->IsClassCommon()) || (item->AugType > 0)) && (aug1 | aug2 | aug3 | aug4 | aug5 | aug6)) {
|
||||
Message(13, "You can not augment an augment or a non-common class item.");
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an augment or a non-common class item.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug5: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an augment or a non-common class item.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug5: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -229,7 +229,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
/*
|
||||
else if(item->MinStatus && ((this->Admin() < item->MinStatus) || (this->Admin() < RuleI(GM, MinStatusToSummonItem)))) {
|
||||
Message(13, "You are not a GM or do not have the status to summon this item.");
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create a GM-only item with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u, MinStatus: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create a GM-only item with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u, MinStatus: %u)\n",
|
||||
GetName(), account_name, this->Admin(), item->ID, aug1, aug2, aug3, aug4, aug5, aug6, item->MinStatus);
|
||||
|
||||
return false;
|
||||
@@ -252,7 +252,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
if(augtest == nullptr) {
|
||||
if(augments[iter]) {
|
||||
Message(13, "Augment %u (Aug%i) does not exist.", augments[iter], iter + 1);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an augment (Aug%i) with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an augment (Aug%i) with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -269,7 +269,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check that augment is an actual augment
|
||||
else if(augtest->AugType == 0) {
|
||||
Message(13, "%s (%u) (Aug%i) is not an actual augment.", augtest->Name, augtest->ID, iter + 1);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to use a non-augment item (Aug%i) as an augment.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to use a non-augment item (Aug%i) as an augment.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, (iter + 1), aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -281,7 +281,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
/*
|
||||
else if(augtest->MinStatus && ((this->Admin() < augtest->MinStatus) || (this->Admin() < RuleI(GM, MinStatusToSummonItem)))) {
|
||||
Message(13, "You are not a GM or do not have the status to summon this augment.");
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create a GM-only augment (Aug%i) with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, MinStatus: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create a GM-only augment (Aug%i) with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, MinStatus: %u)\n",
|
||||
GetName(), account_name, (iter + 1), this->Admin(), item->ID, aug1, aug2, aug3, aug4, aug5, aug6, item->MinStatus);
|
||||
|
||||
return false;
|
||||
@@ -292,7 +292,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
if(enforcewear) {
|
||||
if ((item->AugSlotType[iter] == EQEmu::item::AugTypeNone) || !(((uint32)1 << (item->AugSlotType[iter] - 1)) & augtest->AugType)) {
|
||||
Message(13, "Augment %u (Aug%i) is not acceptable wear on Item %u.", augments[iter], iter + 1, item->ID);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an item with an unacceptable augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an item with an unacceptable augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -300,7 +300,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
if(item->AugSlotVisible[iter] == 0) {
|
||||
Message(13, "Item %u has not evolved enough to accept Augment %u (Aug%i).", item->ID, augments[iter], iter + 1);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an unevolved item with augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an unevolved item with augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -477,7 +477,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
if(restrictfail) {
|
||||
Message(13, "Augment %u (Aug%i) is restricted from wear on Item %u.", augments[iter], (iter + 1), item->ID);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an item with a restricted augment (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an item with a restricted augment (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -488,7 +488,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check for class usability
|
||||
if(item->Classes && !(classes &= augtest->Classes)) {
|
||||
Message(13, "Augment %u (Aug%i) will result in an item not usable by any class.", augments[iter], (iter + 1));
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable by any class.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable by any class.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -497,7 +497,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check for race usability
|
||||
if(item->Races && !(races &= augtest->Races)) {
|
||||
Message(13, "Augment %u (Aug%i) will result in an item not usable by any race.", augments[iter], (iter + 1));
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable by any race.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable by any race.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -506,7 +506,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check for slot usability
|
||||
if(item->Slots && !(slots &= augtest->Slots)) {
|
||||
Message(13, "Augment %u (Aug%i) will result in an item not usable in any slot.", augments[iter], (iter + 1));
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable in any slot.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable in any slot.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -533,7 +533,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
if(inst == nullptr) {
|
||||
Message(13, "An unknown server error has occurred and your item was not created.");
|
||||
// this goes to logfile since this is a major error
|
||||
Log.Out(Logs::General, Logs::Error, "Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::General, Logs::Error, "Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -559,7 +559,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
if(!(slots & ((uint32)1 << slottest))) {
|
||||
Message(0, "This item is not equipable at slot %u - moving to cursor.", to_slot);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to equip an item unusable in slot %u - moved to cursor.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to equip an item unusable in slot %u - moved to cursor.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, to_slot, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
to_slot = EQEmu::inventory::slotCursor;
|
||||
@@ -596,7 +596,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// Drop item from inventory to ground (generally only dropped from SLOT_CURSOR)
|
||||
void Client::DropItem(int16 slot_id, bool recurse)
|
||||
{
|
||||
Log.Out(Logs::General, Logs::Inventory, "'%s' (char_id: %u) Attempting to drop item from slot %i on the ground",
|
||||
Log(Logs::General, Logs::Inventory, "'%s' (char_id: %u) Attempting to drop item from slot %i on the ground",
|
||||
GetCleanName(), CharacterID(), slot_id);
|
||||
|
||||
if(GetInv().CheckNoDrop(slot_id, recurse) && RuleI(World, FVNoDropFlag) == 0 ||
|
||||
@@ -604,20 +604,20 @@ void Client::DropItem(int16 slot_id, bool recurse)
|
||||
{
|
||||
auto invalid_drop = m_inv.GetItem(slot_id);
|
||||
if (!invalid_drop) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Error in InventoryProfile::CheckNoDrop() - returned 'true' for empty slot");
|
||||
Log(Logs::General, Logs::Inventory, "Error in InventoryProfile::CheckNoDrop() - returned 'true' for empty slot");
|
||||
}
|
||||
else {
|
||||
if (Log.log_settings[Logs::Inventory].is_category_enabled) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "DropItem() Hack detected - full item parse:");
|
||||
Log.Out(Logs::General, Logs::Inventory, "depth: 0, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
if (LogSys.log_settings[Logs::Inventory].is_category_enabled) {
|
||||
Log(Logs::General, Logs::Inventory, "DropItem() Hack detected - full item parse:");
|
||||
Log(Logs::General, Logs::Inventory, "depth: 0, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
(invalid_drop->GetItem() ? invalid_drop->GetItem()->Name : "null data"), invalid_drop->GetID(), invalid_drop->IsDroppable(false));
|
||||
|
||||
for (auto iter1 : *invalid_drop->GetContents()) { // depth 1
|
||||
Log.Out(Logs::General, Logs::Inventory, "-depth: 1, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
Log(Logs::General, Logs::Inventory, "-depth: 1, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
(iter1.second->GetItem() ? iter1.second->GetItem()->Name : "null data"), iter1.second->GetID(), iter1.second->IsDroppable(false));
|
||||
|
||||
for (auto iter2 : *iter1.second->GetContents()) { // depth 2
|
||||
Log.Out(Logs::General, Logs::Inventory, "--depth: 2, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
Log(Logs::General, Logs::Inventory, "--depth: 2, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
(iter2.second->GetItem() ? iter2.second->GetItem()->Name : "null data"), iter2.second->GetID(), iter2.second->IsDroppable(false));
|
||||
}
|
||||
}
|
||||
@@ -633,39 +633,39 @@ void Client::DropItem(int16 slot_id, bool recurse)
|
||||
// Take control of item in client inventory
|
||||
EQEmu::ItemInstance *inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
if (Log.log_settings[Logs::Inventory].is_category_enabled) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "DropItem() Processing - full item parse:");
|
||||
Log.Out(Logs::General, Logs::Inventory, "depth: 0, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
if (LogSys.log_settings[Logs::Inventory].is_category_enabled) {
|
||||
Log(Logs::General, Logs::Inventory, "DropItem() Processing - full item parse:");
|
||||
Log(Logs::General, Logs::Inventory, "depth: 0, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
(inst->GetItem() ? inst->GetItem()->Name : "null data"), inst->GetID(), inst->IsDroppable(false));
|
||||
|
||||
if (!inst->IsDroppable(false))
|
||||
Log.Out(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName());
|
||||
Log(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName());
|
||||
|
||||
for (auto iter1 : *inst->GetContents()) { // depth 1
|
||||
Log.Out(Logs::General, Logs::Inventory, "-depth: 1, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
Log(Logs::General, Logs::Inventory, "-depth: 1, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
(iter1.second->GetItem() ? iter1.second->GetItem()->Name : "null data"), iter1.second->GetID(), iter1.second->IsDroppable(false));
|
||||
|
||||
if (!iter1.second->IsDroppable(false))
|
||||
Log.Out(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName());
|
||||
Log(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName());
|
||||
|
||||
for (auto iter2 : *iter1.second->GetContents()) { // depth 2
|
||||
Log.Out(Logs::General, Logs::Inventory, "--depth: 2, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
Log(Logs::General, Logs::Inventory, "--depth: 2, Item: '%s' (id: %u), IsDroppable: %s",
|
||||
(iter2.second->GetItem() ? iter2.second->GetItem()->Name : "null data"), iter2.second->GetID(), iter2.second->IsDroppable(false));
|
||||
|
||||
if (!iter2.second->IsDroppable(false))
|
||||
Log.Out(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName());
|
||||
Log(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int i = parse->EventItem(EVENT_DROP_ITEM, this, inst, nullptr, "", slot_id);
|
||||
if(i != 0) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Item drop handled by [EVENT_DROP_ITEM]");
|
||||
Log(Logs::General, Logs::Inventory, "Item drop handled by [EVENT_DROP_ITEM]");
|
||||
safe_delete(inst);
|
||||
}
|
||||
} else {
|
||||
// Item doesn't exist in inventory!
|
||||
Log.Out(Logs::General, Logs::Inventory, "DropItem() - No item found in slot %i", slot_id);
|
||||
Log(Logs::General, Logs::Inventory, "DropItem() - No item found in slot %i", slot_id);
|
||||
Message(13, "Error: Item not found in slot %i", slot_id);
|
||||
return;
|
||||
}
|
||||
@@ -687,7 +687,7 @@ void Client::DropItem(int16 slot_id, bool recurse)
|
||||
entity_list.AddObject(object, true);
|
||||
object->StartDecay();
|
||||
|
||||
Log.Out(Logs::General, Logs::Inventory, "Item drop handled ut assolet");
|
||||
Log(Logs::General, Logs::Inventory, "Item drop handled ut assolet");
|
||||
|
||||
safe_delete(inst);
|
||||
}
|
||||
@@ -758,7 +758,7 @@ void Client::SendCursorBuffer()
|
||||
}
|
||||
|
||||
if (!lore_pass) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
|
||||
Log(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
|
||||
GetName(), test_item->Name, test_item->ID);
|
||||
Message_StringID(MT_LootMessages, 290);
|
||||
parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0);
|
||||
@@ -773,7 +773,7 @@ void Client::SendCursorBuffer()
|
||||
// Remove item from inventory
|
||||
void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_update, bool update_db) {
|
||||
#if (EQDEBUG >= 5)
|
||||
Log.Out(Logs::General, Logs::None, "DeleteItemInInventory(%i, %i, %s)", slot_id, quantity, (client_update) ? "true":"false");
|
||||
Log(Logs::General, Logs::None, "DeleteItemInInventory(%i, %i, %s)", slot_id, quantity, (client_update) ? "true":"false");
|
||||
#endif
|
||||
|
||||
// Added 'IsSlotValid(slot_id)' check to both segments of client packet processing.
|
||||
@@ -893,7 +893,7 @@ void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_upd
|
||||
|
||||
bool Client::PushItemOnCursor(const EQEmu::ItemInstance& inst, bool client_update)
|
||||
{
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Putting item %s (%d) on the cursor", inst.GetItem()->Name, inst.GetItem()->ID);
|
||||
Log(Logs::Detail, Logs::Inventory, "Putting item %s (%d) on the cursor", inst.GetItem()->Name, inst.GetItem()->ID);
|
||||
m_inv.PushCursor(inst);
|
||||
|
||||
if (client_update) {
|
||||
@@ -909,7 +909,7 @@ bool Client::PushItemOnCursor(const EQEmu::ItemInstance& inst, bool client_updat
|
||||
// (Also saves changes back to the database: this may be optimized in the future)
|
||||
// client_update: Sends packet to client
|
||||
bool Client::PutItemInInventory(int16 slot_id, const EQEmu::ItemInstance& inst, bool client_update) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Putting item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Putting item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
|
||||
if (slot_id == EQEmu::inventory::slotCursor) { // don't trust macros before conditional statements...
|
||||
return PushItemOnCursor(inst, client_update);
|
||||
@@ -938,7 +938,7 @@ bool Client::PutItemInInventory(int16 slot_id, const EQEmu::ItemInstance& inst,
|
||||
|
||||
void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, ServerLootItem_Struct** bag_item_data)
|
||||
{
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Putting loot item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Putting loot item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
|
||||
bool cursor_empty = m_inv.CursorEmpty();
|
||||
|
||||
@@ -982,7 +982,7 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst,
|
||||
// Dump bag contents to cursor in the event that owning bag is not the first cursor item
|
||||
// (This assumes that the data passed is correctly associated..no safety checks are implemented)
|
||||
if (slot_id == EQEmu::inventory::slotCursor && !cursor_empty) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory,
|
||||
Log(Logs::Detail, Logs::Inventory,
|
||||
"Putting bag loot item %s (%d) into slot %d (non-empty cursor override)",
|
||||
inst.GetItem()->Name, inst.GetItem()->ID, EQEmu::inventory::slotCursor);
|
||||
|
||||
@@ -991,7 +991,7 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst,
|
||||
else {
|
||||
auto bag_slot = EQEmu::InventoryProfile::CalcSlotId(slot_id, index);
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Inventory,
|
||||
Log(Logs::Detail, Logs::Inventory,
|
||||
"Putting bag loot item %s (%d) into slot %d (bag slot %d)",
|
||||
inst.GetItem()->Name, inst.GetItem()->ID, bag_slot, index);
|
||||
|
||||
@@ -1417,7 +1417,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// SoF+ sends a Unix timestamp (should be int32) for src and dst slots every 10 minutes for some reason.
|
||||
if(src_slot_check < 2147483647)
|
||||
Message(13, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log(Logs::Detail, Logs::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1425,7 +1425,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// SoF+ sends a Unix timestamp (should be int32) for src and dst slots every 10 minutes for some reason.
|
||||
if(src_slot_check < 2147483647)
|
||||
Message(13, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log(Logs::Detail, Logs::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1449,7 +1449,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
|
||||
if (!lore_pass) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
|
||||
Log(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
|
||||
GetName(), test_item->Name, test_item->ID);
|
||||
Message_StringID(MT_LootMessages, 290);
|
||||
parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0);
|
||||
@@ -1461,7 +1461,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
|
||||
if (move_in->to_slot == (uint32)INVALID_INDEX) {
|
||||
if (move_in->from_slot == (uint32)EQEmu::inventory::slotCursor) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Client destroyed item from cursor slot %d", move_in->from_slot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Client destroyed item from cursor slot %d", move_in->from_slot);
|
||||
if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit
|
||||
|
||||
EQEmu::ItemInstance *inst = m_inv.GetItem(EQEmu::inventory::slotCursor);
|
||||
@@ -1475,7 +1475,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
return true; // Item destroyed by client
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Deleted item from slot %d as a result of an inventory container tradeskill combine.", move_in->from_slot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Deleted item from slot %d as a result of an inventory container tradeskill combine.", move_in->from_slot);
|
||||
if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit
|
||||
DeleteItemInInventory(move_in->from_slot);
|
||||
return true; // Item deletion
|
||||
@@ -1511,7 +1511,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
EQEmu::ItemInstance* src_inst = m_inv.GetItem(src_slot_id);
|
||||
EQEmu::ItemInstance* dst_inst = m_inv.GetItem(dst_slot_id);
|
||||
if (src_inst){
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Src slot %d has item %s (%d) with %d charges in it.", src_slot_id, src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_inst->GetCharges());
|
||||
Log(Logs::Detail, Logs::Inventory, "Src slot %d has item %s (%d) with %d charges in it.", src_slot_id, src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_inst->GetCharges());
|
||||
srcitemid = src_inst->GetItem()->ID;
|
||||
//SetTint(dst_slot_id,src_inst->GetColor());
|
||||
if (src_inst->GetCharges() > 0 && (src_inst->GetCharges() < (int16)move_in->number_in_stack || move_in->number_in_stack > src_inst->GetItem()->StackSize))
|
||||
@@ -1521,7 +1521,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
}
|
||||
if (dst_inst) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Dest slot %d has item %s (%d) with %d charges in it.", dst_slot_id, dst_inst->GetItem()->Name, dst_inst->GetItem()->ID, dst_inst->GetCharges());
|
||||
Log(Logs::Detail, Logs::Inventory, "Dest slot %d has item %s (%d) with %d charges in it.", dst_slot_id, dst_inst->GetItem()->Name, dst_inst->GetItem()->ID, dst_inst->GetCharges());
|
||||
dstitemid = dst_inst->GetItem()->ID;
|
||||
}
|
||||
if (Trader && srcitemid>0){
|
||||
@@ -1558,7 +1558,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
move_in->from_slot = dst_slot_check;
|
||||
move_in->to_slot = src_slot_check;
|
||||
move_in->number_in_stack = dst_inst->GetCharges();
|
||||
if(!SwapItem(move_in)) { Log.Out(Logs::Detail, Logs::Inventory, "Recursive SwapItem call failed due to non-existent destination item (charid: %i, fromslot: %i, toslot: %i)", CharacterID(), src_slot_id, dst_slot_id); }
|
||||
if(!SwapItem(move_in)) { Log(Logs::Detail, Logs::Inventory, "Recursive SwapItem call failed due to non-existent destination item (charid: %i, fromslot: %i, toslot: %i)", CharacterID(), src_slot_id, dst_slot_id); }
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1566,7 +1566,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
//verify shared bank transactions in the database
|
||||
if (src_inst && src_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && src_slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
if(!database.VerifyInventory(account_id, src_slot_id, src_inst)) {
|
||||
Log.Out(Logs::General, Logs::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name);
|
||||
Log(Logs::General, Logs::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name);
|
||||
DeleteItemInInventory(dst_slot_id,0,true);
|
||||
return(false);
|
||||
}
|
||||
@@ -1581,7 +1581,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
if (dst_inst && dst_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
if(!database.VerifyInventory(account_id, dst_slot_id, dst_inst)) {
|
||||
Log.Out(Logs::General, Logs::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name);
|
||||
Log(Logs::General, Logs::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name);
|
||||
DeleteItemInInventory(src_slot_id,0,true);
|
||||
return(false);
|
||||
}
|
||||
@@ -1618,7 +1618,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
ndh_item_data.append(StringFormat(", nodrop=%s(%u)", (ndh_item->NoDrop == 0 ? "true" : "false"), ndh_item->NoDrop));
|
||||
}
|
||||
}
|
||||
Log.Out(Logs::General, Logs::Error, "WorldKick() of Player %s(id:%u, acct:%u) due to 'NoDrop Hack' detection >> SlotID:%i, ItemData:'%s'",
|
||||
Log(Logs::General, Logs::Error, "WorldKick() of Player %s(id:%u, acct:%u) due to 'NoDrop Hack' detection >> SlotID:%i, ItemData:'%s'",
|
||||
GetName(), CharacterID(), AccountID(), src_slot_id, ndh_item_data.c_str());
|
||||
ndh_inst = nullptr;
|
||||
|
||||
@@ -1720,7 +1720,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
return false;
|
||||
}
|
||||
if (with) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Trade item move from slot %d to slot %d (trade with %s)", src_slot_id, dst_slot_id, with->GetName());
|
||||
Log(Logs::Detail, Logs::Inventory, "Trade item move from slot %d to slot %d (trade with %s)", src_slot_id, dst_slot_id, with->GetName());
|
||||
// Fill Trade list with items from cursor
|
||||
if (!m_inv[EQEmu::inventory::slotCursor]) {
|
||||
Message(13, "Error: Cursor item not located on server!");
|
||||
@@ -1753,18 +1753,18 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if (move_in->number_in_stack > 0) {
|
||||
// Determine if charged items can stack
|
||||
if(src_inst && !src_inst->IsStackable()) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. %s is not a stackable item. (charname: %s)", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetItem()->Name, GetName());
|
||||
Log(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. %s is not a stackable item. (charname: %s)", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetItem()->Name, GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dst_inst) {
|
||||
if(src_inst->GetID() != dst_inst->GetID()) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. Incompatible item types: %d != %d", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetID(), dst_inst->GetID());
|
||||
Log(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. Incompatible item types: %d != %d", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetID(), dst_inst->GetID());
|
||||
return(false);
|
||||
}
|
||||
if(dst_inst->GetCharges() < dst_inst->GetItem()->StackSize) {
|
||||
//we have a chance of stacking.
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. dest has %d/%d charges", src_slot_id, dst_slot_id, move_in->number_in_stack, dst_inst->GetCharges(), dst_inst->GetItem()->StackSize);
|
||||
Log(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. dest has %d/%d charges", src_slot_id, dst_slot_id, move_in->number_in_stack, dst_inst->GetCharges(), dst_inst->GetItem()->StackSize);
|
||||
// Charges can be emptied into dst
|
||||
uint16 usedcharges = dst_inst->GetItem()->StackSize - dst_inst->GetCharges();
|
||||
if (usedcharges > move_in->number_in_stack)
|
||||
@@ -1776,15 +1776,15 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// Depleted all charges?
|
||||
if (src_inst->GetCharges() < 1)
|
||||
{
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Dest (%d) now has %d charges, source (%d) was entirely consumed. (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, usedcharges);
|
||||
Log(Logs::Detail, Logs::Inventory, "Dest (%d) now has %d charges, source (%d) was entirely consumed. (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, usedcharges);
|
||||
database.SaveInventory(CharacterID(),nullptr,src_slot_id);
|
||||
m_inv.DeleteItem(src_slot_id);
|
||||
all_to_stack = true;
|
||||
} else {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Dest (%d) now has %d charges, source (%d) has %d (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, src_inst->GetCharges(), usedcharges);
|
||||
Log(Logs::Detail, Logs::Inventory, "Dest (%d) now has %d charges, source (%d) has %d (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, src_inst->GetCharges(), usedcharges);
|
||||
}
|
||||
} else {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. Exceeds dest maximum stack size: %d/%d", src_slot_id, dst_slot_id, move_in->number_in_stack, (src_inst->GetCharges()+dst_inst->GetCharges()), dst_inst->GetItem()->StackSize);
|
||||
Log(Logs::Detail, Logs::Inventory, "Move from %d to %d with stack size %d. Exceeds dest maximum stack size: %d/%d", src_slot_id, dst_slot_id, move_in->number_in_stack, (src_inst->GetCharges()+dst_inst->GetCharges()), dst_inst->GetItem()->StackSize);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1793,12 +1793,12 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if ((int16)move_in->number_in_stack >= src_inst->GetCharges()) {
|
||||
// Move entire stack
|
||||
if(!m_inv.SwapItem(src_slot_id, dst_slot_id)) { return false; }
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Move entire stack from %d to %d with stack size %d. Dest empty.", src_slot_id, dst_slot_id, move_in->number_in_stack);
|
||||
Log(Logs::Detail, Logs::Inventory, "Move entire stack from %d to %d with stack size %d. Dest empty.", src_slot_id, dst_slot_id, move_in->number_in_stack);
|
||||
}
|
||||
else {
|
||||
// Split into two
|
||||
src_inst->SetCharges(src_inst->GetCharges() - move_in->number_in_stack);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Split stack of %s (%d) from slot %d to %d with stack size %d. Src keeps %d.", src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetCharges());
|
||||
Log(Logs::Detail, Logs::Inventory, "Split stack of %s (%d) from slot %d to %d with stack size %d. Src keeps %d.", src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetCharges());
|
||||
EQEmu::ItemInstance* inst = database.CreateItem(src_inst->GetItem(), move_in->number_in_stack);
|
||||
m_inv.PutItem(dst_slot_id, *inst);
|
||||
safe_delete(inst);
|
||||
@@ -1822,8 +1822,8 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
SetMaterial(dst_slot_id,src_inst->GetItem()->ID);
|
||||
}
|
||||
if(!m_inv.SwapItem(src_slot_id, dst_slot_id)) { return false; }
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id);
|
||||
if(!m_inv.SwapItem(src_slot_id, dst_slot_id, GetRace(), GetClass(), GetDeity(), GetLevel())) { return false; }
|
||||
Log(Logs::Detail, Logs::Inventory, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id);
|
||||
|
||||
if (src_slot_id <= EQEmu::legacy::EQUIPMENT_END || src_slot_id == EQEmu::inventory::slotPowerSource) {
|
||||
if(src_inst) {
|
||||
@@ -1886,7 +1886,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
|
||||
|
||||
// resync the 'from' and 'to' slots on an as-needed basis
|
||||
// Not as effective as the full process, but less intrusive to gameplay
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot);
|
||||
Message(15, "Inventory Desyncronization detected: Resending slot data...");
|
||||
|
||||
if ((move_slots->from_slot >= EQEmu::legacy::EQUIPMENT_BEGIN && move_slots->from_slot <= EQEmu::legacy::CURSOR_BAG_END) || move_slots->from_slot == EQEmu::inventory::slotPowerSource) {
|
||||
@@ -2267,7 +2267,7 @@ static bool CopyBagContents(EQEmu::ItemInstance* new_bag, const EQEmu::ItemInsta
|
||||
for (auto bag_slot = 0; bag_slot < old_bag->GetItem()->BagSlots; ++bag_slot) {
|
||||
if (!old_bag->GetItem(bag_slot)) { continue; }
|
||||
if (old_bag->GetItem(bag_slot)->GetItem()->Size > new_bag->GetItem()->BagSize) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Copy Bag Contents: Failure due to %s is larger than size capacity of %s (%i > %i)",
|
||||
Log(Logs::General, Logs::Inventory, "Copy Bag Contents: Failure due to %s is larger than size capacity of %s (%i > %i)",
|
||||
old_bag->GetItem(bag_slot)->GetItem()->Name, new_bag->GetItem()->Name, old_bag->GetItem(bag_slot)->GetItem()->Size, new_bag->GetItem()->BagSize);
|
||||
return false;
|
||||
}
|
||||
@@ -2298,7 +2298,7 @@ void Client::DisenchantSummonedBags(bool client_update)
|
||||
if (!new_inst) { continue; }
|
||||
|
||||
if (CopyBagContents(new_inst, inst)) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, slot_id);
|
||||
PutItemInInventory(slot_id, *new_inst, client_update);
|
||||
}
|
||||
safe_delete(new_inst);
|
||||
@@ -2319,7 +2319,7 @@ void Client::DisenchantSummonedBags(bool client_update)
|
||||
if (!new_inst) { continue; }
|
||||
|
||||
if (CopyBagContents(new_inst, inst)) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, slot_id);
|
||||
PutItemInInventory(slot_id, *new_inst, client_update);
|
||||
}
|
||||
safe_delete(new_inst);
|
||||
@@ -2340,7 +2340,7 @@ void Client::DisenchantSummonedBags(bool client_update)
|
||||
if (!new_inst) { continue; }
|
||||
|
||||
if (CopyBagContents(new_inst, inst)) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, slot_id);
|
||||
PutItemInInventory(slot_id, *new_inst, client_update);
|
||||
}
|
||||
safe_delete(new_inst);
|
||||
@@ -2361,7 +2361,7 @@ void Client::DisenchantSummonedBags(bool client_update)
|
||||
if (!new_inst) { break; }
|
||||
|
||||
if (CopyBagContents(new_inst, inst)) {
|
||||
Log.Out(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, EQEmu::inventory::slotCursor);
|
||||
Log(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, EQEmu::inventory::slotCursor);
|
||||
std::list<EQEmu::ItemInstance*> local;
|
||||
local.push_front(new_inst);
|
||||
m_inv.PopItem(EQEmu::inventory::slotCursor);
|
||||
@@ -2397,7 +2397,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::EQUIPMENT_BEGIN; slot_id <= EQEmu::legacy::EQUIPMENT_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, client_update);
|
||||
}
|
||||
}
|
||||
@@ -2405,7 +2405,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::GENERAL_BEGIN; slot_id <= EQEmu::legacy::GENERAL_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if (inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, client_update);
|
||||
}
|
||||
}
|
||||
@@ -2413,7 +2413,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
if (m_inv[EQEmu::inventory::slotPowerSource]) {
|
||||
auto inst = m_inv[EQEmu::inventory::slotPowerSource];
|
||||
if (inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource);
|
||||
DeleteItemInInventory(EQEmu::inventory::slotPowerSource, 0, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false); // Ti slot non-existent
|
||||
}
|
||||
}
|
||||
@@ -2421,7 +2421,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::legacy::CURSOR_BAG_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, client_update);
|
||||
}
|
||||
}
|
||||
@@ -2429,7 +2429,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::BANK_BEGIN; slot_id <= EQEmu::legacy::BANK_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Bank slots
|
||||
}
|
||||
}
|
||||
@@ -2437,7 +2437,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::BANK_BAGS_BEGIN; slot_id <= EQEmu::legacy::BANK_BAGS_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Bank Container slots
|
||||
}
|
||||
}
|
||||
@@ -2445,7 +2445,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::SHARED_BANK_BEGIN; slot_id <= EQEmu::legacy::SHARED_BANK_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Shared Bank slots
|
||||
}
|
||||
}
|
||||
@@ -2453,7 +2453,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
for (auto slot_id = EQEmu::legacy::SHARED_BANK_BAGS_BEGIN; slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END; ++slot_id) {
|
||||
auto inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Shared Bank Container slots
|
||||
}
|
||||
}
|
||||
@@ -2471,7 +2471,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
auto inst = *iter;
|
||||
if (inst == nullptr) { continue; }
|
||||
if (!inst->GetItem()->NoRent) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
}
|
||||
else {
|
||||
m_inv.PushCursor(*inst);
|
||||
@@ -2492,7 +2492,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = m_inv.PopItem(slot_id);
|
||||
if (inst == nullptr) { continue; }
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2505,7 +2505,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = m_inv.PopItem(slot_id);
|
||||
if (inst == nullptr) { continue; }
|
||||
if (CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2518,7 +2518,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = m_inv.PopItem(EQEmu::inventory::slotPowerSource);
|
||||
if (inst) {
|
||||
if (CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource);
|
||||
database.SaveInventory(character_id, nullptr, EQEmu::inventory::slotPowerSource);
|
||||
}
|
||||
else {
|
||||
@@ -2532,7 +2532,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = m_inv.PopItem(slot_id);
|
||||
if (inst == nullptr) { continue; }
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2545,7 +2545,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = m_inv.PopItem(slot_id);
|
||||
if (inst == nullptr) { continue; }
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2558,7 +2558,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = m_inv.PopItem(slot_id);
|
||||
if (inst == nullptr) { continue; }
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2583,7 +2583,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
auto inst = *iter;
|
||||
if (inst == nullptr) { continue; }
|
||||
if (CheckLoreConflict(inst->GetItem())) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
safe_delete(inst);
|
||||
}
|
||||
else {
|
||||
@@ -2602,7 +2602,7 @@ void Client::RemoveDuplicateLore(bool client_update)
|
||||
m_inv.PushCursor(*inst);
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
}
|
||||
safe_delete(inst);
|
||||
}
|
||||
@@ -2620,7 +2620,7 @@ void Client::MoveSlotNotAllowed(bool client_update)
|
||||
auto inst = m_inv.PopItem(slot_id);
|
||||
bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size, is_arrow);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, client_update);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
@@ -2631,7 +2631,7 @@ void Client::MoveSlotNotAllowed(bool client_update)
|
||||
auto inst = m_inv.PopItem(EQEmu::inventory::slotPowerSource);
|
||||
bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size, is_arrow);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource, free_slot_id);
|
||||
Log(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false);
|
||||
database.SaveInventory(character_id, nullptr, EQEmu::inventory::slotPowerSource);
|
||||
safe_delete(inst);
|
||||
@@ -2768,7 +2768,7 @@ void Client::CreateBandolier(const EQApplicationPacket *app)
|
||||
|
||||
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->Number, bs->Name);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->Number, bs->Name);
|
||||
strcpy(m_pp.bandoliers[bs->Number].Name, bs->Name);
|
||||
|
||||
const EQEmu::ItemInstance* InvItem = nullptr;
|
||||
@@ -2782,13 +2782,13 @@ void Client::CreateBandolier(const EQApplicationPacket *app)
|
||||
InvItem = GetInv()[WeaponSlot];
|
||||
if(InvItem) {
|
||||
BaseItem = InvItem->GetItem();
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID = BaseItem->ID;
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon = BaseItem->Icon;
|
||||
database.SaveCharacterBandolier(this->CharacterID(), bs->Number, BandolierSlot, m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID, m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon, bs->Name);
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID = 0;
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon = 0;
|
||||
}
|
||||
@@ -2798,7 +2798,7 @@ void Client::CreateBandolier(const EQApplicationPacket *app)
|
||||
void Client::RemoveBandolier(const EQApplicationPacket *app)
|
||||
{
|
||||
BandolierDelete_Struct *bds = (BandolierDelete_Struct*)app->pBuffer;
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s removing set", GetName(), bds->Number);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s removing set", GetName(), bds->Number);
|
||||
memset(m_pp.bandoliers[bds->Number].Name, 0, 32);
|
||||
for(int i = bandolierPrimary; i <= bandolierAmmo; i++) {
|
||||
m_pp.bandoliers[bds->Number].Items[i].ID = 0;
|
||||
@@ -2813,7 +2813,7 @@ void Client::SetBandolier(const EQApplicationPacket *app)
|
||||
// any items currently in the weapon slots to inventory.
|
||||
|
||||
BandolierSet_Struct *bss = (BandolierSet_Struct*)app->pBuffer;
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s activating set %i", GetName(), bss->Number);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s activating set %i", GetName(), bss->Number);
|
||||
int16 slot = 0;
|
||||
int16 WeaponSlot = 0;
|
||||
EQEmu::ItemInstance *BandolierItems[4]; // Temporary holding area for the weapons we pull out of their inventory
|
||||
@@ -2880,19 +2880,19 @@ void Client::SetBandolier(const EQApplicationPacket *app)
|
||||
else { // The player doesn't have the required weapon with them.
|
||||
BandolierItems[BandolierSlot] = 0;
|
||||
if (slot == INVALID_INDEX) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Character does not have required bandolier item for slot %i", WeaponSlot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Character does not have required bandolier item for slot %i", WeaponSlot);
|
||||
EQEmu::ItemInstance *InvItem = m_inv.PopItem(WeaponSlot);
|
||||
if(InvItem) {
|
||||
// If there was an item in that weapon slot, put it in the inventory
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "returning item %s in weapon slot %i to inventory",
|
||||
Log(Logs::Detail, Logs::Inventory, "returning item %s in weapon slot %i to inventory",
|
||||
InvItem->GetItem()->Name, WeaponSlot);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "returning item %s in weapon slot %i to inventory", InvItem->GetItem()->Name, WeaponSlot);
|
||||
Log(Logs::Detail, Logs::Inventory, "returning item %s in weapon slot %i to inventory", InvItem->GetItem()->Name, WeaponSlot);
|
||||
if (MoveItemToInventory(InvItem)) {
|
||||
database.SaveInventory(character_id, 0, WeaponSlot);
|
||||
Log.Out(Logs::General, Logs::Error, "returning item %s in weapon slot %i to inventory", InvItem->GetItem()->Name, WeaponSlot);
|
||||
Log(Logs::General, Logs::Error, "returning item %s in weapon slot %i to inventory", InvItem->GetItem()->Name, WeaponSlot);
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::General, Logs::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name);
|
||||
Log(Logs::General, Logs::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name);
|
||||
}
|
||||
safe_delete(InvItem);
|
||||
}
|
||||
@@ -2926,7 +2926,7 @@ void Client::SetBandolier(const EQApplicationPacket *app)
|
||||
if(InvItem) {
|
||||
// If there was already an item in that weapon slot that we replaced, find a place to put it
|
||||
if (!MoveItemToInventory(InvItem)) {
|
||||
Log.Out(Logs::General, Logs::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name);
|
||||
Log(Logs::General, Logs::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name);
|
||||
}
|
||||
safe_delete(InvItem);
|
||||
}
|
||||
@@ -2937,13 +2937,13 @@ void Client::SetBandolier(const EQApplicationPacket *app)
|
||||
// put it in the player's inventory.
|
||||
EQEmu::ItemInstance *InvItem = m_inv.PopItem(WeaponSlot);
|
||||
if(InvItem) {
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Bandolier has no item for slot %i, returning item %s to inventory", WeaponSlot, InvItem->GetItem()->Name);
|
||||
Log(Logs::Detail, Logs::Inventory, "Bandolier has no item for slot %i, returning item %s to inventory", WeaponSlot, InvItem->GetItem()->Name);
|
||||
// If there was an item in that weapon slot, put it in the inventory
|
||||
if (MoveItemToInventory(InvItem)) {
|
||||
database.SaveInventory(character_id, 0, WeaponSlot);
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::General, Logs::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name);
|
||||
Log(Logs::General, Logs::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name);
|
||||
}
|
||||
safe_delete(InvItem);
|
||||
}
|
||||
@@ -2976,7 +2976,7 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Inventory,"Char: %s Returning %s to inventory", GetName(), ItemToReturn->GetItem()->Name);
|
||||
Log(Logs::Detail, Logs::Inventory,"Char: %s Returning %s to inventory", GetName(), ItemToReturn->GetItem()->Name);
|
||||
|
||||
uint32 ItemID = ItemToReturn->GetItem()->ID;
|
||||
|
||||
@@ -3056,7 +3056,7 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC
|
||||
|
||||
database.SaveInventory(character_id, m_inv.GetItem(i), i);
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s Storing in main inventory slot %i", GetName(), i);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s Storing in main inventory slot %i", GetName(), i);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -3079,7 +3079,7 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC
|
||||
|
||||
database.SaveInventory(character_id, m_inv.GetItem(BaseSlotID + BagSlot), BaseSlotID + BagSlot);
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s Storing in bag slot %i", GetName(), BaseSlotID + BagSlot);
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s Storing in bag slot %i", GetName(), BaseSlotID + BagSlot);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -3089,7 +3089,7 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC
|
||||
|
||||
// Store on the cursor
|
||||
//
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s No space, putting on the cursor", GetName());
|
||||
Log(Logs::Detail, Logs::Inventory, "Char: %s No space, putting on the cursor", GetName());
|
||||
|
||||
PushItemOnCursor(*ItemToReturn, UpdateClient);
|
||||
|
||||
@@ -3160,7 +3160,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
|
||||
log = true;
|
||||
|
||||
if (log) {
|
||||
Log.Out(Logs::General, Logs::Error, "Client::InterrogateInventory() called for %s by %s with an error state of %s", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE"));
|
||||
Log(Logs::General, Logs::Error, "Client::InterrogateInventory() called for %s by %s with an error state of %s", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE"));
|
||||
}
|
||||
if (!silent) {
|
||||
requester->Message(1, "--- Inventory Interrogation Report for %s (requested by: %s, error state: %s) ---", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE"));
|
||||
@@ -3181,8 +3181,8 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
|
||||
}
|
||||
|
||||
if (log) {
|
||||
Log.Out(Logs::General, Logs::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
|
||||
Log.Out(Logs::Detail, Logs::None, "[CLIENT] Client::InterrogateInventory() -- End");
|
||||
Log(Logs::General, Logs::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
|
||||
Log(Logs::Detail, Logs::None, "[CLIENT] Client::InterrogateInventory() -- End");
|
||||
}
|
||||
if (!silent) {
|
||||
requester->Message(1, "Target interrogation flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
|
||||
@@ -3197,7 +3197,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
|
||||
void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, bool log, bool silent, bool &error, int depth)
|
||||
{
|
||||
if (depth >= 10) {
|
||||
Log.Out(Logs::Detail, Logs::None, "[CLIENT] Client::InterrogateInventory_() - Recursion count has exceeded the maximum allowable (You have a REALLY BIG PROBLEM!!)");
|
||||
Log(Logs::Detail, Logs::None, "[CLIENT] Client::InterrogateInventory_() - Recursion count has exceeded the maximum allowable (You have a REALLY BIG PROBLEM!!)");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3228,7 +3228,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea
|
||||
else { e = ""; }
|
||||
|
||||
if (log) {
|
||||
Log.Out(Logs::General, Logs::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s",
|
||||
Log(Logs::General, Logs::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s",
|
||||
head, depth, i.c_str(), p.c_str(), e.c_str());
|
||||
}
|
||||
if (!silent) {
|
||||
|
||||
Reference in New Issue
Block a user