Thread: ABuff System
View Single Post
Old 07-20-2007, 03:19 PM   #18
rain9441
User
 
Join Date: Jan 2007
Posts: 195

rain9441 will become famous soon enough (61)rain9441 will become famous soon enough (61)rain9441 will become famous soon enough (61)

Default

In aBuff.refresh() function, where you use the RefreshDurationFactor(), consider the following set of events:

Unit A casts buff X on himself, calculated duration: 30 seconds.
15 seconds pass.
Unit A casts buff X on himself, calculated duration: 10 seconds.

By your logic, with RefreshDurationFactor of 0.0, the new duration will be 10 seconds. With RefreshDurationFactor 1.0, it will be 25 seconds.

It may not seem evident what I'm talking about but think of it in terms of short buffs (stuns). A 2 second stun is applied, and 1ms later a 0.25 second stun is applied. There should be some way of telling the aBuff system to keep the 2 second over the 0.25 second. I'm pretty sure the WC3 engine has this same fault (have 2 units with 2 seperate bash abilities, 1000 second stun on one and 0.01 second stun on another: one will unstun the unit).
rain9441 is offline   Reply With Quote