mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Merge remote-tracking branch 'remotes/origin/master' into logging_changes
Conflicts: world/client.cpp world/worlddb.cpp zone/aggro.cpp zone/bot.cpp zone/client.cpp zone/client_packet.cpp zone/client_process.cpp zone/doors.cpp zone/entity.cpp zone/inventory.cpp zone/mob_ai.cpp zone/perl_client.cpp zone/spells.cpp zone/waypoints.cpp zone/zone.cpp zone/zonedb.cpp zone/zoning.cpp
This commit is contained in:
+12
-2
@@ -1259,7 +1259,7 @@ int16 Inventory::_HasItemByUse(std::map<int16, ItemInst*>& bucket, uint8 use, ui
|
||||
|
||||
if (!inst->IsType(ItemClassContainer)) { continue; }
|
||||
|
||||
for (auto bag_iter = bucket.begin(); bag_iter != bucket.end(); ++bag_iter) {
|
||||
for (auto bag_iter = inst->_begin(); bag_iter != inst->_end(); ++bag_iter) {
|
||||
auto bag_inst = bag_iter->second;
|
||||
if (bag_inst == nullptr) { continue; }
|
||||
|
||||
@@ -1710,9 +1710,17 @@ void ItemInst::ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent)
|
||||
end = m_contents.end();
|
||||
for (; cur != end;) {
|
||||
ItemInst* inst = cur->second;
|
||||
if (inst == nullptr)
|
||||
if (inst == nullptr) {
|
||||
cur = m_contents.erase(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
const Item_Struct* item = inst->GetItem();
|
||||
if (item == nullptr) {
|
||||
cur = m_contents.erase(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
del = cur;
|
||||
++cur;
|
||||
|
||||
@@ -1723,6 +1731,7 @@ void ItemInst::ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent)
|
||||
m_contents.erase(del->first);
|
||||
continue;
|
||||
}
|
||||
// no 'break;' deletes 'byFlagNotSet' type - can't add at the moment because it really *breaks* the process somewhere
|
||||
case byFlagNotSet:
|
||||
if (item->NoDrop != 0) {
|
||||
safe_delete(inst);
|
||||
@@ -1740,6 +1749,7 @@ void ItemInst::ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent)
|
||||
m_contents.erase(del->first);
|
||||
continue;
|
||||
}
|
||||
// no 'break;' deletes 'byFlagNotSet' type - can't add at the moment because it really *breaks* the process somewhere
|
||||
case byFlagNotSet:
|
||||
if (item->NoRent != 0) {
|
||||
safe_delete(inst);
|
||||
|
||||
Reference in New Issue
Block a user