mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition
This commit is contained in:
+6
-6
@@ -324,7 +324,7 @@ void Object::Delete(bool reset_state)
|
||||
}
|
||||
|
||||
const ItemInst* Object::GetItem(uint8 index) {
|
||||
if (index < EQEmu::constants::TYPE_WORLD_SIZE) {
|
||||
if (index < EQEmu::legacy::TYPE_WORLD_SIZE) {
|
||||
return m_inst->GetItem(index);
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ void Object::Close() {
|
||||
ItemInst* container = this->m_inst;
|
||||
if(container != nullptr)
|
||||
{
|
||||
for (uint8 i = SUB_INDEX_BEGIN; i < EQEmu::constants::ITEM_CONTAINER_SIZE; i++)
|
||||
for (uint8 i = SUB_INDEX_BEGIN; i < EQEmu::legacy::ITEM_CONTAINER_SIZE; i++)
|
||||
{
|
||||
ItemInst* inst = container->PopItem(i);
|
||||
if(inst != nullptr)
|
||||
@@ -503,11 +503,11 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
|
||||
|
||||
// Transfer item to client
|
||||
sender->PutItemInInventory(SlotCursor, *m_inst, false);
|
||||
sender->SendItemPacket(SlotCursor, m_inst, ItemPacketTrade);
|
||||
sender->PutItemInInventory(EQEmu::legacy::SlotCursor, *m_inst, false);
|
||||
sender->SendItemPacket(EQEmu::legacy::SlotCursor, m_inst, ItemPacketTrade);
|
||||
|
||||
if(cursordelete) // delete the item if it's a duplicate lore. We have to do this because the client expects the item packet
|
||||
sender->DeleteItemInInventory(SlotCursor);
|
||||
sender->DeleteItemInInventory(EQEmu::legacy::SlotCursor);
|
||||
|
||||
if(!m_ground_spawn)
|
||||
safe_delete(m_inst);
|
||||
@@ -583,7 +583,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
EQApplicationPacket* outapp=new EQApplicationPacket(OP_ClientReady,0);
|
||||
sender->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
for (uint8 i = SUB_INDEX_BEGIN; i < EQEmu::constants::ITEM_CONTAINER_SIZE; i++) {
|
||||
for (uint8 i = SUB_INDEX_BEGIN; i < EQEmu::legacy::ITEM_CONTAINER_SIZE; i++) {
|
||||
const ItemInst* inst = m_inst->GetItem(i);
|
||||
if (inst) {
|
||||
//sender->GetInv().PutItem(i+4000,inst);
|
||||
|
||||
Reference in New Issue
Block a user