oh sweet im excited to see what you guys came up with, i kinda gave up on the current timers also since the more i looked into it the more it seems to be a simple rapid recast prevention thing than an actual timer, one of you two please say yalls system allows reenabling the button server side. currently the client does timers on its own to reenable the buttons which id like to have adjustable by the server op if possible. also monalin from what ive seen the timers in the DB arent meant to change constantly their simply there to check if current time hasnt passed the time when the timer was supposed to expire however the current system also only checks during zone changes. and fathernitwit would you mind filling me in on how much of this is broken in 5.8? im rather curious and just want a simple answer like "little different" or "omg start over" although i dont see how much of it can be broken other than actually recognizing an AA activation request, anyway thats just something ive been wondering about and one of the reasons i asked about the jr dev thing. anyway thanks again for work with the timers! guess ill spend the night playing with the monk AE attack skill as that one sounds kinda challenging.
also either of you happen to have a link to a decent code optimization tutorial or anything as i think i know enough to start working on good habbits and i still get nervous about tampering with the constantly run processes. |
Ok finnaly heres the source code.
client_process.cpp line 5251 before // try to send all packets that weren't send before add Code:
database.UpdateTimersClientConnected(CharacterID()); add Code:
bool AATimerTest(int32 charid, int32 ability); after #ifdef ZONE add Code:
bool Database::AATimerTest(int32 charid, int32 ability){ where it has void Database::UpdateTimersClientConnected(int32 charid) change that function to Code:
void Database::UpdateTimersClientConnected(int32 charid){ after int targ; add Code:
if(database.AATimerTest(CastToClient()->character_id,activate) == 0){ after safe_delete(outapp); add Code:
} if(code != "works)"{ Message(1,"I probly forgot something."); } else if (code == "works"){ Message(1,"enjoy "); } and branks Quote:
**EDIT** dont emptry your aa_timers table it bugs you, also the errors you get in zone.exe mean nothign they're for me to debugg. **EDIT** UPDATE THIS PLEASE new AATimerTest function should be Code:
bool Database::AATimerTest(int32 charid, int32 ability){ |
worked out great! but... i was getting one of the errors from it although it was working fine so i decided maybe it didnt like the current numbers that were in the DB so i emptied my aa_timers table and then nothing worked, so it needs a function to handle if there is no table currntly there. working on this now and still trying to track down how to reenable the button when the timer expires.
edit: monalin just noticed the last part, the timers are easily changed they are set in client.cpp above and below the code you added, its the timermod which is in each case, their in seconds. and im self taught also and slowly getting better. also what i meant about the reuse thing was that id like to trackdown whatever it is thats sent to the client to let the client know the skill is avaliable, instead of the button appearing gray while its actually useable, this happens during zoneing currently but not without so its in here somewhere... |
Oh, explain please i'm confused that shouldnt be causing problems since i just created a new character and when i did that it added the values to db just as if it had been blank. It shouldnt be causing any problems. Maybe i forgot to add something in there, did u just empty it or did u delete it, and what errors are you getting.
Oh and the errors are just in there because, u can remove them really i had that in there when i was trying to find out what the hell was going on with the aa_timers table. Those Errors really mean nothing just lets me know what was commingo ut of hte function when i would call it. Quote:
|
uh it kept saying begin <= end in the zone window which i assumed it shouldnt have been so i emptied the aa_timers table and rebooted the server.
and since then it wont work im playing with it now though, it may have been some of my other code that caused this as i have a lot thats not posted im playing with. |
alright, if your interested... heres my persistent timers:
http://eqemu.psend.com/files/ptimers.diff apply on unix with patch -p0 <ptimers.diff from the source root. This is basically an implementation of the Timer class, but is persistent on a per-client basis. You just have to give each timer type a unique type number... I show an example of this with AA_number... assuming that it is 0 <= AA_number <= 120... if this is not true, if there is a bigger range of AA IDs, then we can adjust the range in the header... it isnt a big deal. heres some example code: Code:
Code:
Persistent timers, By Father Nitwit |
I guess this is where I should put this... Just a heads up ptimer.h and cpp weren't added to the zone's common files list in the anon CVS build that is up.
|
All times are GMT -4. The time now is 12:42 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.