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

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-24-2003, 05:28 AM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default Partial Fix for World Tradeskill Objects (new opcode)

This fixes the problem where ingredients are not removed from the tradeskill object after the combine button is pushed. Notice there's a new, undocumented opcode: 0x01c5 whose function appears to clear the open tradeskill window.

Changes are made towards the end of Object.cpp around line 511 where the routine starts that removes objects from tradeskill containers.

Original Object.cpp:
Code:
                // Remove all items from tradeskill container now that combine is done
                for (uint8 i=0; i<10; i++){
                        const ItemInst* inst = container->GetItem(i);
                        if (inst)
                                user->DeleteItemInInventory(Inventory::CalcSlotId(in_combine->container_slot,i),0,true);
                }
                container->Clear();
Changed to new Object.cpp:
Code:
                // Remove all items from tradeskill container now that combine is done
                for (uint8 i=0; i<10; i++){
                        const ItemInst* inst = container->GetItem(i);
                        if (inst) {
                                if (Inventory::SupportsContainers(in_combine->container_slot) )
                                        user->DeleteItemInInventory(Inventory::CalcSlotId(in_combine->container_slot,i),0,true);
                                 else
                                        container->DeleteItem(i);
                        }
                }
                if (Inventory::SupportsContainers(in_combine->container_slot)) {
                        container->Clear();
                } else {
                        APPLAYER* outapp2 = new APPLAYER(0x01c5, 0);
                        user->QueuePacket(outapp2);
                        safe_delete(outapp2);
                }

This is a partial fix because there is one more thing that needs to be fixed before Tradeskill Objects will work perfectly. Currently when the tradeskill object is opened, for some reason the client is not displaying the contents (if any) of that object (from object_contents table). The code is in, but is not working for some reason. This is a bad thing since if someone leaves items in the Tradeskill Object and closes the Object window, that Tradeskill Object will be unusable for tradeskill combines until someone clears out the object_contents table for that object. I haven't figured this out yet, but wanted to go ahead and post the above change since it greatly improves the viability of tradeskills.

I've worked with Tcsmyworld to get functional Objects table data. I'm thinking that table and its data should be added into the CVS once this is confirmed to work properly.

Oh, I just noticed something, if there's a better way of detecting an object other than SupportsContainers (that's kinda unintuitive in my opinion but it worked at the time...), please substitute.

Regards,

krich
Reply With Quote
 


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 04:18 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3