PDA

View Full Version : Item is for display purposes - Look at the Code


Xorith
11-20-2004, 07:16 AM
Alrighty, posting this here where it belongs.

I played with NODROP stuff, I've looked at what I could. This is stil bothering me.

Line 3081 in client_packet.cpp

for(itr = merlist.begin();itr != merlist.end();itr++){
MerchantList ml = *itr;
if(mp->itemslot == ml.slot){ // <-- This ifcheck doesn't pass on any item.
item_id = ml.item;
break;
}
}


I noted above. I threw in some debug messages and found that the loop runs fine, but it never passes the ifcheck on any of the items.

What exactly is mp->itemslot and ml.slot? The slot number on the merchant? If so, what would cause this to never match?

I tried to get as close to the issue as I could to aid those who are willing to help.

-- Xorith

Doodman
11-20-2004, 02:05 PM
I'll look in to it. It might have been something I missed while updating some of the item code for field changes during the implementation of augs.

Doodman
11-20-2004, 05:03 PM
Found, fixed and checked in.. Should be on public CVS in a few hours.

For the impatient:
Patch to common/Item.cpp:
*** Item.cpp.orig Tue Nov 16 13:45:07 2004
--- Item.cpp Sat Nov 20 22:44:04 2004
***************
*** 1126,1137 ****

char ch[250] = {0}; // Estimate on largest possible

- uint32 mslot=0;
- if (m_merchantslot!=0xFFFFFFFF && m_merchantslot!=0)// && merchant_slot!=0xFFFFFFFFCCCCCCCC)
- mslot = m_merchantslot;
- else
- mslot = m_item->Unknown004;
-
// Format pipe-delimited string for packet
int charges=m_charges;
if(charges==255)
--- 1126,1131 ----
***************
*** 1147,1154 ****
m_item->Unknown001,
slot_id,
m_price,
! mslot,
! m_item->Unknown005,
m_item->Unknown006,
spellcharges,
m_item->Attuneable,
--- 1141,1148 ----
m_item->Unknown001,
slot_id,
m_price,
! m_item->Unknown004,
! (m_merchantslot==0) ? m_item->Unknown005 : m_merchantslot,
m_item->Unknown006,
spellcharges,
m_item->Attuneable,

Really only the second part of that patch is truely needed, the other is clean up.

Xorith
11-20-2004, 08:19 PM
Thank you again, Doodman. I need to spend some quality time with the code and get to know it a little better.

Zengez
11-27-2004, 05:06 AM
Mildly related to this...

I have been inquiring into setting item costs on other threads and i'm using a linux box so people suggested i post here and see if you guys had any ideas.... to make this short and sweet i'll link my other thread for info...


http://www.eqemulator.net/forums/viewtopic.php?t=18698

My question is, is there any reason those lines wouldn't work from a linux standpoint? Apparently it should have worked for most any other server, so .... i'm confused hehe, any help would be appreciated :)