Jump to content

Recommended Posts

Posted

btw you should be able to use loc_x loc_y and loc_z as PK. I dont think that there are 2 npc spawned at the same loc

What's your remark is for ? Spawns at death is random, and there's random chaotic respawn points aswell. I don't find the link between "PK" and "NPC" in your sentences :P. You expressed 2 different ideas, or one of your sentence got a wrong word :D.

 

Regards.

Posted

What's your remark is for ? Spawns at death is random, and there's random chaotic respawn points aswell. I don't find the link between "PK" and "NPC" in your sentences :P. You expressed 2 different ideas, or one of your sentence got a wrong word :D.

 

Regards.

 

Google translator or wrong thread? :D

Posted

btw you should be able to use loc_x loc_y and loc_z as PK. I dont think that there are 2 npc spawned at the same loc

 

I think he meant you can use those values as the primary key. Though this can still be a problem if the user accidently spawns two mobs in the same place, you'll have two of the same identical spawns.

Posted

Roflol yellow title

 

I think he meant you can use those values as the primary key. Though this can still be a problem if the user accidently spawns two mobs in the same place, you'll have two of the same identical spawns.

No way :P. I got the link now (and you search it through darkness :P), but still that's not a good solution. The only good solution is to add an id column with a unique number for each register. But what's the point :P.

 


 

Rev 202 is up

 

Changeset 202

 

Auction, spawnlist, misc

 

The commit was long to come because my first idea was to implement siegable CHs. Unfortunately, only 4/6 are actually made on L2J, and BigBoss still work on it. So I prefer to wait and use my time in other things (pointless to do the same he is doing, plus he does it well).

 

Auction system

- The structure is corrected, and improved. HTMs are corrected following L2OFF (minus the size problem).

- Initial auctions list is off-like. You can directly see actual number of actual bids aswell (number in []).

- All bypasses which needed a security check (about clan and/or with warehouse check) are secured.

- The maximum of retail messages have been used (which avoids string uses).

- One unused table dissapears, and auction.sql got 3 columns dropped.

- The lease is correctly removed when you put an auction in sell. As retail, you receive back your lease only if the CH is sold.

 

Spawnlist

- Added 12~ spawns (Fortress of the Dead, mainly).

- Dropped all mobs initially spawned on Siegable Clan Halls (around 100+). They must be spawned via their own SQLs.

 

Misc

- Baium's Archangels aren't invul anymore. After all, they each got 50% Baium's HPs and a heal skill. Who would be stupid to kill 3,5 Baium.

- Autosoulshot behavior is OFF-like.

- CP/HP/MP are correctly filled at character creation (0/max/max).

- L2DoorInstance onAction behavior is OFF-like.

- mini tweak in L2AttackableAI, I hope it won't fock something.

- CharSelected serverpacket cleanup (2 infos added, and 8 empty/useless writeD are dropped).

- Addition of formatDate method to format the date as you want on a String (avoid String.valueOf and easier readability).

 

PS : I'm aware there are stills issues on auction (like the 7 days period where you can't put back an auction, missing comment use).Let's say from 80%, I moved to 90%.

 

Rev 203 overview

 

Beast Farm is under correction (near fully debugged). Added with some quests, it will be rev 203.

 

Topzone link

 

As crappy fans told before me, the CTS (Crappy Test Server) is up. The other new is a Topzone link exists. Makes the promotion of the pack and test directly ingame to see moves :).

 

Posted

ups sorry, PK = primary key, FK = foreign key

the pk will not allow dual spawn at the same loc, and will allow you to use FK on it, so you will be able to do for example:

TABLE spawnlists_done

locx FK to spawnlist.locx

locy FK ...

locz FK ...

timesspawned

 

anyway, you are right cos sql is not rly used to manage the db, only to "store things when server restart" all the things are done only in the jave side  :(

 

btw, did you see any FK in any l2 datapack?

 

ohh topzone link is not rdy yet?

ERROR ! This server is not in L2Topzone.com list or it hasn't been activated yet!

Posted

Zuuuummmm, I was on PK = player killer.

 

A FK doesn't improve performance, as no index is created. That's good for DB integrity, adding constraint, but if you're not totally dumb, you don't need it (such as XML validator L2J currently uses on postIL chronicles).

 

I'm not such a pro on SQL, so correct me if I'm wrong.

Posted

Zuuuummmm, I was on PK = player killer.

 

A FK doesn't improve performance, as no index is created. That's good for DB integrity, adding constraint, but if you're not totally dumb, you don't need it (such as XML validator L2J currently uses on postIL chronicles).

 

I'm not such a pro on SQL, so correct me if I'm wrong.

on some structures FK improve something. The question is not if you are or not dumb. It can save your ass many times, for example:

try to add a skil to a character that does not exist (if there is any error)

try to delete a character and forgot to delete the skills (this can happen more often)

etc

Posted

Dunno if you know or don't know it, but there's such "garbage clean" at each server restart. It deletes all useless stuff.

 

It's made on IdFactory, and run at server start (and you can eventually link it to an admincommand if you feel like an urge to use it...).

 

protected IdFactory()
{
    setAllCharacterOffline();
    cleanUpDB();
    cleanUpTimeStamps();
}

 

Point is, you normally can't have clones.

Posted

this is not what i am talking about, sql has more power than you think, it will do all that alone, if you set the FK and delete the character he will seek alone for the skills, so it will be clean allways, done inside sql algorithms and without full db checks.

what you are doing is for example:

i want to change

setAllCharacterOffline(); to setAllCharacterOfflineNow();

so i change the function name and after seek for where i used it file by file in every java/xml/sql file that i can find

instead of just change where i know that i need to change it

 

one of this day you will see a l2sql server XD

Posted

this is not what i am talking about, sql has more power than you think, it will do all that alone, if you set the FK and delete the character he will seek alone for the skills, so it will be clean allways, done inside sql algorithms and without full db checks.

what you are doing is for example:

i want to change

setAllCharacterOffline(); to setAllCharacterOfflineNow();

so i change the function name and after seek for where i used it file by file in every java/xml/sql file that i can find

instead of just change where i know that i need to change it

 

one of this day you will see a l2sql server XD

As I said a little higher, improving SQL crap it's like another project. On IL, there is enough work just speaking of undone features and core-side code lacks. If you begin to speak of HTMs (heritated from C3 ?) and SQL improvement... Well, you need more than one life for sure.

 

Added to that, it needs many experiments, and to be honest I got no clue how to "profiling" a database performance (nor simple java core, btw if you know send links etc I'm interested...) :D.

Posted

this is not what i am talking about, sql has more power than you think, it will do all that alone, if you set the FK and delete the character he will seek alone for the skills, so it will be clean allways, done inside sql algorithms and without full db checks.

what you are doing is for example:

i want to change

setAllCharacterOffline(); to setAllCharacterOfflineNow();

so i change the function name and after seek for where i used it file by file in every java/xml/sql file that i can find

instead of just change where i know that i need to change it

 

one of this day you will see a l2sql server XD

 

In most cases, the SQL is more than OK. The only time the database is under a lot of stress is when the server is loading, and that's hardly a cause for concern since nobody is playing. They're all nice features, except I don't think the databases will ever be big enough to actually kill the performance that much. The only reason I said something is because I want to be able to edit my DB via the thingy-ma-jigger-tool. Otherwise the selection and insertion is OK.

 

Considering in this pack, skills armors items are defined in XML files, not SQL so that much stress has already been removed. Considering I work every day with databases that contains 10's of millions of records that have 100+ columns and no foreign keys, I think it's ok.

Posted

u must be right db is not rly used, only items table and few more maybe and dpbBryan must know better than me if it can (and should) be improved in any way

 

If you want to take a look at a "simple" way to increase db stability there are some rules named Normal Form im sure that the first guys that used a db on a l2j server already used them, so it should be ok, but you can find them here

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...