Page 1 of 2

New spawn table

Posted: Wed Apr 21, 2010 12:52 pm
by samusiuks
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:

Re: New spawn table

Posted: Wed Apr 21, 2010 3:48 pm
by jurchiks
what's the point of this "new spawn system"?
also statement.setInt(1, 1); starts from 0, not 1

Re: New spawn table

Posted: Wed Apr 21, 2010 4:20 pm
by JIV
jurchiks wrote:also statement.setInt(1, 1); starts from 0, not 1
read PreparedStatement javadoc

Re: New spawn table

Posted: Wed Apr 21, 2010 4:29 pm
by jurchiks
oops, my mistake
sometimes i don't get java, some things start with 0, some with 1...
probly not the only language with this though

Re: New spawn table

Posted: Fri Apr 23, 2010 7:41 am
by samusiuks
any ideas what's wrong?

Re: New spawn table

Posted: Fri Apr 23, 2010 8:18 am
by janiii
you are missing

Code: Select all

spawn.init();

Re: New spawn table

Posted: Fri Apr 23, 2010 9:05 am
by samusiuks
It works ,thank you ^^.

Re: New spawn table

Posted: Fri Apr 23, 2010 12:12 pm
by samusiuks
The npcs spawns fine now ,but when a delete code is triggered in game npcs aren't deleted.
The first code and this one is in separate files.

Code: Select all

    public final List<L2Spawn> getNpcs()    {        return _npcs;    }

Code: Select all

public void unspawnNpcs()	{		for (L2Spawn spawn : getNpcs())		{			if (spawn == null)				continue; 			spawn.stopRespawn();			spawn.getLastSpawn().doDie(spawn.getLastSpawn());		} 		getNpcs().clear();	}

Re: New spawn table

Posted: Fri Apr 23, 2010 12:40 pm
by JIV
use delete()

Re: New spawn table

Posted: Fri Apr 23, 2010 1:03 pm
by samusiuks
delete doesn't work here ,it needs a cast ,but if you add one nothing is changed.

Re: New spawn table

Posted: Fri Apr 23, 2010 1:08 pm
by janiii

Code: Select all

spawn.stopRespawn();spawn.getLastSpawn().deleteMe();

Re: New spawn table

Posted: Fri Apr 23, 2010 1:46 pm
by samusiuks
.

Re: New spawn table

Posted: Fri Apr 23, 2010 1:52 pm
by janiii
where is the delete function?

hints for code: before loading the spawn table, you should clear the contents of the list so that you dont have double spawns.

Re: New spawn table

Posted: Fri Apr 23, 2010 2:14 pm
by samusiuks
So i need to delete those spawns from the Spawn Table load .I have no idea how to delete those ...I used the delete code from castle ,but i get errors with no explanation.

Re: New spawn table

Posted: Fri Apr 23, 2010 3:50 pm
by janiii
I cant give you support if you dont answer my questions!
What is your delete function - with what code do you delete the spawntable?