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

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2006, 11:00 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I was just starting to dig in to this too, I actually replaced these lines with the old ones;
Code:
// "DELETE FROM quest_globals WHERE expdate < UNIX_TIMESTAMP() || (name='%s' && npcid=%i && charid=%i && zoneid=%i))" //New one
"DELETE FROM quest_globals WHERE expdate < %i || (name='%s' && npcid=%i && charid=%i && zoneid=%i))" //Old one
I found two instances, it compiles but still does the same, so i guess there's more to it like you say -
Reply With Quote
  #2  
Old 12-18-2006, 11:12 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Heres what happens; First, watch your quest_globals table in the database, make sure these rows are there;

For MySql5x-
Code:
INSERT INTO quest_globals VALUES (90,0,0,14,"quill","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (94,0,0,227,"krak","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (103,0,0,227,"peer","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (140,0,0,227,"grums","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (139,0,0,227,"kars","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (98,0,0,227,"hanr","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (109,0,0,227,"bres","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (110,0,0,227,"razo","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (113,0,0,227,"lava","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (138,0,0,109,"rage","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (141,0,0,111,"omica","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (142,0,0,111,"Tserr","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (152,0,0,224,"Alina","2",0) ON DUPLICATE KEY UPDATE value=2;
For MySql4x
Code:
INSERT INTO quest_globals VALUES (90,0,0,14,"quill","2",0);
INSERT INTO quest_globals VALUES (94,0,0,227,"krak","2",0);
INSERT INTO quest_globals VALUES (103,0,0,227,"peer","2",0);
INSERT INTO quest_globals VALUES (140,0,0,227,"grums","2",0);
INSERT INTO quest_globals VALUES (139,0,0,227,"kars","2",0);
INSERT INTO quest_globals VALUES (98,0,0,227,"hanr","2",0);
INSERT INTO quest_globals VALUES (109,0,0,227,"bres","2",0);
INSERT INTO quest_globals VALUES (110,0,0,227,"razo","2",0);
INSERT INTO quest_globals VALUES (113,0,0,227,"lava","2",0);
INSERT INTO quest_globals VALUES (138,0,0,109,"rage","2",0);
INSERT INTO quest_globals VALUES (141,0,0,111,"omica","2",0);
INSERT INTO quest_globals VALUES (142,0,0,111,"Tserr","2",0);
INSERT INTO quest_globals VALUES (152,0,0,224,"Alina","2",0);
Now log in a character - when you go from the character screen to zone in, they should all (quest_globals inserts) disapear. If they don't, #zone to nadox, make sure my quests are installed (most use quest_globals). They should "poof" and this is where the problem starts. Not to mention quests that use quest_globals do not work. You'll know when you got it right, as the quest_globals inserts will stay.
When they "poof", at that point, you can kill the client and go back to the drawing-board

Last edited by Angelox; 12-18-2006 at 07:51 PM..
Reply With Quote
  #3  
Old 12-18-2006, 09:04 PM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default

There are at least two more changes:

http://eqemulator.cvs.sourceforge.ne...15&r2=1.9.2.16 (already found)
http://eqemulator.cvs.sourceforge.ne...4&r2=1.13.2.15

I just browsed the CVS for changes around that time. Someone should do an cvs diff what was changed on Dec 3. I dont have time right now.

Maybe it is just the changed expire checking part in embparser.cpp.

Last edited by eq4me; 12-19-2006 at 05:12 AM..
Reply With Quote
  #4  
Old 12-18-2006, 10:39 PM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default

Thinking about it the changes in this part do not make sense to me:

Code:
uint32 now = Timer::GetTimeSeconds();
...
...
uint32 expdate = atoul(row[2]);
   if(expdate > now)
      run_delete = true;

   ExportVar(packagename.c_str(), row[0], row[1]);
was changed to

Code:
uint32 expired = atoul(row[2]);
   if(expired != 0) {
       run_delete = true;
   } else {
       ExportVar(packagename.c_str(), row[0], row[1]);
First the variable expired was checked if it is greater than the current time. Now it is checked if it is equal to zero or not? I might be dead wrong but I bet 'expired' will never be zero if nothing in the "atoul(row[2])" part was changed.

Last edited by eq4me; 12-19-2006 at 07:05 AM..
Reply With Quote
  #5  
Old 12-19-2006, 12:01 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

When it comes to c++, i'm still at the "what if" stage; you know, "what if i took this line here, and put it there ...", "ooops! doesnt work now" . Ok then, "What if ...", or "what if ...".
This can go on for days, and is an indicates i don't know a rat's-ass of what I'm doing .
Probably, it's sort of a "romantic" era of programing, when something actually works , it feels like a child finding the prized easter-egg in a Easter-hunt.
Eventually, all the pieces of C might begin to fall in place, then I'll move into the "What does this mean?" stage, which can be very annoying to some people.
Anyways, I hope you all figure it out. I must have made 50+ pl's that use quest_globals.
Reply With Quote
  #6  
Old 12-19-2006, 01:00 AM
totalcynic
Fire Beetle
 
Join Date: Dec 2006
Posts: 7
Default

This maybe off base, but I think the reason that the items are getting deleted is because the expdate field should be set to the current time, in UNIX_TIMESTAMP format, + the number of seconds you want to retain it. Setting it to 0, as in the examples, will result in the code deleting the rows because of the condition.

Are you trying to create infinite timeouts ? If so then this would be a simple fix to the SQL, just with an expansion on the condition so that it read;

where (expdate < UNIX_TIMESTAMP() and expdate != 0)

This would allow for expdate=0 to be inifinite, assuming its just the timeout that is at fault.
Reply With Quote
  #7  
Old 12-19-2006, 01:51 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I made these changes in questmgr.cpp and compiled/tested

Code:
"DELETE FROM quest_globals WHERE expdate < UNIX_TIMESTAMP() and expdate != 0) || (name='%s' && npcid=%i && charid=%i && zoneid=%i))"
there was two entries like that so I changed it also,

Code:
"DELETE FROM quest_globals WHERE expdate < UNIX_TIMESTAMP() and expdate != 0) || (name='%s' && npcid=%i && charid=%i && zoneid=%i))"
The problem still is there, quest_globals poofed.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:28 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