Question about IdFactory

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
yksdtc
Posts: 76
Joined: Sat Jul 30, 2011 1:16 pm

Question about IdFactory

Post by yksdtc »

Why objectId dont start from 1?
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Question about IdFactory

Post by UnAfraid »

That's hell of a good question.
I've ask myself a couple of times when i saw this but still didn't found answer.
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Question about IdFactory

Post by jurchiks »

Maybe to not conflict with NPC/item IDs and such?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Question about IdFactory

Post by UnAfraid »

jurchiks wrote:Maybe to not conflict with NPC/item IDs and such?
It cannot conflict them since its a separate id in retail it starts from 1 and it resets everytime u restart L2Server
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Question about IdFactory

Post by jurchiks »

Ok, let's assume you have an NPC with some ID that matches an existing object ID. There is an error/warning logged somewhere with the object ID, but the log message does not say if it's the object or the NPC ID. You look at the ID and it clearly looks like an NPC ID, so you start looking into it, but can't find anything. Searching for the log message in the code reveals it was actually the object ID, not the NPC ID.

I believe it's just a simple case of avoiding mixups. But in any case, it is not a problem in any way.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Question about IdFactory

Post by UnAfraid »

Then those kinds of logs are wrong .. :)
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Question about IdFactory

Post by jurchiks »

Meh, it's a non-issue in any case.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply