Thread: coming soon
View Single Post
  #10  
Old 03-01-2004, 10:07 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

There is a misfit around the delglobal and time out global deletion (0.5.3dr+). I would be too affirmative but at first glance :

The database can be updated, but, well, the variable remains set in the package (read : npc quest variable scope) unless it is reset by a new value.

You can change target, zone out and back, ... does not matter.
The only way to get it removed is to have it set to another value. Otherwise, once it's set, it's set until zone reboots. Maybe forcing mob despawn/respawn would work, not sure so far.


I though of a few things to get rid of this, but there are issues :
- in delglobal, you know that you want to delete a value, so you can set it (or rather unset it) in all packages (read : npcs) where it might have been set. The 'might have been' part is not easy, so better unset it everywhere.

- in timeout, we must use 2 queries, one for fetching what is obsolete, the other to delete it (with a few additioanal requirements i won't discuss yet). Then clean up packages as previously detailled for delglobal.


I'm not too much at ease with embperl's code to suggest a software fix, so when using a global so far, don't rely on default value.
- a global must be set to "<none>", "__absent__" or whatever you want set it rather than delete the record.
- you can't count on timeout to unset a variable. Explicitly unset it to a new value after triggering a timer.
- alternativly, you can explicitly unset it at the end of your event handler. But there might be issues on this too.


It'd be nice if someone can post an opinion or a fix .

P.S. the overall targlobal / setglobal behavior is fully satisfacting imho atm, so hope we wont have to alter it.
Reply With Quote