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

02-01-2013, 04:32 PM
|
 |
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
Using the current map schema:
[map<int16, ItemInst> m_name]
Inventory::m_worn {slottype 0, mainslots 0 - 22, subslot -1} [slottype 0 is still split to avoid unnecessary range checks]
Inventory::m_inv {slottype 0, mainslots 23 - 33, subslot -1} [visible cursor is treated the same as inventory slots]
Inventory::m_bank {slottype 1, mainslots 0 - 23, subslot -1}
Inventory::m_shbank {slottype 2, mainslots 0 - 1, subslot -1}
Inventory::m_trade {slottype 3, mainslots 0 - 7, subslot -1}
Inventory::m_tradesk {slottype 4, mainslots 0 - 9, subslot -1}
Inventory::m_buffer {slottype 5, mainslots 0 - 35, subslot -1} [36 matches legacy client buffer size..need to test/buffer is managed]
Inventory::m_tribute {slottype 6, mainslots 0 - 4, subslot -1}
[add more as needed]
Bag (sub) slots will be accessed through Client::m_inv[{slottype, mainslot, subslot}]::m_contents accessors.
[bagsize property is 8-bit, so imposed limit will be 256..server max is 65536]
Here are a few thoughts on where I stand:
- Do away with transferring items out of ItemInst::m_contents into Inventory::m_inv and just use accessors to retrieve the information directly. This will allow the use of 'unlimited' slot containers without having inventory ranges assigned to them.
- Implement a managed cursor buffer to handle cursor 'pushes.' I have a partial one developed, but can't test it until I can send RoF slot_structs directly.
- Use the 6x int16 RoF slot_struct as the basis for slot operations server-side. We can use an abbreviated one (3x int16, or less) where the full isn't needed.
- For the time being, I think we can get away with using the abbreviated (type, main, sub) version for database assignment.
- Item slot allowance bits 21 and 22 need to be swapped in the database.
I have a little more info stewing, but nothing worth reporting.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
 |
|
 |
 |
|
 |

02-11-2013, 07:46 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Noting a few pieces of code here for possible reference with the new slot system implementation. This is based on some recent info from the client itself that probably needs to be explored a bit more.
Code:
// Used for the new slot system
struct SlotStruct {
/*000*/ int16 SlotType; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Delete Item = -1
/*002*/ int16 MainSlot;
/*004*/ int16 SubSlot; // Slot inside a bag or an aug slot of an item
/*006*/
};
enum {
SLOT_TYPE_MAIN = 0, // Worn items and main inventory
SLOT_TYPE_BANK = 1,
SLOT_TYPE_SHARED_BANK = 2,
SLOT_TYPE_TRADE = 3,
SLOT_TYPE_WORLD = 4,
SLOT_TYPE_LIMBO = 5, // Cursor Buffer
SLOT_TYPE_TRIBUTE = 6,
SLOT_TYPE_TROPHY_TRIBUTE = 7,
SLOT_TYPE_GUILD_TRIBUTE = 8,
SLOT_TYPE_MERCHANT = 9,
SLOT_TYPE_DELETED = 10,
SLOT_TYPE_CORPSE = 11,
SLOT_TYPE_BAZAAR = 12,
SLOT_TYPE_INSPECT = 13,
SLOT_TYPE_REAL_ESTATE = 14,
SLOT_TYPE_VIEWMOD_PC = 15,
SLOT_TYPE_VIEWMOD_BANK = 16,
SLOT_TYPE_VIEWMOD_SHARED_BANK = 17,
SLOT_TYPE_VIEWMOD_LIMBO = 18,
SLOT_TYPE_ALT_STORAGE = 19,
SLOT_TYPE_ARCHIVED = 20, // Reclaimable Items
SLOT_TYPE_MAIL = 21, // Parcel Items
SLOT_TYPE_GUILD_TROPHY_TRIBUTE = 22,
SLOT_TYPE_OTHER = 23
};
enum {
invWhereWorn = 0x01, // 1
invWherePersonal = 0x02, // 2 - in the character's main inventory
invWhereBank = 0x04, // 4
invWhereSharedBank = 0x08, // 8
invWhereTrading = 0x10, // 16
invWhereCursor = 0x20, // 32
invWhereWorld = 0x40, // 64
invWhereLimbo = 0x80, // 128
invWhereTribute = 0x100, // 256
invWhereTrophyTribute = 0x200, // 512
invWhereGuildTribute = 0x400, // 1024
invWhereMerchant = 0x800, // 2048
invWhereDeleted = 0x1000, // 4096
invWhereCorpse = 0x2000, // 8192
invWhereBazaar = 0x4000, // 16384
invWhereInspect = 0x8000, // 32768
invWhereRealEstate = 0x10000, // 65536
invWhereViewModPC = 0x20000, // 131072
invWhereViewModBank = 0x40000, // 262144
invWhereViewModSharedBank = 0x80000, // 524288
invWhereViewModLimbo = 0x100000, // 1048576
invWhereAltStorage = 0x200000, // 2097152
invWhereArchived = 0x400000, // 4194304
invWhereMail = 0x800000, // 8388608
invWhereGuildTrophyTribute = 0x1000000, // 16777216
invWhereOther = 0x2000000, // 33554432
invWhereAll = 0x3FFFFFF // 67108863
};
// Player inventory
map<int16, ItemInst*> m_worn; // Type: 0, Main: 0 to 22 - Items worn by Character
map<int16, ItemInst*> m_inv; // Type: 0, Main: 23 to 33 - Items in Personal Inventory and Visible Cursor Item
map<int16, ItemInst*> m_bank; // Type: 1, Main: 0 to 23 - Items in Bank
map<int16, ItemInst*> m_shbank; // Type: 2, Main: 0 to 1 - Items in Shared Bank
map<int16, ItemInst*> m_trade; // Type: 3, Main: 0 to 7 - Items in a Trade Session
map<int16, ItemInst*> m_world; // Type: 4, Main: 0 to 10 - Items in World Containers
map<int16, ItemInst*> m_limbo; // Type: 5, Main: 0 to 36 - Items in Cursor Buffer/Limbo
//map<int16, ItemInst*> m_tribute; // Type: 6, Main: 0 to 4 - Items in Tribute (Handled by Bonuses?)
//map<int16, ItemInst*> m_trophytrib; // Type: 7, Main: 0 to 4 - Items in Trophy Tribute (Handled by Bonuses?)
//map<int16, ItemInst*> m_guildtrib; // Type: 8, Main: 0 to 4 - Items in Guild Tribute (Handled by Bonuses?)
//map<int16, ItemInst*> m_merchant; // Type: 9, Main: 0 to 80 - Items in Merchant (sold?) (No need to store this?)
map<int16, ItemInst*> m_deleted; // Type: 10, Main: 0 to X - Items in Deleted Pool? Same as Archived/Reclaim?
map<int16, ItemInst*> m_corpse; // Type: 11, Main: 0 to 33 - Items in Corpse(s)
map<int16, ItemInst*> m_bazaar; // Type: 12, Main: 0 to 200 - Items in Bazaar
//map<int16, ItemInst*> m_inspect; // Type: 13, Main: 0 to 22 - Items in Inspect Window (No need to store this?)
map<int16, ItemInst*> m_realestate; // Type: 14, Main: 0 to X - Items in Player Housing
//map<int16, ItemInst*> m_vmpc; // Type: 15, Main: 0 to 23 - Items in View Mod Worn/Personal (No need to store this?)
//map<int16, ItemInst*> m_vmbank; // Type: 16, Main: 0 to 23 - Items in View Mod Bank (No need to store this?)
//map<int16, ItemInst*> m_vmshbank; // Type: 17, Main: 0 to 1 - Items in View Mod Shared Bank (No need to store this?)
//map<int16, ItemInst*> m_vmlimbo; // Type: 18, Main: 0 to 36 - Items in View Mod Limbo (No need to store this?)
map<int16, ItemInst*> m_altstorage; // Type: 19, Main: 0 to X - Items in Alternate Storage
map<int16, ItemInst*> m_archived; // Type: 20, Main: 0 to X - Items in Reclaim Window
map<int16, ItemInst*> m_mail; // Type: 21, Main: 0 to X - Items in Mail/Parcels
//map<int16, ItemInst*> m_guildtrophytrib; // Type: 22, Main: 0 to 4 - Items in Guild Trophy Tribute (Handled by Bonuses?)
map<int16, ItemInst*> m_other; // Type: 23, Main: 0 to X - Items in Other
//ItemInstQueue m_cursor; // Type: 5, Main: 0 to 36 - Items on Cursor: FIFO - replaced by m_limbo
Last edited by trevius; 02-11-2013 at 07:54 AM..
|
 |
|
 |
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:45 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |