mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Test fix for charm in trader's satchel while trader..thanks demonstar and Derision! ** This may need to be tweaked..but, I was able to test without crashing the client.
This commit is contained in:
@@ -3087,10 +3087,20 @@ bool Client::CalcItemScale(uint32 slot_x, uint32 slot_y) {
|
||||
for (i = slot_x; i <= slot_y; i++) {
|
||||
if (i == MainAmmo) // moved here from calling procedure to facilitate future range changes where MainAmmo may not be the last slot
|
||||
continue;
|
||||
|
||||
ItemInst* inst = m_inv.GetItem(i);
|
||||
|
||||
if(inst == nullptr)
|
||||
continue;
|
||||
|
||||
// TEST CODE: test for bazaar trader crashing with charm items
|
||||
if (Trader)
|
||||
if (i >= EmuConstants::GENERAL_BAGS_BEGIN && i <= EmuConstants::GENERAL_BAGS_END) {
|
||||
ItemInst* parent_item = m_inv.GetItem(Inventory::CalcSlotId(i));
|
||||
if (parent_item && parent_item->GetItem()->ID == 17899) // trader satchel
|
||||
continue;
|
||||
}
|
||||
|
||||
bool update_slot = false;
|
||||
if(inst->IsScaling())
|
||||
{
|
||||
@@ -3170,10 +3180,20 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) {
|
||||
for(int i = slot_x; i <= slot_y; i++) {
|
||||
if (i == MainAmmo) // moved here from calling procedure to facilitate future range changes where MainAmmo may not be the last slot
|
||||
continue;
|
||||
|
||||
ItemInst* inst = m_inv.GetItem(i);
|
||||
|
||||
if(!inst)
|
||||
continue;
|
||||
|
||||
// TEST CODE: test for bazaar trader crashing with charm items
|
||||
if (Trader)
|
||||
if (i >= EmuConstants::GENERAL_BAGS_BEGIN && i <= EmuConstants::GENERAL_BAGS_END) {
|
||||
ItemInst* parent_item = m_inv.GetItem(Inventory::CalcSlotId(i));
|
||||
if (parent_item && parent_item->GetItem()->ID == 17899) // trader satchel
|
||||
continue;
|
||||
}
|
||||
|
||||
bool update_slot = false;
|
||||
if(inst->IsScaling())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user