View Single Post
  #11  
Old 12-18-2006, 10:47 AM
totalcynic
Fire Beetle
 
Join Date: Dec 2006
Posts: 7
Default

I am trying to take a look at this code base as a learning exercise, and so I just did a diff between 933 and 934 and found two points that delete items from the quest_globals table, one in zone/embparser.cpp and another in zone/questmgr.cpp. In the patch these were modified so that the condition in the SQL contained;

where expdate < UNIX_TIMESTAMP()

Previously this was either;

where expdate < %lu

or

where expdate < %i

where %i and %lu were equal to the return from Timer::GetTimeSeconds()

Now I am assuming that Timer::GetTimeSeconds() returns the number of seconds since the epoch, or equal to time((time_t *) NULL). I haven't checked this, but assuming this is the case, then it looks like FBW fixed the above to work as expected, while previously the code was broken and was most likely leaving the table untouched.

So I started looking at the insertion of the data. One of these points is in the function setglobal, now this is where I am a little confused. I can see that ./zone/parser.cpp has code which calls this function;

quest_manager.setglobal(arglist[0], arglist[1], atoi(arglist[2]), arglist[3]);

However, I believe that the above could be wrong with the 3rd option, but this is an assumption and without replicating the exact problem I could be totally wrong. Could someone let me know how to replicate the issue, I have the ax_peq database and quests so if its just a matter of following some simple steps that would be great.

Oh, and BTW thanks everyone for getting the emu this far. I have been looking at these forums for years, and know how much work you have all done. This is why I want to try and help if possible while I have a little time on my hands.
Reply With Quote