Issue information

Issue ID
#653
Status
Confirmed
Severity
Low
Started
Hercules Elf Bot
Dec 19, 2007 13:15
Last Post
Hercules Elf Bot
Dec 31, 2011 3:32
Confirmation
N/A

Hercules Elf Bot - Dec 19, 2007 13:15

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&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...

Hercules Elf Bot - Dec 31, 2011 3:32

Originally posted by [b]arp[/b]
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.