Quote:
Originally Posted by Locklyon
This is so stupid, please add some checks if the skills exist already in _timedjob or no otherwise it'll keep inserting into _timedjob table.....
|
It does check for existingness. "SkillID NOT IN _TimedJobs's.SkillID"
However!!
This is not very efficient. In fact, this is blatantly stupid.
#1. You don't delete from _TimedJob, as mentioned by Locklyon. Meaning the table will just become huge as fuck due to 2nd,3rd,4th chars etc. Just delete upon logout. IF @EventID = 6 -> DEL JobID from PermaBuffSkillIDList.
#2. Please guys. Stop adding columns to tables, cause you apparently don't understand how the query engine even works.
You added a "Permanent" column.
Sub-mistake #1: IF you add a column for "true/false". Make it BOOL not tinyint.
#2: _CharSkill is a comparatively huge table in the SRODB, due to the fact that every Characters full skill list is added. Meaning you have a quite large dataset already. Why would you add ANOTHER column again which just makes the dataset larger when its quite large already.
The thing is. There are multiple ways to do this, many are at least efficient. Not clean, not good looking. BUT they work in an efficient manner. This release is for those 100player servers on VPS that srsly don't understand. But what you have done is. You apparently took a diff. permabuff query and REWORKED it into utter complete bullshit.
Thanks for that.
How to permabuff in an efficient manner:
Put all applicable buffs into new Table: PermabuffList.
Go into _RefSkill. Find out why Premium+ does NOT disappear on death (Check params guys)
Find the param for "time".
Add Time & "Stay on death" parameters to all skills from PermabuffList.
Now, go to the shieldbuff remove the parameter for "Requirement: Shield".
Additionally, go to ShieldBuff. Check column for req wep.... make it 255 for no wep needed.
Understood? Awesome. Lets do the same on Pacheon Hawks. Either Attk. Rate OR self-attacking hawk. Let people do their config if you don't wanna force em.
Now write a procedure. Join _CharSkill Where CharID = @CharID & SkillID = SkillID.
Thats very fast. Why? 'Cause CharID, SkillID have a so-called Primary Key Index.
Now since you've got all the applicable skills. Insert them into _timedJob.
When a character logs out, delete those.
Want it
perfect without two teleports?
Hook it to the filter and wait while query executes.
OR
Check USER login, grant buffs to all _User.CharIDs.
When Character finally logs in, delete buffs from other characters on same User.
Done.
Yes this is more work. But stop doing UNFINISHED systems/releases for the masses. Either let them die stupid or explain it to them. But 'release' your crap from your generous anal hole into the potty. Don't put it here as a re-crapped version.
With hate & love,
Akasch