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

12-18-2006, 11:00 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
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 -
|
 |
|
 |

12-18-2006, 11:12 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
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..
|
 |
|
 |

12-18-2006, 10:39 PM
|
Hill Giant
|
|
Join Date: Jul 2006
Posts: 166
|
|
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..
|

12-19-2006, 12:01 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
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.
|

12-19-2006, 01:00 AM
|
Fire Beetle
|
|
Join Date: Dec 2006
Posts: 7
|
|
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.
|

12-19-2006, 01:51 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
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.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
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 06:28 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |