Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

Issue Confirmations

  • Yes (0)No (0)
Photo

Multiple Npc Timers On A Single Npc

Posted by Hercules Bot on 19 December 2007 - 01:15 PM

Originally posted by theultramage
http://www.eathena.w...ker&showbug=653

I just had a look at the npc-timer system, because I was trying to correct the script engine documentation (see bugreport #373). And I saw things that I didn't want to see...

We have an addtimer/deltimer mechanism that runs timers that are stored in a player data structure. Yet these do not attach the player to the script once it executes. How come?
Then we have initnpctimer & co., which either deal with a single npc timer (the original way), but since r5167 these can also be stored in the player data structure, totally changing the original behavior. Both can run with or without a player attached, and have very confusing semantics when multiple people are working with the same npc. This sounds like a case of scope creep.

Shouldn't this thing be done so that it has a clearly defined and documented behavior? Currently noone can be really sure if their script will actually work or not...

Originally posted by arp
From the original comments, it seems that addtimer/deltimer are hardly used; I did a quick check, and there are only a few occurrences that I imagine would not be too difficult to change; Then, as suggested by Skotlex, these timers could be removed. They're redundant as it is now, and removing them would help bring project complexity down a bit.