Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2012, 12:22 PM
Spike
Discordant
 
Join Date: Mar 2004
Location: Florida
Posts: 362
Default inventory items

I'm making a program that can read the inventory of your character and sync this with an online database to show your inventory, similar to magelo.

Only problem is, I can't find where the information is stored. I'm reading the process memory and I'm finding things like HP AC and other stats, but cannot find out where an item is located in your inventory. How can I locate this in memory?
__________________
Reply With Quote
  #2  
Old 10-11-2012, 10:36 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I thought this info was in the 'peq.inventory' table. Its primary key is linked to the ID of the character. Slots are only assigned if there is an item in it. (Corpses
don't have a separate inventory table..their inventories are blob-encoded.)

If you're testing a character with absolutely no items, then you will not have any entries for that character ID.


The fact that you're finding HP, AC, etc... before the items is fairly surprising since that info is encoded in the BLOB.

If you're going to support Ti in addition to later clients, you will have to account for the extra BLOB length incurred by the addition of the 'power item' slot.


EDIT: I'm not sure if I'm reading this right, but if you're trying to add server code to provide your intended goal by reading in-memory values, you're probably
making it more difficult than it needs to be. You can read directly from the db since all item transactions are immediately saved.

Otherwise, look in 'client.h' for the definitions of m_inv, etc...
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #3  
Old 10-11-2012, 10:55 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think he is trying to read the client memory to record profile info locally for players. If that is the case, maybe you could just use the inventory export command built into the client that will export all items to a file. Then you can just parse the file.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 10-12-2012, 10:04 AM
Spike
Discordant
 
Join Date: Mar 2004
Location: Florida
Posts: 362
Default

That might be how magelo currently finds items. Does anyone know what the usual item setup looks like in memory? I can find item names and ID's but no slot #s
__________________
Reply With Quote
  #5  
Old 10-16-2012, 06:55 PM
iluvseq
Sarnak
 
Join Date: Aug 2009
Location: Somewhere
Posts: 53
Default

Take a look at the MQ2 source, specifically the _CHARINFO and _CHARINFO2 structs in EQData.h.

Keep in mind that the structures and offsets are different depending on the version of the client you are targeting.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:21 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3