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.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2002, 02:20 AM
keshik
Fire Beetle
 
Join Date: Oct 2002
Posts: 4
Default Merchant and status bug fix

Hey guys! Great job on the emu! Anyway, I figured out how to fix the merchant and status bugs. In client_process.cpp line:4269, it delete's cpi, but handyitem isn't done with it yet. On the source I got, I just moved it to line 4299, right after the if statement.

Also, as for the status<128 bug. Status is set to tinyint. Tinyint is only 7 bits so it has a max of 127. You can just change it to an int by typing:
ALTER TABLE account MODIFY status int NOT NULL default '0';

Hope that helps. Would love to hear how that works out, email me if ya get a chance. Email should be on profile.

Laters,
Keshik
Reply With Quote
  #2  
Old 10-11-2002, 03:53 AM
keshik
Fire Beetle
 
Join Date: Oct 2002
Posts: 4
Default

Thought I'd clarify what I said.

The bad line is in BulkSendMerchantInventory right after it picks a random item from handyitem. Code looks something like this.

APPLAYER* outapp = new APPLAYER(OP_ShopItem, 5000);
outapp->size = 2 + DeflatePacket((uchar*) cpi->packets, cpi->count * sizeof(MerchantItemD_Struct), &outapp->pBuffer[2], 5000-2);
MerchantItem_Struct* cpi2 = (MerchantItem_Struct*) outapp->pBuffer;
cpi2->count = cpi->count;
QueuePacket(outapp);
//DumpPacket(outapp);
//printf("Merchant has %i items available.\n",cpi->count);
delete outapp;


// delete cpi; << bad line handyitem not done with it yet



Mob* merch = entity_list.GetMob(npcid);
if(merch != 0 && handyitem)
{
... blah blah blah... }


delete cpi; // << good line

}


Hope that clears things up. Sorry that post was so confusing. Lack-o-sleep induced insanity.

Laters,
Keshik
Reply With Quote
  #3  
Old 10-11-2002, 07:45 AM
DeletedUser
Fire Beetle
 
Join Date: Sep 2002
Posts: 0
Default

My database just has the status field unsigned. Did you run the scripts to create the database or did you tinker with it by hand? Mine works fine on a tinyint unsigned.
Reply With Quote
  #4  
Old 10-11-2002, 12:41 PM
keshik
Fire Beetle
 
Join Date: Oct 2002
Posts: 4
Default

Oops, sorry about that. Just checked, the original db.sql from 3.9 has this in it for the table:

CREATE TABLE account (
id int(11) NOT NULL auto_increment,
name varchar(30) NOT NULL default '',
charname varchar(64) NOT NULL default '',
packencrypt blob NOT NULL default '',
password varchar(30) NOT NULL default '',
status tinyint(5) NOT NULL default '0',
lsaccount_id int(11) unsigned default NULL,
gmspeed tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY lsaccount_id (lsaccount_id),
UNIQUE KEY name (name)
) TYPE=MyISAM;

But the dbupdate.sql file contains:

alter table account modify status int(4) not null default '0';

Don't I feel stupid. I thought you only sourced dbupdate.sql if you were upgrading and not completely reinstalling/installing for the first time.

Anyways, how did the merchant thing work? I'd love to hear if that worked out.

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