Project update.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver;
|
||||
package com.l2jmobius;
|
||||
|
||||
/**
|
||||
* This class used to be the starter class, since LS/GS split, it only retains server mode
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.database.pool;
|
||||
package com.l2jmobius.commons.database.pool;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.database.pool;
|
||||
package com.l2jmobius.commons.database.pool;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,14 +14,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.database.pool.impl;
|
||||
package com.l2jmobius.commons.database.pool.impl;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import com.l2jserver.commons.database.pool.AbstractConnectionFactory;
|
||||
import com.l2jserver.commons.database.pool.IConnectionFactory;
|
||||
import com.l2jmobius.commons.database.pool.AbstractConnectionFactory;
|
||||
import com.l2jmobius.commons.database.pool.IConnectionFactory;
|
||||
|
||||
/**
|
||||
* BoneCP Connection Factory implementation.<br>
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.database.pool.impl;
|
||||
package com.l2jmobius.commons.database.pool.impl;
|
||||
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.sql.SQLException;
|
||||
@ -24,9 +22,9 @@ import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.AbstractConnectionFactory;
|
||||
import com.l2jserver.commons.database.pool.IConnectionFactory;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.AbstractConnectionFactory;
|
||||
import com.l2jmobius.commons.database.pool.IConnectionFactory;
|
||||
import com.mchange.v2.c3p0.ComboPooledDataSource;
|
||||
|
||||
/**
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.database.pool.impl;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.IConnectionFactory;
|
||||
|
||||
/**
|
||||
* Connection Factory implementation.
|
||||
* @author Zoey76
|
||||
*/
|
||||
public class ConnectionFactory
|
||||
{
|
||||
public static IConnectionFactory getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final IConnectionFactory INSTANCE;
|
||||
static
|
||||
{
|
||||
switch (Config.DATABASE_CONNECTION_POOL)
|
||||
{
|
||||
default:
|
||||
case "C3P0":
|
||||
{
|
||||
INSTANCE = new C3P0ConnectionFactory();
|
||||
break;
|
||||
}
|
||||
case "HikariCP":
|
||||
{
|
||||
INSTANCE = new HikariCPConnectionFactory();
|
||||
break;
|
||||
}
|
||||
case "BoneCP":
|
||||
{
|
||||
INSTANCE = new BoneCPConnectionFactory();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,14 +14,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.database.pool.impl;
|
||||
package com.l2jmobius.commons.database.pool.impl;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import com.l2jserver.commons.database.pool.AbstractConnectionFactory;
|
||||
import com.l2jserver.commons.database.pool.IConnectionFactory;
|
||||
import com.l2jmobius.commons.database.pool.AbstractConnectionFactory;
|
||||
import com.l2jmobius.commons.database.pool.IConnectionFactory;
|
||||
|
||||
/**
|
||||
* HikariCP Connection Factory implementation.<br>
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver;
|
||||
package com.l2jmobius.commons.geodriver;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver;
|
||||
package com.l2jmobius.commons.geodriver;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
@ -25,8 +23,8 @@ import java.nio.channels.FileChannel.MapMode;
|
||||
import java.nio.file.Path;
|
||||
import java.util.concurrent.atomic.AtomicReferenceArray;
|
||||
|
||||
import com.l2jserver.commons.geodriver.regions.NullRegion;
|
||||
import com.l2jserver.commons.geodriver.regions.Region;
|
||||
import com.l2jmobius.commons.geodriver.regions.NullRegion;
|
||||
import com.l2jmobius.commons.geodriver.regions.Region;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver;
|
||||
package com.l2jmobius.commons.geodriver;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver;
|
||||
package com.l2jmobius.commons.geodriver;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,11 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver.blocks;
|
||||
package com.l2jmobius.commons.geodriver.blocks;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.l2jserver.commons.geodriver.IBlock;
|
||||
import com.l2jmobius.commons.geodriver.IBlock;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,11 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver.blocks;
|
||||
package com.l2jmobius.commons.geodriver.blocks;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.l2jserver.commons.geodriver.IBlock;
|
||||
import com.l2jmobius.commons.geodriver.IBlock;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,11 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver.blocks;
|
||||
package com.l2jmobius.commons.geodriver.blocks;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.l2jserver.commons.geodriver.IBlock;
|
||||
import com.l2jmobius.commons.geodriver.IBlock;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,9 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver.regions;
|
||||
package com.l2jmobius.commons.geodriver.regions;
|
||||
|
||||
import com.l2jserver.commons.geodriver.IRegion;
|
||||
import com.l2jmobius.commons.geodriver.IRegion;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.geodriver.regions;
|
||||
package com.l2jmobius.commons.geodriver.regions;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.l2jserver.commons.geodriver.IBlock;
|
||||
import com.l2jserver.commons.geodriver.IRegion;
|
||||
import com.l2jserver.commons.geodriver.blocks.ComplexBlock;
|
||||
import com.l2jserver.commons.geodriver.blocks.FlatBlock;
|
||||
import com.l2jserver.commons.geodriver.blocks.MultilayerBlock;
|
||||
import com.l2jmobius.commons.geodriver.IBlock;
|
||||
import com.l2jmobius.commons.geodriver.IRegion;
|
||||
import com.l2jmobius.commons.geodriver.blocks.ComplexBlock;
|
||||
import com.l2jmobius.commons.geodriver.blocks.FlatBlock;
|
||||
import com.l2jmobius.commons.geodriver.blocks.MultilayerBlock;
|
||||
|
||||
/**
|
||||
* @author HorridoJoho
|
||||
@ -41,16 +39,24 @@ public final class Region implements IRegion
|
||||
switch (blockType)
|
||||
{
|
||||
case IBlock.TYPE_FLAT:
|
||||
{
|
||||
_blocks[blockOffset] = new FlatBlock(bb);
|
||||
break;
|
||||
}
|
||||
case IBlock.TYPE_COMPLEX:
|
||||
{
|
||||
_blocks[blockOffset] = new ComplexBlock(bb);
|
||||
break;
|
||||
}
|
||||
case IBlock.TYPE_MULTILAYER:
|
||||
{
|
||||
_blocks[blockOffset] = new MultilayerBlock(bb);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw new RuntimeException("Invalid block type " + blockType + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met: Redistributions of source code
|
||||
* must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of
|
||||
* conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution. Neither the name of the Sun Microsystems nor the names of
|
||||
* is contributors may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.l2jmobius.commons.javaengine;
|
||||
|
||||
public class CompilationException extends Exception
|
||||
{
|
||||
public CompilationException(String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.l2jserver.commons.javaengine;
|
||||
package com.l2jmobius.commons.javaengine;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Writer;
|
@ -21,7 +21,7 @@
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.l2jserver.commons.javaengine;
|
||||
package com.l2jmobius.commons.javaengine;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
@ -21,7 +21,7 @@
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.l2jserver.commons.javaengine;
|
||||
package com.l2jmobius.commons.javaengine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -111,14 +111,20 @@ public class JavaScriptEngineFactory implements ScriptEngineFactory
|
||||
switch (ch)
|
||||
{
|
||||
case 34: // '"'
|
||||
{
|
||||
buf.append("\\\"");
|
||||
break;
|
||||
}
|
||||
case 92: // '\\'
|
||||
{
|
||||
buf.append("\\\\");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
buf.append(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
buf.append("\");");
|
||||
@ -203,7 +209,6 @@ public class JavaScriptEngineFactory implements ScriptEngineFactory
|
||||
private static List<String> names;
|
||||
private static List<String> extensions;
|
||||
private static List<String> mimeTypes;
|
||||
|
||||
static
|
||||
{
|
||||
names = new ArrayList<>(1);
|
@ -21,7 +21,7 @@
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.l2jserver.commons.javaengine;
|
||||
package com.l2jmobius.commons.javaengine;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
@ -21,7 +21,7 @@
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package com.l2jserver.commons.javaengine;
|
||||
package com.l2jmobius.commons.javaengine;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
35
trunk/java/com/l2jmobius/commons/mmocore/AbstractPacket.java
Normal file
35
trunk/java/com/l2jmobius/commons/mmocore/AbstractPacket.java
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class AbstractPacket<T extends MMOClient<?>>
|
||||
{
|
||||
protected ByteBuffer _buf;
|
||||
|
||||
T _client;
|
||||
|
||||
public final T getClient()
|
||||
{
|
||||
return _client;
|
||||
}
|
||||
}
|
27
trunk/java/com/l2jmobius/commons/mmocore/IAcceptFilter.java
Normal file
27
trunk/java/com/l2jmobius/commons/mmocore/IAcceptFilter.java
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.nio.channels.SocketChannel;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
*/
|
||||
public interface IAcceptFilter
|
||||
{
|
||||
public boolean accept(SocketChannel sc);
|
||||
}
|
26
trunk/java/com/l2jmobius/commons/mmocore/IClientFactory.java
Normal file
26
trunk/java/com/l2jmobius/commons/mmocore/IClientFactory.java
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public interface IClientFactory<T extends MMOClient<?>>
|
||||
{
|
||||
public T create(final MMOConnection<T> con);
|
||||
}
|
26
trunk/java/com/l2jmobius/commons/mmocore/IMMOExecutor.java
Normal file
26
trunk/java/com/l2jmobius/commons/mmocore/IMMOExecutor.java
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public interface IMMOExecutor<T extends MMOClient<?>>
|
||||
{
|
||||
public void execute(ReceivablePacket<T> packet);
|
||||
}
|
28
trunk/java/com/l2jmobius/commons/mmocore/IPacketHandler.java
Normal file
28
trunk/java/com/l2jmobius/commons/mmocore/IPacketHandler.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public interface IPacketHandler<T extends MMOClient<?>>
|
||||
{
|
||||
public ReceivablePacket<T> handlePacket(ByteBuffer buf, T client);
|
||||
}
|
46
trunk/java/com/l2jmobius/commons/mmocore/MMOClient.java
Normal file
46
trunk/java/com/l2jmobius/commons/mmocore/MMOClient.java
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class MMOClient<T extends MMOConnection<?>>
|
||||
{
|
||||
private final T _con;
|
||||
|
||||
public MMOClient(final T con)
|
||||
{
|
||||
_con = con;
|
||||
}
|
||||
|
||||
public T getConnection()
|
||||
{
|
||||
return _con;
|
||||
}
|
||||
|
||||
public abstract boolean decrypt(final ByteBuffer buf, final int size);
|
||||
|
||||
public abstract boolean encrypt(final ByteBuffer buf, final int size);
|
||||
|
||||
protected abstract void onDisconnection();
|
||||
|
||||
protected abstract void onForcedDisconnection();
|
||||
}
|
@ -1,21 +1,20 @@
|
||||
/* This program is free software; you can redistribute it and/or modify
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.mmocore;
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
@ -223,7 +222,6 @@ public class MMOConnection<T extends MMOClient<?>>
|
||||
@SuppressWarnings("unchecked")
|
||||
public final void close(final SendablePacket<T> sp)
|
||||
{
|
||||
|
||||
close(new SendablePacket[]
|
||||
{
|
||||
sp
|
101
trunk/java/com/l2jmobius/commons/mmocore/NioNetStackList.java
Normal file
101
trunk/java/com/l2jmobius/commons/mmocore/NioNetStackList.java
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
/**
|
||||
* @author Forsaiken
|
||||
* @param <E>
|
||||
*/
|
||||
public final class NioNetStackList<E>
|
||||
{
|
||||
private final NioNetStackNode _start = new NioNetStackNode();
|
||||
|
||||
private final NioNetStackNodeBuf _buf = new NioNetStackNodeBuf();
|
||||
|
||||
private NioNetStackNode _end = new NioNetStackNode();
|
||||
|
||||
public NioNetStackList()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
public final void addLast(final E elem)
|
||||
{
|
||||
final NioNetStackNode newEndNode = _buf.removeFirst();
|
||||
_end._value = elem;
|
||||
_end._next = newEndNode;
|
||||
_end = newEndNode;
|
||||
}
|
||||
|
||||
public final E removeFirst()
|
||||
{
|
||||
final NioNetStackNode old = _start._next;
|
||||
final E value = old._value;
|
||||
_start._next = old._next;
|
||||
_buf.addLast(old);
|
||||
return value;
|
||||
}
|
||||
|
||||
public final boolean isEmpty()
|
||||
{
|
||||
return _start._next == _end;
|
||||
}
|
||||
|
||||
public final void clear()
|
||||
{
|
||||
_start._next = _end;
|
||||
}
|
||||
|
||||
protected final class NioNetStackNode
|
||||
{
|
||||
protected NioNetStackNode _next;
|
||||
|
||||
protected E _value;
|
||||
}
|
||||
|
||||
private final class NioNetStackNodeBuf
|
||||
{
|
||||
private final NioNetStackNode _start = new NioNetStackNode();
|
||||
|
||||
private NioNetStackNode _end = new NioNetStackNode();
|
||||
|
||||
NioNetStackNodeBuf()
|
||||
{
|
||||
_start._next = _end;
|
||||
}
|
||||
|
||||
final void addLast(final NioNetStackNode node)
|
||||
{
|
||||
node._next = null;
|
||||
node._value = null;
|
||||
_end._next = node;
|
||||
_end = node;
|
||||
}
|
||||
|
||||
final NioNetStackNode removeFirst()
|
||||
{
|
||||
if (_start._next == _end)
|
||||
{
|
||||
return new NioNetStackNode();
|
||||
}
|
||||
|
||||
final NioNetStackNode old = _start._next;
|
||||
_start._next = old._next;
|
||||
return old;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.nio.BufferOverflowException;
|
||||
|
||||
/**
|
||||
* @author Forsaiken
|
||||
*/
|
||||
public final class NioNetStringBuffer
|
||||
{
|
||||
private final char[] _buf;
|
||||
|
||||
private final int _size;
|
||||
|
||||
private int _len;
|
||||
|
||||
public NioNetStringBuffer(final int size)
|
||||
{
|
||||
_buf = new char[size];
|
||||
_size = size;
|
||||
_len = 0;
|
||||
}
|
||||
|
||||
public final void clear()
|
||||
{
|
||||
_len = 0;
|
||||
}
|
||||
|
||||
public final void append(final char c)
|
||||
{
|
||||
if (_len < _size)
|
||||
{
|
||||
_buf[_len++] = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BufferOverflowException();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString()
|
||||
{
|
||||
return new String(_buf, 0, _len);
|
||||
}
|
||||
}
|
@ -1,21 +1,20 @@
|
||||
/* This program is free software; you can redistribute it and/or modify
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.mmocore;
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@ -23,13 +22,12 @@ import java.nio.ByteBuffer;
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class ReceivablePacket<T extends MMOClient<?>> extends AbstractPacket<T> implements Runnable
|
||||
public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPacket<T> implements Runnable
|
||||
{
|
||||
NioNetStringBuffer _sbuf;
|
||||
|
||||
protected ReceivablePacket()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected abstract boolean read();
|
@ -1,21 +1,20 @@
|
||||
/* This program is free software; you can redistribute it and/or modify
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.mmocore;
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
/**
|
||||
* @author KenM
|
@ -1,21 +1,20 @@
|
||||
/* This program is free software; you can redistribute it and/or modify
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.mmocore;
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
@ -35,7 +34,7 @@ import java.util.LinkedList;
|
||||
* @param <T>
|
||||
* @author KenM
|
||||
*/
|
||||
public final class SelectorThread<T extends MMOClient<?>> extends Thread
|
||||
public final class SelectorThread<T extends MMOClient<?>>extends Thread
|
||||
{
|
||||
// default BYTE_ORDER
|
||||
private static final ByteOrder BYTE_ORDER = ByteOrder.LITTLE_ENDIAN;
|
||||
@ -174,24 +173,34 @@ public final class SelectorThread<T extends MMOClient<?>> extends Thread
|
||||
switch (key.readyOps())
|
||||
{
|
||||
case SelectionKey.OP_CONNECT:
|
||||
{
|
||||
finishConnection(key, con);
|
||||
break;
|
||||
}
|
||||
case SelectionKey.OP_ACCEPT:
|
||||
{
|
||||
acceptConnection(key, con);
|
||||
break;
|
||||
}
|
||||
case SelectionKey.OP_READ:
|
||||
{
|
||||
readPacket(key, con);
|
||||
break;
|
||||
}
|
||||
case SelectionKey.OP_WRITE:
|
||||
{
|
||||
writePacket(key, con);
|
||||
break;
|
||||
}
|
||||
case SelectionKey.OP_READ | SelectionKey.OP_WRITE:
|
||||
{
|
||||
writePacket(key, con);
|
||||
if (key.isValid())
|
||||
{
|
||||
readPacket(key, con);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -339,12 +348,16 @@ public final class SelectorThread<T extends MMOClient<?>> extends Thread
|
||||
{
|
||||
case 0:
|
||||
case -1:
|
||||
{
|
||||
closeConnectionImpl(key, con);
|
||||
break;
|
||||
}
|
||||
case -2:
|
||||
{
|
||||
con.getClient().onForcedDisconnection();
|
||||
closeConnectionImpl(key, con);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -355,10 +368,12 @@ public final class SelectorThread<T extends MMOClient<?>> extends Thread
|
||||
switch (buf.remaining())
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
// buffer is full nothing to read
|
||||
return false;
|
||||
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
// we don`t have enough data for header so we need to read
|
||||
key.interestOps(key.interestOps() | SelectionKey.OP_READ);
|
||||
|
||||
@ -374,8 +389,9 @@ public final class SelectorThread<T extends MMOClient<?>> extends Thread
|
||||
buf.compact();
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
default:
|
||||
{
|
||||
// data size excluding header size :>
|
||||
final int dataPending = (buf.getShort() & 0xFFFF) - HEADER_SIZE;
|
||||
|
||||
@ -425,6 +441,7 @@ public final class SelectorThread<T extends MMOClient<?>> extends Thread
|
||||
buf.compact();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +1,26 @@
|
||||
/* This program is free software; you can redistribute it and/or modify
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.commons.mmocore;
|
||||
package com.l2jmobius.commons.mmocore;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class SendablePacket<T extends MMOClient<?>> extends AbstractPacket<T>
|
||||
public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPacket<T>
|
||||
{
|
||||
protected final void putInt(final int value)
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.entity.Fort;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.entity.Fort;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
|
||||
/**
|
||||
* Class managing periodical events with castle
|
||||
@ -60,6 +58,7 @@ public class FortUpdater implements Runnable
|
||||
switch (_updaterType)
|
||||
{
|
||||
case PERIODIC_UPDATE:
|
||||
{
|
||||
_runCount++;
|
||||
if ((_fort.getOwnerClan() == null) || (_fort.getOwnerClan() != _clan))
|
||||
{
|
||||
@ -83,7 +82,9 @@ public class FortUpdater implements Runnable
|
||||
}
|
||||
_fort.saveFortVariables();
|
||||
break;
|
||||
}
|
||||
case MAX_OWN_TIME:
|
||||
{
|
||||
if ((_fort.getOwnerClan() == null) || (_fort.getOwnerClan() != _clan))
|
||||
{
|
||||
return;
|
||||
@ -94,6 +95,7 @@ public class FortUpdater implements Runnable
|
||||
_fort.setFortState(0, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
521
trunk/java/com/l2jmobius/gameserver/GameServer.java
Normal file
521
trunk/java/com/l2jmobius/gameserver/GameServer.java
Normal file
@ -0,0 +1,521 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.awt.Toolkit;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Calendar;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogManager;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.Server;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.mmocore.SelectorConfig;
|
||||
import com.l2jmobius.commons.mmocore.SelectorThread;
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.AnnouncementsTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharSummonTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CrestTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.NpcBufferTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.SummonSkillsTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.TeleportLocationTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.BuyListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DailyMissionData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemOptionsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantSkillGroupsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.FishData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.FishingMonstersData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.FishingRodsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.HennaData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.HitConditionBonusData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.InitialEquipmentData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.InitialShortcutData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemCrystalizationData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.KarmaData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.LuckyGameData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.OptionData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PetDataTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PlayerTemplateData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PlayerXpPercentLostData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PrimeShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.RecipeData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SecondaryAuthData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ShuttleData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SiegeScheduleData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillLearnData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.StaticObjectData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.TeleportersData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.UIData;
|
||||
import com.l2jmobius.gameserver.datatables.AugmentationData;
|
||||
import com.l2jmobius.gameserver.datatables.BotReportTable;
|
||||
import com.l2jmobius.gameserver.datatables.EventDroplist;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.datatables.MerchantPriceConfigTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.handler.EffectHandler;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.AirShipManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManorManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanEntryManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallAuctionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CommissionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CoupleManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FactionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.GraciaSeedsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemAuctionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.JumpManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MailManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MentorManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MercTicketManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PetitionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PremiumManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.AutoSpawnHandler;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.PartyMatchRoomList;
|
||||
import com.l2jmobius.gameserver.model.PartyMatchWaitingList;
|
||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
||||
import com.l2jmobius.gameserver.model.entity.TvTManager;
|
||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.L2GamePacketHandler;
|
||||
import com.l2jmobius.gameserver.pathfinding.PathFinding;
|
||||
import com.l2jmobius.gameserver.script.faenor.FaenorScriptEngine;
|
||||
import com.l2jmobius.gameserver.scripting.L2ScriptEngineManager;
|
||||
import com.l2jmobius.gameserver.taskmanager.KnownListUpdateTaskManager;
|
||||
import com.l2jmobius.gameserver.taskmanager.TaskManager;
|
||||
import com.l2jmobius.status.Status;
|
||||
import com.l2jmobius.util.DeadLockDetector;
|
||||
import com.l2jmobius.util.IPv4Filter;
|
||||
|
||||
public final class GameServer
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(GameServer.class.getName());
|
||||
|
||||
// Local Constants
|
||||
private static final String LOG_FOLDER = "log"; // Name of folder for log file
|
||||
private static final String LOG_NAME = "./log.cfg"; // Name of log file
|
||||
|
||||
private final SelectorThread<L2GameClient> _selectorThread;
|
||||
private final L2GamePacketHandler _gamePacketHandler;
|
||||
private final DeadLockDetector _deadDetectThread;
|
||||
public static GameServer gameServer;
|
||||
public static final Calendar dateTimeServerStarted = Calendar.getInstance();
|
||||
|
||||
public GameServer() throws Exception
|
||||
{
|
||||
final long serverLoadStart = System.currentTimeMillis();
|
||||
|
||||
if (!IdFactory.getInstance().isInitialized())
|
||||
{
|
||||
_log.severe(getClass().getSimpleName() + ": Could not read object IDs from database. Please check your configuration.");
|
||||
throw new Exception("Could not initialize the ID factory!");
|
||||
}
|
||||
|
||||
ThreadPoolManager.getInstance();
|
||||
EventDispatcher.getInstance();
|
||||
|
||||
new File("log/game").mkdirs();
|
||||
|
||||
// load script engines
|
||||
printSection("Engines");
|
||||
L2ScriptEngineManager.getInstance();
|
||||
|
||||
printSection("World");
|
||||
// start game time control early
|
||||
GameTimeController.init();
|
||||
InstanceManager.getInstance();
|
||||
L2World.getInstance();
|
||||
MapRegionManager.getInstance();
|
||||
AnnouncementsTable.getInstance();
|
||||
GlobalVariablesManager.getInstance();
|
||||
|
||||
printSection("Data");
|
||||
CategoryData.getInstance();
|
||||
SecondaryAuthData.getInstance();
|
||||
AbilityPointsData.getInstance();
|
||||
|
||||
printSection("Effects");
|
||||
EffectHandler.getInstance().executeScript();
|
||||
|
||||
printSection("Enchant Skill Groups");
|
||||
EnchantSkillGroupsData.getInstance();
|
||||
|
||||
printSection("Skill Trees");
|
||||
SkillTreesData.getInstance();
|
||||
|
||||
printSection("Skills");
|
||||
SkillData.getInstance();
|
||||
SummonSkillsTable.getInstance();
|
||||
|
||||
printSection("Items");
|
||||
ItemTable.getInstance();
|
||||
EnchantItemGroupsData.getInstance();
|
||||
EnchantItemData.getInstance();
|
||||
EnchantItemOptionsData.getInstance();
|
||||
ItemCrystalizationData.getInstance();
|
||||
OptionData.getInstance();
|
||||
EnchantItemHPBonusData.getInstance();
|
||||
MerchantPriceConfigTable.getInstance().loadInstances();
|
||||
BuyListData.getInstance();
|
||||
MultisellData.getInstance();
|
||||
RecipeData.getInstance();
|
||||
ArmorSetsData.getInstance();
|
||||
HennaData.getInstance();
|
||||
FishData.getInstance();
|
||||
FishingMonstersData.getInstance();
|
||||
FishingRodsData.getInstance();
|
||||
CommissionManager.getInstance();
|
||||
PrimeShopData.getInstance();
|
||||
AppearanceItemData.getInstance();
|
||||
LuckyGameData.getInstance();
|
||||
|
||||
printSection("Characters");
|
||||
ClassListData.getInstance();
|
||||
InitialEquipmentData.getInstance();
|
||||
InitialShortcutData.getInstance();
|
||||
ExperienceData.getInstance();
|
||||
PlayerXpPercentLostData.getInstance();
|
||||
KarmaData.getInstance();
|
||||
HitConditionBonusData.getInstance();
|
||||
PlayerTemplateData.getInstance();
|
||||
CharNameTable.getInstance();
|
||||
BeautyShopData.getInstance();
|
||||
AdminData.getInstance();
|
||||
CharSummonTable.getInstance().init();
|
||||
PetDataTable.getInstance();
|
||||
MentorManager.getInstance();
|
||||
|
||||
if (Config.FACTION_SYSTEM_ENABLED)
|
||||
{
|
||||
FactionManager.getInstance();
|
||||
}
|
||||
if (Config.PREMIUM_SYSTEM_ENABLED)
|
||||
{
|
||||
_log.info("PremiumManager: Premium system is enabled.");
|
||||
PremiumManager.getInstance();
|
||||
}
|
||||
|
||||
printSection("Clans");
|
||||
ClanTable.getInstance();
|
||||
CHSiegeManager.getInstance();
|
||||
ClanHallManager.getInstance();
|
||||
ClanHallAuctionManager.getInstance();
|
||||
ClanEntryManager.getInstance();
|
||||
|
||||
printSection("Geodata");
|
||||
long geodataMemory = getUsedMemoryMB();
|
||||
GeoData.getInstance();
|
||||
if (Config.PATHFINDING > 0)
|
||||
{
|
||||
PathFinding.getInstance();
|
||||
}
|
||||
geodataMemory -= getUsedMemoryMB();
|
||||
if (geodataMemory < 0)
|
||||
{
|
||||
geodataMemory = 0;
|
||||
}
|
||||
|
||||
printSection("NPCs");
|
||||
SkillLearnData.getInstance();
|
||||
NpcData.getInstance();
|
||||
WalkingManager.getInstance();
|
||||
StaticObjectData.getInstance();
|
||||
ZoneManager.getInstance();
|
||||
DoorData.getInstance();
|
||||
CastleManager.getInstance().loadInstances();
|
||||
NpcBufferTable.getInstance();
|
||||
GrandBossManager.getInstance().initZones();
|
||||
EventDroplist.getInstance();
|
||||
|
||||
printSection("Auction Manager");
|
||||
ItemAuctionManager.getInstance();
|
||||
|
||||
printSection("Olympiad");
|
||||
Olympiad.getInstance();
|
||||
Hero.getInstance();
|
||||
|
||||
// Call to load caches
|
||||
printSection("Cache");
|
||||
HtmCache.getInstance();
|
||||
CrestTable.getInstance();
|
||||
TeleportLocationTable.getInstance();
|
||||
TeleportersData.getInstance();
|
||||
UIData.getInstance();
|
||||
PartyMatchWaitingList.getInstance();
|
||||
PartyMatchRoomList.getInstance();
|
||||
PetitionManager.getInstance();
|
||||
AugmentationData.getInstance();
|
||||
CursedWeaponsManager.getInstance();
|
||||
TransformData.getInstance();
|
||||
BotReportTable.getInstance();
|
||||
DailyMissionData.getInstance();
|
||||
|
||||
printSection("Scripts");
|
||||
QuestManager.getInstance();
|
||||
BoatManager.getInstance();
|
||||
AirShipManager.getInstance();
|
||||
ShuttleData.getInstance();
|
||||
JumpManager.getInstance();
|
||||
GraciaSeedsManager.getInstance();
|
||||
|
||||
try
|
||||
{
|
||||
_log.info(getClass().getSimpleName() + ": Loading server scripts:");
|
||||
if (!Config.ALT_DEV_NO_HANDLERS || !Config.ALT_DEV_NO_QUESTS)
|
||||
{
|
||||
L2ScriptEngineManager.getInstance().executeScriptList(new File(Config.DATAPACK_ROOT, "scripts.cfg"));
|
||||
}
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
_log.severe(getClass().getSimpleName() + ": Failed loading scripts.cfg, scripts are not going to be loaded!");
|
||||
}
|
||||
|
||||
SpawnTable.getInstance().load();
|
||||
DayNightSpawnManager.getInstance().trim().notifyChangeMode();
|
||||
RaidBossSpawnManager.getInstance();
|
||||
FourSepulchersManager.getInstance().init();
|
||||
|
||||
printSection("Siege");
|
||||
SiegeManager.getInstance().getSieges();
|
||||
CastleManager.getInstance().activateInstances();
|
||||
FortManager.getInstance().loadInstances();
|
||||
FortManager.getInstance().activateInstances();
|
||||
FortSiegeManager.getInstance();
|
||||
SiegeScheduleData.getInstance();
|
||||
|
||||
MerchantPriceConfigTable.getInstance().updateReferences();
|
||||
CastleManorManager.getInstance();
|
||||
MercTicketManager.getInstance();
|
||||
PcCafePointsManager.getInstance();
|
||||
QuestManager.getInstance().report();
|
||||
|
||||
if (Config.SAVE_DROPPED_ITEM)
|
||||
{
|
||||
ItemsOnGroundManager.getInstance();
|
||||
}
|
||||
|
||||
if ((Config.AUTODESTROY_ITEM_AFTER > 0) || (Config.HERB_AUTO_DESTROY_TIME > 0))
|
||||
{
|
||||
ItemsAutoDestroy.getInstance();
|
||||
}
|
||||
|
||||
MonsterRace.getInstance();
|
||||
AutoSpawnHandler.getInstance();
|
||||
|
||||
FaenorScriptEngine.getInstance();
|
||||
// Init of a cursed weapon manager
|
||||
|
||||
_log.info("AutoSpawnHandler: Loaded " + AutoSpawnHandler.getInstance().size() + " handlers in total.");
|
||||
|
||||
if (Config.L2JMOD_ALLOW_WEDDING)
|
||||
{
|
||||
CoupleManager.getInstance();
|
||||
}
|
||||
|
||||
if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
FishingChampionshipManager.getInstance();
|
||||
}
|
||||
|
||||
TaskManager.getInstance();
|
||||
|
||||
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.GAME_ID);
|
||||
|
||||
if (Config.ALLOW_MAIL)
|
||||
{
|
||||
MailManager.getInstance();
|
||||
}
|
||||
|
||||
PunishmentManager.getInstance();
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
|
||||
|
||||
_log.info("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size());
|
||||
|
||||
TvTManager.getInstance();
|
||||
KnownListUpdateTaskManager.getInstance();
|
||||
|
||||
if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
|
||||
{
|
||||
OfflineTradersTable.getInstance().restoreOfflineTraders();
|
||||
}
|
||||
|
||||
if (Config.DEADLOCK_DETECTOR)
|
||||
{
|
||||
_deadDetectThread = new DeadLockDetector();
|
||||
_deadDetectThread.setDaemon(true);
|
||||
_deadDetectThread.start();
|
||||
}
|
||||
else
|
||||
{
|
||||
_deadDetectThread = null;
|
||||
}
|
||||
System.gc();
|
||||
final long totalMem = Runtime.getRuntime().maxMemory() / 1048576;
|
||||
_log.info(getClass().getSimpleName() + ": Started, using " + getUsedMemoryMB() + " of " + totalMem + " MB total memory.");
|
||||
_log.info(getClass().getSimpleName() + ": Geodata use " + geodataMemory + " MB of memory.");
|
||||
_log.info(getClass().getSimpleName() + ": Maximum number of connected players is " + Config.MAXIMUM_ONLINE_USERS + ".");
|
||||
_log.info(getClass().getSimpleName() + ": Server loaded in " + ((System.currentTimeMillis() - serverLoadStart) / 1000) + " seconds.");
|
||||
|
||||
final SelectorConfig sc = new SelectorConfig();
|
||||
sc.MAX_READ_PER_PASS = Config.MMO_MAX_READ_PER_PASS;
|
||||
sc.MAX_SEND_PER_PASS = Config.MMO_MAX_SEND_PER_PASS;
|
||||
sc.SLEEP_TIME = Config.MMO_SELECTOR_SLEEP_TIME;
|
||||
sc.HELPER_BUFFER_COUNT = Config.MMO_HELPER_BUFFER_COUNT;
|
||||
sc.TCP_NODELAY = Config.MMO_TCP_NODELAY;
|
||||
|
||||
_gamePacketHandler = new L2GamePacketHandler();
|
||||
_selectorThread = new SelectorThread<>(sc, _gamePacketHandler, _gamePacketHandler, _gamePacketHandler, new IPv4Filter());
|
||||
|
||||
InetAddress bindAddress = null;
|
||||
if (!Config.GAMESERVER_HOSTNAME.equals("*"))
|
||||
{
|
||||
try
|
||||
{
|
||||
bindAddress = InetAddress.getByName(Config.GAMESERVER_HOSTNAME);
|
||||
}
|
||||
catch (UnknownHostException e1)
|
||||
{
|
||||
_log.log(Level.SEVERE, getClass().getSimpleName() + ": WARNING: The GameServer bind address is invalid, using all avaliable IPs! Reason: " + e1.getMessage(), e1);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_selectorThread.openServerSocket(bindAddress, Config.PORT_GAME);
|
||||
_selectorThread.start();
|
||||
_log.log(Level.INFO, getClass().getSimpleName() + ": is now listening on: " + Config.GAMESERVER_HOSTNAME + ":" + Config.PORT_GAME);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
_log.log(Level.SEVERE, getClass().getSimpleName() + ": FATAL: Failed to open server socket. Reason: " + e.getMessage(), e);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
LoginServerThread.getInstance().start();
|
||||
Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
Server.serverMode = Server.MODE_GAMESERVER;
|
||||
|
||||
/*** Main ***/
|
||||
// Create log folder
|
||||
final File logFolder = new File(".", LOG_FOLDER);
|
||||
logFolder.mkdir();
|
||||
|
||||
// Create input stream for log file -- or store file data into memory
|
||||
try (InputStream is = new FileInputStream(new File(LOG_NAME)))
|
||||
{
|
||||
LogManager.getLogManager().readConfiguration(is);
|
||||
}
|
||||
|
||||
// Initialize config
|
||||
Config.load();
|
||||
printSection("Database");
|
||||
ConnectionFactory.getInstance();
|
||||
gameServer = new GameServer();
|
||||
|
||||
if (Config.IS_TELNET_ENABLED)
|
||||
{
|
||||
new Status(Server.serverMode).start();
|
||||
}
|
||||
}
|
||||
|
||||
public long getUsedMemoryMB()
|
||||
{
|
||||
return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576;
|
||||
}
|
||||
|
||||
public SelectorThread<L2GameClient> getSelectorThread()
|
||||
{
|
||||
return _selectorThread;
|
||||
}
|
||||
|
||||
public L2GamePacketHandler getL2GamePacketHandler()
|
||||
{
|
||||
return _gamePacketHandler;
|
||||
}
|
||||
|
||||
public DeadLockDetector getDeadLockDetectorThread()
|
||||
{
|
||||
return _deadDetectThread;
|
||||
}
|
||||
|
||||
public static void printSection(String s)
|
||||
{
|
||||
s = "=[ " + s + " ]";
|
||||
while (s.length() < 61)
|
||||
{
|
||||
s = "-" + s;
|
||||
}
|
||||
_log.info(s);
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Set;
|
||||
@ -24,8 +22,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.DayNightSpawnManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
|
||||
/**
|
||||
* Game Time controller class.
|
||||
@ -170,7 +168,6 @@ public final class GameTimeController extends Thread
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,24 +14,24 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.geodriver.Cell;
|
||||
import com.l2jserver.commons.geodriver.GeoDriver;
|
||||
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.interfaces.ILocational;
|
||||
import com.l2jserver.gameserver.util.GeoUtils;
|
||||
import com.l2jserver.gameserver.util.LinePointIterator;
|
||||
import com.l2jserver.gameserver.util.LinePointIterator3D;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.geodriver.Cell;
|
||||
import com.l2jmobius.commons.geodriver.GeoDriver;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import com.l2jmobius.gameserver.util.GeoUtils;
|
||||
import com.l2jmobius.gameserver.util.LinePointIterator;
|
||||
import com.l2jmobius.gameserver.util.LinePointIterator3D;
|
||||
|
||||
/**
|
||||
* Geodata.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
/**
|
||||
* Interface for managers of list of instances.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.ItemLocation;
|
||||
import com.l2jserver.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
public final class ItemsAutoDestroy
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
@ -44,46 +42,46 @@ import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
import com.l2jserver.gameserver.network.L2GameClient.GameClientState;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.AuthRequest;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.BlowFishKey;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.ChangeAccessLevel;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.ChangePassword;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.PlayerAuthRequest;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.PlayerInGame;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.PlayerLogout;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.PlayerTracert;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.ReplyCharacters;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.SendMail;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.ServerStatus;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.TempBan;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.AuthResponse;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.ChangePasswordResponse;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.InitLS;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.KickPlayer;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.LoginServerFail;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.PlayerAuthResponse;
|
||||
import com.l2jserver.gameserver.network.loginserverpackets.RequestCharacters;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.LoginFail;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jserver.util.Util;
|
||||
import com.l2jserver.util.crypt.NewCrypt;
|
||||
import com.l2jserver.util.network.BaseSendablePacket;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient.GameClientState;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.AuthRequest;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.BlowFishKey;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.ChangeAccessLevel;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.ChangePassword;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.PlayerAuthRequest;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.PlayerInGame;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.PlayerLogout;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.PlayerTracert;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.ReplyCharacters;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.SendMail;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.ServerStatus;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.TempBan;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.AuthResponse;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.ChangePasswordResponse;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.InitLS;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.KickPlayer;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.LoginServerFail;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.PlayerAuthResponse;
|
||||
import com.l2jmobius.gameserver.network.loginserverpackets.RequestCharacters;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.CharSelectionInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.LoginFail;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
import com.l2jmobius.util.Util;
|
||||
import com.l2jmobius.util.crypt.NewCrypt;
|
||||
import com.l2jmobius.util.network.BaseSendablePacket;
|
||||
|
||||
public class LoginServerThread extends Thread
|
||||
{
|
||||
protected static final Logger _log = Logger.getLogger(LoginServerThread.class.getName());
|
||||
protected static final Logger _logAccounting = Logger.getLogger("accounting");
|
||||
|
||||
/** @see com.l2jserver.loginserver.L2LoginServer#PROTOCOL_REV */
|
||||
/** @see com.l2jmobius.loginserver.L2LoginServer#PROTOCOL_REV */
|
||||
private static final int REVISION = 0x0106;
|
||||
private final String _hostname;
|
||||
private final int _port;
|
||||
@ -209,6 +207,7 @@ public class LoginServerThread extends Thread
|
||||
switch (packetType)
|
||||
{
|
||||
case 0x00:
|
||||
{
|
||||
final InitLS init = new InitLS(incoming);
|
||||
if (init.getRevision() != REVISION)
|
||||
{
|
||||
@ -237,12 +236,16 @@ public class LoginServerThread extends Thread
|
||||
_blowfish = new NewCrypt(blowfishKey);
|
||||
sendPacket(new AuthRequest(_requestID, _acceptAlternate, _hexID, _gamePort, _reserveHost, _maxPlayer, _subnets, _hosts));
|
||||
break;
|
||||
}
|
||||
case 0x01:
|
||||
{
|
||||
final LoginServerFail lsf = new LoginServerFail(incoming);
|
||||
_log.info("Damn! Registeration Failed: " + lsf.getReasonString());
|
||||
// login will close the connection here
|
||||
break;
|
||||
}
|
||||
case 0x02:
|
||||
{
|
||||
final AuthResponse aresp = new AuthResponse(incoming);
|
||||
final int serverID = aresp.getServerId();
|
||||
_serverName = aresp.getServerName();
|
||||
@ -289,7 +292,9 @@ public class LoginServerThread extends Thread
|
||||
sendPacket(new PlayerInGame(playerList));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x03:
|
||||
{
|
||||
final PlayerAuthResponse par = new PlayerAuthResponse(incoming);
|
||||
final String account = par.getAccount();
|
||||
WaitingClient wcToRemove = null;
|
||||
@ -325,17 +330,24 @@ public class LoginServerThread extends Thread
|
||||
_waitingClients.remove(wcToRemove);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x04:
|
||||
{
|
||||
final KickPlayer kp = new KickPlayer(incoming);
|
||||
doKickPlayer(kp.getAccount());
|
||||
break;
|
||||
}
|
||||
case 0x05:
|
||||
{
|
||||
final RequestCharacters rc = new RequestCharacters(incoming);
|
||||
getCharsOnServer(rc.getAccount());
|
||||
break;
|
||||
}
|
||||
case 0x06:
|
||||
{
|
||||
new ChangePasswordResponse(incoming);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -566,7 +578,6 @@ public class LoginServerThread extends Thread
|
||||
*/
|
||||
private void getCharsOnServer(String account)
|
||||
{
|
||||
|
||||
int chars = 0;
|
||||
final List<Long> charToDel = new ArrayList<>();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
@ -721,31 +732,45 @@ public class LoginServerThread extends Thread
|
||||
switch (status)
|
||||
{
|
||||
case ServerStatus.STATUS_AUTO:
|
||||
{
|
||||
sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_AUTO);
|
||||
_status = status;
|
||||
break;
|
||||
}
|
||||
case ServerStatus.STATUS_DOWN:
|
||||
{
|
||||
sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_DOWN);
|
||||
_status = status;
|
||||
break;
|
||||
}
|
||||
case ServerStatus.STATUS_FULL:
|
||||
{
|
||||
sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_FULL);
|
||||
_status = status;
|
||||
break;
|
||||
}
|
||||
case ServerStatus.STATUS_GM_ONLY:
|
||||
{
|
||||
sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_GM_ONLY);
|
||||
_status = status;
|
||||
break;
|
||||
}
|
||||
case ServerStatus.STATUS_GOOD:
|
||||
{
|
||||
sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_GOOD);
|
||||
_status = status;
|
||||
break;
|
||||
}
|
||||
case ServerStatus.STATUS_NORMAL:
|
||||
{
|
||||
sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_NORMAL);
|
||||
_status = status;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw new IllegalArgumentException("Status does not exists:" + status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
public class MonsterRace
|
||||
{
|
||||
@ -71,7 +69,7 @@ public class MonsterRace
|
||||
try
|
||||
{
|
||||
final L2NpcTemplate template = NpcData.getInstance().getTemplate(id + random);
|
||||
final Constructor<?> constructor = Class.forName("com.l2jserver.gameserver.model.actor.instance." + template.getType() + "Instance").getConstructors()[0];
|
||||
final Constructor<?> constructor = Class.forName("com.l2jmobius.gameserver.model.actor.instance." + template.getType() + "Instance").getConstructors()[0];
|
||||
_monsters[i] = (L2Npc) constructor.newInstance(template);
|
||||
}
|
||||
catch (Exception e)
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -25,35 +23,35 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.data.xml.impl.RecipeData;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.enums.StatType;
|
||||
import com.l2jserver.gameserver.model.L2ManufactureItem;
|
||||
import com.l2jserver.gameserver.model.L2RecipeInstance;
|
||||
import com.l2jserver.gameserver.model.L2RecipeList;
|
||||
import com.l2jserver.gameserver.model.L2RecipeStatInstance;
|
||||
import com.l2jserver.gameserver.model.TempItem;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.CommonSkill;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.stats.Stats;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ItemList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jserver.gameserver.network.serverpackets.RecipeBookItemList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.RecipeItemMakeInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.RecipeShopItemInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SetupGauge;
|
||||
import com.l2jserver.gameserver.network.serverpackets.StatusUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.RecipeData;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.StatType;
|
||||
import com.l2jmobius.gameserver.model.L2ManufactureItem;
|
||||
import com.l2jmobius.gameserver.model.L2RecipeInstance;
|
||||
import com.l2jmobius.gameserver.model.L2RecipeList;
|
||||
import com.l2jmobius.gameserver.model.L2RecipeStatInstance;
|
||||
import com.l2jmobius.gameserver.model.TempItem;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.RecipeBookItemList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.RecipeItemMakeInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.RecipeShopItemInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
public class RecipeController
|
||||
{
|
||||
@ -338,7 +336,6 @@ public class RecipeController
|
||||
|
||||
if (Config.ALT_GAME_CREATION && !_items.isEmpty())
|
||||
{
|
||||
|
||||
if (!calculateStatUse(true, true))
|
||||
{
|
||||
return; // check stat use
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,36 +14,36 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jserver.gameserver.datatables.BotReportTable;
|
||||
import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CastleManorManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jserver.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ItemAuctionManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jserver.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jserver.gameserver.instancemanager.RaidBossSpawnManager;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.Hero;
|
||||
import com.l2jserver.gameserver.model.olympiad.Olympiad;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.gameserverpackets.ServerStatus;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ServerClose;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.util.Broadcast;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jmobius.gameserver.datatables.BotReportTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManorManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemAuctionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.gameserverpackets.ServerStatus;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ServerClose;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
* This class provides the functions for shutting down and restarting the server.<br>
|
||||
@ -115,9 +113,13 @@ public class Shutdown extends Thread
|
||||
case 3:
|
||||
case 2:
|
||||
case 1:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
SendServerQuit(seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,7 +268,6 @@ public class Shutdown extends Thread
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// server will quit, when this function ends.
|
||||
@ -290,16 +291,22 @@ public class Shutdown extends Thread
|
||||
switch (_shutdownMode)
|
||||
{
|
||||
case GM_SHUTDOWN:
|
||||
{
|
||||
getInstance().setMode(GM_SHUTDOWN);
|
||||
System.exit(0);
|
||||
break;
|
||||
}
|
||||
case GM_RESTART:
|
||||
{
|
||||
getInstance().setMode(GM_RESTART);
|
||||
System.exit(2);
|
||||
break;
|
||||
}
|
||||
case ABORT:
|
||||
{
|
||||
LoginServerThread.getInstance().setServerStatus(ServerStatus.STATUS_AUTO);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -343,9 +350,13 @@ public class Shutdown extends Thread
|
||||
case 3:
|
||||
case 2:
|
||||
case 1:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
SendServerQuit(seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -395,63 +406,93 @@ public class Shutdown extends Thread
|
||||
*/
|
||||
private void countdown()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
while (_secondsShut > 0)
|
||||
{
|
||||
|
||||
switch (_secondsShut)
|
||||
{
|
||||
case 540:
|
||||
{
|
||||
SendServerQuit(540);
|
||||
break;
|
||||
}
|
||||
case 480:
|
||||
{
|
||||
SendServerQuit(480);
|
||||
break;
|
||||
}
|
||||
case 420:
|
||||
{
|
||||
SendServerQuit(420);
|
||||
break;
|
||||
}
|
||||
case 360:
|
||||
{
|
||||
SendServerQuit(360);
|
||||
break;
|
||||
}
|
||||
case 300:
|
||||
{
|
||||
SendServerQuit(300);
|
||||
break;
|
||||
}
|
||||
case 240:
|
||||
{
|
||||
SendServerQuit(240);
|
||||
break;
|
||||
}
|
||||
case 180:
|
||||
{
|
||||
SendServerQuit(180);
|
||||
break;
|
||||
}
|
||||
case 120:
|
||||
{
|
||||
SendServerQuit(120);
|
||||
break;
|
||||
}
|
||||
case 60:
|
||||
{
|
||||
LoginServerThread.getInstance().setServerStatus(ServerStatus.STATUS_DOWN); // avoids new players from logging in
|
||||
SendServerQuit(60);
|
||||
break;
|
||||
}
|
||||
case 30:
|
||||
{
|
||||
SendServerQuit(30);
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
{
|
||||
SendServerQuit(10);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
SendServerQuit(5);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
SendServerQuit(4);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
SendServerQuit(3);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
SendServerQuit(2);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
SendServerQuit(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_secondsShut--;
|
||||
@ -479,15 +520,20 @@ public class Shutdown extends Thread
|
||||
switch (_shutdownMode)
|
||||
{
|
||||
case SIGTERM:
|
||||
{
|
||||
_log.info("SIGTERM received. Shutting down NOW!");
|
||||
break;
|
||||
}
|
||||
case GM_SHUTDOWN:
|
||||
{
|
||||
_log.info("GM shutdown received. Shutting down NOW!");
|
||||
break;
|
||||
}
|
||||
case GM_RESTART:
|
||||
{
|
||||
_log.info("GM restart received. Restarting NOW!");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
final TimeCounter tc = new TimeCounter();
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver;
|
||||
package com.l2jmobius.gameserver;
|
||||
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
@ -30,9 +28,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.util.StringUtil;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@ -63,7 +61,7 @@ import com.l2jserver.util.StringUtil;
|
||||
* <li>{@link #_generalPacketsThreadPool GeneralPackets} where most packets handler are executed.</li>
|
||||
* <li>{@link #_ioPacketsThreadPool I/O Packets} where all the i/o packets are executed.</li>
|
||||
* <li>There will be an AI ThreadPool where AI events should be executed</li>
|
||||
* <li>A general ThreadPool where everything else that needs to run asynchronously with no delay should be executed ({@link com.l2jserver.gameserver.model.actor.knownlist KnownList} updates, SQL updates/inserts...)?</li>
|
||||
* <li>A general ThreadPool where everything else that needs to run asynchronously with no delay should be executed ({@link com.l2jmobius.gameserver.model.actor.knownlist KnownList} updates, SQL updates/inserts...)?</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
* @author -Wooden-
|
||||
@ -662,7 +660,6 @@ public class ThreadPoolManager
|
||||
_generalThreadPool.shutdown();
|
||||
_eventThreadPool.shutdown();
|
||||
_log.info("All ThreadPools are now stopped");
|
||||
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,32 +14,32 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AutoAttackStart;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AutoAttackStop;
|
||||
import com.l2jserver.gameserver.network.serverpackets.Die;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MoveToLocation;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MoveToPawn;
|
||||
import com.l2jserver.gameserver.network.serverpackets.StopMove;
|
||||
import com.l2jserver.gameserver.network.serverpackets.StopRotation;
|
||||
import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AutoAttackStart;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AutoAttackStop;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.Die;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.MoveToPawn;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.StopRotation;
|
||||
import com.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
|
||||
/**
|
||||
* Mother class of all objects AI in the world.<br>
|
||||
@ -268,32 +266,50 @@ public abstract class AbstractAI implements Ctrl
|
||||
switch (intention)
|
||||
{
|
||||
case AI_INTENTION_IDLE:
|
||||
{
|
||||
onIntentionIdle();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_ACTIVE:
|
||||
{
|
||||
onIntentionActive();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_REST:
|
||||
{
|
||||
onIntentionRest();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_ATTACK:
|
||||
{
|
||||
onIntentionAttack((L2Character) arg0);
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_CAST:
|
||||
{
|
||||
onIntentionCast((Skill) arg0, (L2Object) arg1);
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_MOVE_TO:
|
||||
{
|
||||
onIntentionMoveTo((Location) arg0);
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_FOLLOW:
|
||||
{
|
||||
onIntentionFollow((L2Character) arg0);
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_PICK_UP:
|
||||
{
|
||||
onIntentionPickUp((L2Object) arg0);
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_INTERACT:
|
||||
{
|
||||
onIntentionInteract((L2Object) arg0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If do move or follow intention drop next action.
|
||||
@ -340,76 +356,116 @@ public abstract class AbstractAI implements Ctrl
|
||||
switch (evt)
|
||||
{
|
||||
case EVT_THINK:
|
||||
{
|
||||
onEvtThink();
|
||||
break;
|
||||
}
|
||||
case EVT_ATTACKED:
|
||||
{
|
||||
onEvtAttacked((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_AGGRESSION:
|
||||
{
|
||||
onEvtAggression((L2Character) args[0], ((Number) args[1]).intValue());
|
||||
break;
|
||||
}
|
||||
case EVT_STUNNED:
|
||||
{
|
||||
onEvtStunned((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_PARALYZED:
|
||||
{
|
||||
onEvtParalyzed((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_SLEEPING:
|
||||
{
|
||||
onEvtSleeping((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_ROOTED:
|
||||
{
|
||||
onEvtRooted((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_CONFUSED:
|
||||
{
|
||||
onEvtConfused((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_MUTED:
|
||||
{
|
||||
onEvtMuted((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_EVADED:
|
||||
{
|
||||
onEvtEvaded((L2Character) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_READY_TO_ACT:
|
||||
{
|
||||
if (!_actor.isCastingNow() && !_actor.isCastingSimultaneouslyNow())
|
||||
{
|
||||
onEvtReadyToAct();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVT_USER_CMD:
|
||||
{
|
||||
onEvtUserCmd(args[0], args[1]);
|
||||
break;
|
||||
}
|
||||
case EVT_ARRIVED:
|
||||
{
|
||||
// happens e.g. from stopmove but we don't process it if we're casting
|
||||
if (!_actor.isCastingNow() && !_actor.isCastingSimultaneouslyNow())
|
||||
{
|
||||
onEvtArrived();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVT_ARRIVED_REVALIDATE:
|
||||
{
|
||||
// this is disregarded if the char is not moving any more
|
||||
if (_actor.isMoving())
|
||||
{
|
||||
onEvtArrivedRevalidate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVT_ARRIVED_BLOCKED:
|
||||
{
|
||||
onEvtArrivedBlocked((Location) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_FORGET_OBJECT:
|
||||
{
|
||||
onEvtForgetObject((L2Object) args[0]);
|
||||
break;
|
||||
}
|
||||
case EVT_CANCEL:
|
||||
{
|
||||
onEvtCancel();
|
||||
break;
|
||||
}
|
||||
case EVT_DEAD:
|
||||
{
|
||||
onEvtDead();
|
||||
break;
|
||||
}
|
||||
case EVT_FAKE_DEATH:
|
||||
{
|
||||
onEvtFakeDeath();
|
||||
break;
|
||||
}
|
||||
case EVT_FINISH_CASTING:
|
||||
{
|
||||
onEvtFinishCasting();
|
||||
break;
|
||||
}
|
||||
case EVT_AFRAID:
|
||||
{
|
||||
onEvtAfraid((L2Character) args[0], (Boolean) args[1]);
|
||||
@ -600,7 +656,6 @@ public abstract class AbstractAI implements Ctrl
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,9 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
|
||||
/**
|
||||
* Interface of AI and client state.<br>
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
/**
|
||||
* This class contains an enum of each possibles events that can happen on an AI character.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
/**
|
||||
* Enumeration of generic intentions of an NPC/PC, an intention may require several steps to be completed.
|
75
trunk/java/com/l2jmobius/gameserver/ai/L2AirShipAI.java
Normal file
75
trunk/java/com/l2jmobius/gameserver/ai/L2AirShipAI.java
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2AirShipInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExMoveToLocationAirShip;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExStopMoveAirShip;
|
||||
|
||||
/**
|
||||
* @author DS
|
||||
*/
|
||||
public class L2AirShipAI extends L2VehicleAI
|
||||
{
|
||||
public L2AirShipAI(L2AirShipInstance creature)
|
||||
{
|
||||
super(creature);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void moveTo(int x, int y, int z)
|
||||
{
|
||||
if (!_actor.isMovementDisabled())
|
||||
{
|
||||
_clientMoving = true;
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
_actor.broadcastPacket(new ExMoveToLocationAirShip(getActor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clientStopMoving(Location loc)
|
||||
{
|
||||
if (_actor.isMoving())
|
||||
{
|
||||
_actor.stopMove(loc);
|
||||
}
|
||||
|
||||
if (_clientMoving || (loc != null))
|
||||
{
|
||||
_clientMoving = false;
|
||||
_actor.broadcastPacket(new ExStopMoveAirShip(getActor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeStateToPlayer(L2PcInstance player)
|
||||
{
|
||||
if (_clientMoving)
|
||||
{
|
||||
player.sendPacket(new ExMoveToLocationAirShip(getActor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2AirShipInstance getActor()
|
||||
{
|
||||
return (L2AirShipInstance) _actor;
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,11 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -28,39 +26,39 @@ import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.sql.impl.TerritoryTable;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.enums.AISkillScope;
|
||||
import com.l2jserver.gameserver.enums.AIType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2FriendlyMobInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GuardInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2RaidBossInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableFactionCall;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableHate;
|
||||
import com.l2jserver.gameserver.model.events.returns.TerminateReturn;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.TerritoryTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.AISkillScope;
|
||||
import com.l2jmobius.gameserver.enums.AIType;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2FriendlyMobInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2GuardInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2RaidBossInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableFactionCall;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableHate;
|
||||
import com.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import com.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
/**
|
||||
* This class manages AI of L2Attackable.
|
||||
@ -1737,7 +1735,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if (!canAura(sk))
|
||||
{
|
||||
|
||||
if (GeoData.getInstance().canSeeTarget(caster, attackTarget) && !attackTarget.isDead() && (dist2 <= srange))
|
||||
{
|
||||
clientStopMoving(null);
|
||||
@ -1970,7 +1967,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
moveToPawn(getAttackTarget(), range);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// Attacks target
|
||||
@ -2168,7 +2164,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if ((obj instanceof L2PcInstance) || (obj instanceof L2Summon))
|
||||
{
|
||||
|
||||
if (dist2 <= range)
|
||||
{
|
||||
if (getAttackTarget().getEffectList().getFirstEffect(L2EffectType.BUFF) != null)
|
||||
@ -2246,7 +2241,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
if (obj instanceof L2PcInstance)
|
||||
{
|
||||
return obj;
|
||||
|
||||
}
|
||||
if (obj instanceof L2Attackable)
|
||||
{
|
||||
@ -2342,7 +2336,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
actor.setTarget(obj);
|
||||
setAttackTarget(obj);
|
||||
|
||||
}
|
||||
else if (obj instanceof L2Attackable)
|
||||
{
|
||||
@ -2388,7 +2381,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
final L2Character MostHate = actor.getMostHated();
|
||||
if (actor.getHateList() != null)
|
||||
{
|
||||
|
||||
final int rand = Rnd.get(actor.getHateList().size());
|
||||
int count = 0;
|
||||
for (L2Character obj : actor.getHateList())
|
||||
@ -2517,14 +2509,20 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
switch (getIntention())
|
||||
{
|
||||
case AI_INTENTION_ACTIVE:
|
||||
{
|
||||
thinkActive();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_ATTACK:
|
||||
{
|
||||
thinkAttack();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_CAST:
|
||||
{
|
||||
thinkCast();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
82
trunk/java/com/l2jmobius/gameserver/ai/L2BoatAI.java
Normal file
82
trunk/java/com/l2jmobius/gameserver/ai/L2BoatAI.java
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.VehicleDeparture;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.VehicleStarted;
|
||||
|
||||
/**
|
||||
* @author DS
|
||||
*/
|
||||
public class L2BoatAI extends L2VehicleAI
|
||||
{
|
||||
public L2BoatAI(L2BoatInstance creature)
|
||||
{
|
||||
super(creature);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void moveTo(int x, int y, int z)
|
||||
{
|
||||
if (!_actor.isMovementDisabled())
|
||||
{
|
||||
if (!_clientMoving)
|
||||
{
|
||||
_actor.broadcastPacket(new VehicleStarted(getActor(), 1));
|
||||
}
|
||||
|
||||
_clientMoving = true;
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
_actor.broadcastPacket(new VehicleDeparture(getActor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clientStopMoving(Location loc)
|
||||
{
|
||||
if (_actor.isMoving())
|
||||
{
|
||||
_actor.stopMove(loc);
|
||||
}
|
||||
|
||||
if (_clientMoving || (loc != null))
|
||||
{
|
||||
_clientMoving = false;
|
||||
_actor.broadcastPacket(new VehicleStarted(getActor(), 0));
|
||||
_actor.broadcastPacket(new VehicleInfo(getActor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeStateToPlayer(L2PcInstance player)
|
||||
{
|
||||
if (_clientMoving)
|
||||
{
|
||||
player.sendPacket(new VehicleDeparture(getActor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2BoatInstance getActor()
|
||||
{
|
||||
return (L2BoatInstance) _actor;
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,51 +14,51 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_CAST;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_INTERACT;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_MOVE_TO;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_CAST;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_INTERACT;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_MOVE_TO;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.enums.ItemLocation;
|
||||
import com.l2jserver.gameserver.instancemanager.WalkingManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
|
||||
import com.l2jserver.gameserver.model.interfaces.ILocational;
|
||||
import com.l2jserver.gameserver.model.items.L2Weapon;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.items.type.WeaponType;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AutoAttackStop;
|
||||
import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import com.l2jmobius.gameserver.model.items.L2Weapon;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AutoAttackStop;
|
||||
import com.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
/**
|
||||
* This class manages AI of L2Character.<br>
|
||||
@ -171,7 +169,6 @@ public class L2CharacterAI extends AbstractAI
|
||||
|
||||
// Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)
|
||||
clientStopAutoAttack();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -281,7 +278,6 @@ public class L2CharacterAI extends AbstractAI
|
||||
|
||||
// Launch the Think Event
|
||||
notifyEvent(CtrlEvent.EVT_THINK);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -653,7 +649,6 @@ public class L2CharacterAI extends AbstractAI
|
||||
|
||||
// Launch actions corresponding to the Event onAttacked
|
||||
onEvtAttacked(attacker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1105,7 +1100,6 @@ public class L2CharacterAI extends AbstractAI
|
||||
// Caller should be L2Playable and thinkAttack/thinkCast/thinkInteract/thinkPickUp
|
||||
if (getFollowTarget() != null)
|
||||
{
|
||||
|
||||
// allow larger hit range when the target is moving (check is run only once per second)
|
||||
if (!_actor.isInsideRadius(target, offset + 100, false, false))
|
||||
{
|
||||
@ -1286,24 +1280,36 @@ public class L2CharacterAI extends AbstractAI
|
||||
switch (((L2NpcTemplate) _actor.getTemplate()).getAIType())
|
||||
{
|
||||
case FIGHTER:
|
||||
{
|
||||
isFighter = true;
|
||||
break;
|
||||
}
|
||||
case MAGE:
|
||||
{
|
||||
isMage = true;
|
||||
break;
|
||||
}
|
||||
case CORPSE:
|
||||
case BALANCED:
|
||||
{
|
||||
isBalanced = true;
|
||||
break;
|
||||
}
|
||||
case ARCHER:
|
||||
{
|
||||
isArcher = true;
|
||||
break;
|
||||
}
|
||||
case HEALER:
|
||||
{
|
||||
isHealer = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
isFighter = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// water movement analysis
|
||||
if (_actor.isNpc())
|
||||
@ -1312,11 +1318,15 @@ public class L2CharacterAI extends AbstractAI
|
||||
{
|
||||
case 20314: // great white shark
|
||||
case 20849: // Light Worm
|
||||
{
|
||||
cannotMoveOnLand = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
cannotMoveOnLand = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// skill analysis
|
||||
@ -1367,11 +1377,15 @@ public class L2CharacterAI extends AbstractAI
|
||||
case 4383:
|
||||
case 4616:
|
||||
case 4578:
|
||||
{
|
||||
sleepSkills.add(sk);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
generalDisablers.add(sk);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sk.hasEffectType(L2EffectType.ROOT))
|
||||
@ -1409,7 +1423,6 @@ public class L2CharacterAI extends AbstractAI
|
||||
{
|
||||
maxCastRange = castRange;
|
||||
}
|
||||
|
||||
}
|
||||
// Because of missing skills, some mages/balanced cannot play like mages
|
||||
if (!hasLongRangeDamageSkills && isMage)
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,29 +14,29 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.MobGroup;
|
||||
import com.l2jserver.gameserver.model.MobGroupTable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2ControllableMobInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.MobGroup;
|
||||
import com.l2jmobius.gameserver.model.MobGroupTable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ControllableMobInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
/**
|
||||
* AI for controllable mobs
|
||||
@ -97,24 +95,35 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
switch (getAlternateAI())
|
||||
{
|
||||
case AI_IDLE:
|
||||
{
|
||||
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AI_FOLLOW:
|
||||
{
|
||||
thinkFollow();
|
||||
break;
|
||||
}
|
||||
case AI_CAST:
|
||||
{
|
||||
thinkCast();
|
||||
break;
|
||||
}
|
||||
case AI_FORCEATTACK:
|
||||
{
|
||||
thinkForceAttack();
|
||||
break;
|
||||
}
|
||||
case AI_ATTACK_GROUP:
|
||||
{
|
||||
thinkAttackGroup();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (getIntention() == AI_INTENTION_ACTIVE)
|
||||
{
|
||||
thinkActive();
|
||||
@ -124,6 +133,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
thinkAttack();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author mkizub
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,34 +14,34 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2FortCommanderInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2FortCommanderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
/**
|
||||
* This class manages AI of L2Attackable.
|
||||
@ -178,7 +176,6 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
// Los Check Here
|
||||
return (_actor.isAutoAttackable(target) && GeoData.getInstance().canSeeTarget(_actor, target));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -339,7 +336,6 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
// Order to the L2SiegeGuardInstance to return to its home location because there's no target to attack
|
||||
if (_actor.getWalkSpeed() >= 0)
|
||||
@ -490,9 +486,9 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
if (!npc.isDead() && (Math.abs(target.getZ() - npc.getZ()) < 600)
|
||||
// && _actor.getAttackByList().contains(getAttackTarget())
|
||||
&& ((npc.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (npc.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))
|
||||
// limiting aggro for siege guards
|
||||
&& target.isInsideRadius(npc, 1500, true, false) && GeoData.getInstance().canSeeTarget(npc, target))
|
||||
&& ((npc.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (npc.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))
|
||||
// limiting aggro for siege guards
|
||||
&& target.isInsideRadius(npc, 1500, true, false) && GeoData.getInstance().canSeeTarget(npc, target))
|
||||
{
|
||||
// Notify the L2Object AI with EVT_AGGRESSION
|
||||
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, getAttackTarget(), 1);
|
||||
@ -604,7 +600,6 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if ((dist_2 <= (castRange * castRange)) && (castRange > 70) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive())
|
||||
{
|
||||
|
||||
final L2Object OldTarget = _actor.getTarget();
|
||||
if ((sk.isContinuous() && !sk.isDebuff()) || (sk.hasEffectType(L2EffectType.HEAL)))
|
||||
{
|
||||
@ -686,7 +681,6 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
// Else, if the actor is muted and far from target, just "move to pawn"
|
||||
else if (_actor.isMuted() && (dist_2 > (range * range)))
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,18 +14,20 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* This class manages AI of L2Playable.<br>
|
||||
* L2PlayableAI : <li>L2SummonAI</li> <li>L2PlayerAI</li>
|
||||
* L2PlayableAI :
|
||||
* <li>L2SummonAI</li>
|
||||
* <li>L2PlayerAI</li>
|
||||
* @author JIV
|
||||
*/
|
||||
public abstract class L2PlayableAI extends L2CharacterAI
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,26 +14,26 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_CAST;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_INTERACT;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_MOVE_TO;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_CAST;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_INTERACT;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_MOVE_TO;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
|
||||
|
||||
import com.l2jserver.gameserver.enums.DuelState;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.enums.DuelState;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2StaticObjectInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class L2PlayerAI extends L2PlayableAI
|
||||
{
|
48
trunk/java/com/l2jmobius/gameserver/ai/L2ShuttleAI.java
Normal file
48
trunk/java/com/l2jmobius/gameserver/ai/L2ShuttleAI.java
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ShuttleInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.shuttle.ExShuttleMove;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class L2ShuttleAI extends L2VehicleAI
|
||||
{
|
||||
public L2ShuttleAI(L2ShuttleInstance actor)
|
||||
{
|
||||
super(actor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveTo(int x, int y, int z)
|
||||
{
|
||||
if (!_actor.isMovementDisabled())
|
||||
{
|
||||
_clientMoving = true;
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
_actor.broadcastPacket(new ExShuttleMove(getActor(), x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2ShuttleInstance getActor()
|
||||
{
|
||||
return (L2ShuttleInstance) _actor;
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,33 +14,33 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
/**
|
||||
* This class manages AI of L2Attackable.
|
||||
@ -87,7 +85,6 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
// Launch actions corresponding to the Event Think
|
||||
onEvtThink();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -167,7 +164,6 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
// Los Check Here
|
||||
return (_actor.isAutoAttackable(target) && GeoData.getInstance().canSeeTarget(_actor, target));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -328,7 +324,6 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
// Order to the L2DefenderInstance to return to its home location because there's no target to attack
|
||||
((L2DefenderInstance) _actor).returnHome();
|
||||
@ -469,9 +464,9 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
if (!npc.isDead() && (Math.abs(target.getZ() - npc.getZ()) < 600)
|
||||
// && _actor.getAttackByList().contains(getAttackTarget())
|
||||
&& ((npc.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (npc.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))
|
||||
// limiting aggro for siege guards
|
||||
&& target.isInsideRadius(npc, 1500, true, false) && GeoData.getInstance().canSeeTarget(npc, target))
|
||||
&& ((npc.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (npc.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE))
|
||||
// limiting aggro for siege guards
|
||||
&& target.isInsideRadius(npc, 1500, true, false) && GeoData.getInstance().canSeeTarget(npc, target))
|
||||
{
|
||||
// Notify the L2Object AI with EVT_AGGRESSION
|
||||
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, getAttackTarget(), 1);
|
||||
@ -577,7 +572,6 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if ((dist_2 <= (castRange * castRange)) && (castRange > 70) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive())
|
||||
{
|
||||
|
||||
final L2Object OldTarget = _actor.getTarget();
|
||||
if ((sk.isContinuous() && !sk.isDebuff()) || (sk.hasEffectType(L2EffectType.HEAL)))
|
||||
{
|
||||
@ -659,7 +653,6 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
// Else, if the actor is muted and far from target, just "move to pawn"
|
||||
else if (_actor.isMuted() && (dist_2 > (range * range)) && !_selfAnalysis.isHealer)
|
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DefenderInstance;
|
||||
|
||||
/**
|
||||
* @author BiggBoss
|
||||
*/
|
||||
public final class L2SpecialSiegeGuardAI extends L2SiegeGuardAI
|
||||
{
|
||||
private final List<Integer> _allied = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @param creature
|
||||
*/
|
||||
public L2SpecialSiegeGuardAI(L2DefenderInstance creature)
|
||||
{
|
||||
super(creature);
|
||||
}
|
||||
|
||||
public List<Integer> getAlly()
|
||||
{
|
||||
return _allied;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean autoAttackCondition(L2Character target)
|
||||
{
|
||||
if (_allied.contains(target.getObjectId()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.autoAttackCondition(target);
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,23 +14,23 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.pathfinding.PathFinding;
|
||||
import com.l2jserver.util.Rnd;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.GeoData;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.pathfinding.PathFinding;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
{
|
||||
@ -90,10 +88,14 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
{
|
||||
case AI_INTENTION_ACTIVE:
|
||||
case AI_INTENTION_FOLLOW:
|
||||
{
|
||||
startAvoidTask();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
stopAvoidTask();
|
||||
}
|
||||
}
|
||||
|
||||
super.changeIntention(intention, arg0, arg1);
|
||||
@ -174,17 +176,25 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
switch (getIntention())
|
||||
{
|
||||
case AI_INTENTION_ATTACK:
|
||||
{
|
||||
thinkAttack();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_CAST:
|
||||
{
|
||||
thinkCast();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_PICK_UP:
|
||||
{
|
||||
thinkPickUp();
|
||||
break;
|
||||
}
|
||||
case AI_INTENTION_INTERACT:
|
||||
{
|
||||
thinkInteract();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
@ -265,7 +275,9 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
case AI_INTENTION_IDLE:
|
||||
case AI_INTENTION_MOVE_TO:
|
||||
case AI_INTENTION_PICK_UP:
|
||||
{
|
||||
((L2Summon) _actor).setFollowStatus(_startFollow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,12 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Vehicle;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Vehicle;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author DS
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.ai;
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.cache;
|
||||
package com.l2jmobius.gameserver.cache;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
@ -27,9 +25,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.file.filter.HTMLFilter;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.file.filter.HTMLFilter;
|
||||
|
||||
/**
|
||||
* @author Layane
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,14 +14,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.cache;
|
||||
package com.l2jmobius.gameserver.cache;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author -Nemesiss-
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.BB;
|
||||
package com.l2jmobius.gameserver.communitybbs.BB;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -28,9 +26,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.ForumsBBSManager;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.communitybbs.Manager.ForumsBBSManager;
|
||||
import com.l2jmobius.gameserver.communitybbs.Manager.TopicBBSManager;
|
||||
|
||||
public final class Forum
|
||||
{
|
||||
@ -60,7 +58,7 @@ public final class Forum
|
||||
private boolean _loaded = false;
|
||||
|
||||
/**
|
||||
* Creates new instance of Forum. When you create new forum, use {@link com.l2jserver.gameserver.communitybbs.Manager.ForumsBBSManager# addForum(com.l2jserver.gameserver.communitybbs.BB.Forum)} to add forum to the forums manager.
|
||||
* Creates new instance of Forum. When you create new forum, use {@link com.l2jmobius.gameserver.communitybbs.Manager.ForumsBBSManager# addForum(com.l2jmobius.gameserver.communitybbs.BB.Forum)} to add forum to the forums manager.
|
||||
* @param Forumid
|
||||
* @param FParent
|
||||
*/
|
||||
@ -213,7 +211,6 @@ public final class Forum
|
||||
public void rmTopicByID(int id)
|
||||
{
|
||||
_topic.remove(id);
|
||||
|
||||
}
|
||||
|
||||
public void insertIntoDb()
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.BB;
|
||||
package com.l2jmobius.gameserver.communitybbs.BB;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -26,8 +24,8 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.PostBBSManager;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.communitybbs.Manager.PostBBSManager;
|
||||
|
||||
/**
|
||||
* @author Maktakien
|
||||
@ -69,7 +67,6 @@ public class Post
|
||||
cp.postTxt = txt;
|
||||
_post.add(cp);
|
||||
insertindb(cp);
|
||||
|
||||
}
|
||||
|
||||
public Post(Topic t)
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.BB;
|
||||
package com.l2jmobius.gameserver.communitybbs.BB;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.communitybbs.Manager.TopicBBSManager;
|
||||
|
||||
public class Topic
|
||||
{
|
||||
@ -67,7 +65,6 @@ public class Topic
|
||||
|
||||
if (ct == ConstructorType.CREATE)
|
||||
{
|
||||
|
||||
insertindb();
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.Manager;
|
||||
package com.l2jmobius.gameserver.communitybbs.Manager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ShowBoard;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ShowBoard;
|
||||
|
||||
public abstract class BaseBBSManager
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.Manager;
|
||||
package com.l2jmobius.gameserver.communitybbs.Manager;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
@ -26,9 +24,9 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Forum;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Forum;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
public class ForumsBBSManager extends BaseBBSManager
|
||||
{
|
||||
@ -139,7 +137,6 @@ public class ForumsBBSManager extends BaseBBSManager
|
||||
@Override
|
||||
public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.Manager;
|
||||
package com.l2jmobius.gameserver.communitybbs.Manager;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
@ -25,13 +23,13 @@ import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Forum;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Post;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Post.CPost;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Topic;
|
||||
import com.l2jserver.gameserver.handler.CommunityBoardHandler;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Forum;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Post;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Post.CPost;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Topic;
|
||||
import com.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
|
||||
public class PostBBSManager extends BaseBBSManager
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.communitybbs.Manager;
|
||||
package com.l2jmobius.gameserver.communitybbs.Manager;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Calendar;
|
||||
@ -27,13 +25,13 @@ import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Forum;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Post;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Topic;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.handler.CommunityBoardHandler;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.util.StringUtil;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Forum;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Post;
|
||||
import com.l2jmobius.gameserver.communitybbs.BB.Topic;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.util.StringUtil;
|
||||
|
||||
public class TopicBBSManager extends BaseBBSManager
|
||||
{
|
||||
@ -102,7 +100,6 @@ public class TopicBBSManager extends BaseBBSManager
|
||||
PostBBSManager.getInstance().addPostByTopic(p, t);
|
||||
parsecmd("_bbsmemo", activeChar);
|
||||
}
|
||||
|
||||
}
|
||||
else if (ar1.equals("del"))
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
@ -27,14 +25,14 @@ import java.util.concurrent.ConcurrentSkipListMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.announce.Announcement;
|
||||
import com.l2jserver.gameserver.model.announce.AnnouncementType;
|
||||
import com.l2jserver.gameserver.model.announce.AutoAnnouncement;
|
||||
import com.l2jserver.gameserver.model.announce.IAnnouncement;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.announce.Announcement;
|
||||
import com.l2jmobius.gameserver.model.announce.AnnouncementType;
|
||||
import com.l2jmobius.gameserver.model.announce.AutoAnnouncement;
|
||||
import com.l2jmobius.gameserver.model.announce.IAnnouncement;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
|
||||
/**
|
||||
* Loads announcements from database.
|
||||
@ -113,8 +111,8 @@ public final class AnnouncementsTable
|
||||
if (announce.isValid() && (announce.getType() == type))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, //
|
||||
type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, //
|
||||
player.getName(), announce.getContent()));
|
||||
type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, //
|
||||
player.getName(), announce.getContent()));
|
||||
}
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -29,9 +27,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* Loads name and access level for all players.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -28,19 +26,19 @@ import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.PetDataTable;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.L2PetData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PetItemList;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PetDataTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.model.L2PetData;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ServitorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PetItemList;
|
||||
|
||||
/**
|
||||
* @author Nyaran
|
||||
@ -244,7 +242,6 @@ public class CharSummonTable
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Failed to store summon: " + summon + " from " + summon.getOwner() + ", error: " + e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static CharSummonTable getInstance()
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -30,38 +28,38 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.ForumsBBSManager;
|
||||
import com.l2jserver.gameserver.enums.UserInfoType;
|
||||
import com.l2jserver.gameserver.idfactory.IdFactory;
|
||||
import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ClanHallAuctionManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FortManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.SiegeManager;
|
||||
import com.l2jserver.gameserver.model.ClanPrivilege;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.L2ClanMember;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.Auction;
|
||||
import com.l2jserver.gameserver.model.entity.Fort;
|
||||
import com.l2jserver.gameserver.model.entity.FortSiege;
|
||||
import com.l2jserver.gameserver.model.entity.Siege;
|
||||
import com.l2jserver.gameserver.model.entity.clanhall.SiegableHall;
|
||||
import com.l2jserver.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanCreate;
|
||||
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanDestroy;
|
||||
import com.l2jserver.gameserver.model.events.impl.clan.OnClanWarFinish;
|
||||
import com.l2jserver.gameserver.model.events.impl.clan.OnClanWarStart;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PledgeShowInfoUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PledgeShowMemberListAll;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PledgeShowMemberListUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.EnumIntBitmask;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.communitybbs.Manager.ForumsBBSManager;
|
||||
import com.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallAuctionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import com.l2jmobius.gameserver.model.ClanPrivilege;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.L2ClanMember;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.entity.Auction;
|
||||
import com.l2jmobius.gameserver.model.entity.Fort;
|
||||
import com.l2jmobius.gameserver.model.entity.FortSiege;
|
||||
import com.l2jmobius.gameserver.model.entity.Siege;
|
||||
import com.l2jmobius.gameserver.model.entity.clanhall.SiegableHall;
|
||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanCreate;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanDestroy;
|
||||
import com.l2jmobius.gameserver.model.events.impl.clan.OnClanWarFinish;
|
||||
import com.l2jmobius.gameserver.model.events.impl.clan.OnClanWarStart;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PledgeShowInfoUpdate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PledgeShowMemberListAll;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PledgeShowMemberListUpdate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.EnumIntBitmask;
|
||||
|
||||
/**
|
||||
* This class loads the clan related data.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -31,10 +29,10 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.L2Crest;
|
||||
import com.l2jserver.gameserver.model.L2Crest.CrestType;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.L2Crest;
|
||||
import com.l2jmobius.gameserver.model.L2Crest.CrestType;
|
||||
|
||||
/**
|
||||
* Loads and saves crests from database.
|
||||
@ -106,7 +104,6 @@ public final class CrestTable
|
||||
LOGGER.warning("Unknown crest type found in database. Type:" + rs.getInt("type"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
@ -27,10 +25,10 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
|
||||
public class NpcBufferTable
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -26,16 +24,16 @@ import java.util.Calendar;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.LoginServerThread;
|
||||
import com.l2jserver.gameserver.enums.PrivateStoreType;
|
||||
import com.l2jserver.gameserver.model.L2ManufactureItem;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.TradeItem;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
import com.l2jserver.gameserver.network.L2GameClient.GameClientState;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.LoginServerThread;
|
||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import com.l2jmobius.gameserver.model.L2ManufactureItem;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.TradeItem;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient.GameClientState;
|
||||
|
||||
public class OfflineTradersTable
|
||||
{
|
||||
@ -77,6 +75,7 @@ public class OfflineTradersTable
|
||||
switch (pc.getPrivateStoreType())
|
||||
{
|
||||
case BUY:
|
||||
{
|
||||
if (!Config.OFFLINE_TRADE_ENABLE)
|
||||
{
|
||||
continue;
|
||||
@ -92,8 +91,10 @@ public class OfflineTradersTable
|
||||
stm_items.clearParameters();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SELL:
|
||||
case PACKAGE_SELL:
|
||||
{
|
||||
if (!Config.OFFLINE_TRADE_ENABLE)
|
||||
{
|
||||
continue;
|
||||
@ -109,7 +110,9 @@ public class OfflineTradersTable
|
||||
stm_items.clearParameters();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MANUFACTURE:
|
||||
{
|
||||
if (!Config.OFFLINE_CRAFT_ENABLE)
|
||||
{
|
||||
continue;
|
||||
@ -124,6 +127,8 @@ public class OfflineTradersTable
|
||||
stm_items.executeUpdate();
|
||||
stm_items.clearParameters();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
stm3.setString(4, title);
|
||||
stm3.executeUpdate();
|
||||
@ -202,6 +207,7 @@ public class OfflineTradersTable
|
||||
switch (type)
|
||||
{
|
||||
case BUY:
|
||||
{
|
||||
while (items.next())
|
||||
{
|
||||
if (player.getBuyList().addItemByItemId(items.getInt(2), items.getLong(3), items.getLong(4), 0, 0, 0, new int[]
|
||||
@ -220,8 +226,10 @@ public class OfflineTradersTable
|
||||
}
|
||||
player.getBuyList().setTitle(rs.getString("title"));
|
||||
break;
|
||||
}
|
||||
case SELL:
|
||||
case PACKAGE_SELL:
|
||||
{
|
||||
while (items.next())
|
||||
{
|
||||
if (player.getSellList().addItem(items.getInt(2), items.getLong(3), items.getLong(4)) == null)
|
||||
@ -233,13 +241,16 @@ public class OfflineTradersTable
|
||||
player.getSellList().setTitle(rs.getString("title"));
|
||||
player.getSellList().setPackaged(type == PrivateStoreType.PACKAGE_SELL);
|
||||
break;
|
||||
}
|
||||
case MANUFACTURE:
|
||||
{
|
||||
while (items.next())
|
||||
{
|
||||
player.getManufactureItems().put(items.getInt(2), new L2ManufactureItem(items.getInt(2), items.getLong(4)));
|
||||
}
|
||||
player.setStoreName(rs.getString("title"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -311,6 +322,7 @@ public class OfflineTradersTable
|
||||
switch (trader.getPrivateStoreType())
|
||||
{
|
||||
case BUY:
|
||||
{
|
||||
if (firstCall)
|
||||
{
|
||||
title = trader.getBuyList().getTitle();
|
||||
@ -325,8 +337,10 @@ public class OfflineTradersTable
|
||||
stm3.clearParameters();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SELL:
|
||||
case PACKAGE_SELL:
|
||||
{
|
||||
if (firstCall)
|
||||
{
|
||||
title = trader.getSellList().getTitle();
|
||||
@ -341,7 +355,9 @@ public class OfflineTradersTable
|
||||
stm3.clearParameters();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MANUFACTURE:
|
||||
{
|
||||
if (firstCall)
|
||||
{
|
||||
title = trader.getStoreName();
|
||||
@ -355,6 +371,8 @@ public class OfflineTradersTable
|
||||
stm3.executeUpdate();
|
||||
stm3.clearParameters();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
stm3.close();
|
||||
if (firstCall)
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -28,9 +26,9 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.data.xml.impl.PetDataTable;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PetDataTable;
|
||||
|
||||
public class PetNameTable
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -25,11 +23,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ServitorInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Nyaran
|
||||
@ -102,7 +100,6 @@ public class SummonEffectsTable
|
||||
{
|
||||
if (containsOwner(owner))
|
||||
{
|
||||
|
||||
getServitorEffects(owner).getOrDefault(referenceSkill, Collections.emptyList()).clear();
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
@ -29,9 +27,9 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
|
||||
public class SummonSkillsTable
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
@ -26,9 +24,9 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.L2TeleportLocation;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.model.L2TeleportLocation;
|
||||
|
||||
public class TeleportLocationTable
|
||||
{
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.sql.impl;
|
||||
package com.l2jmobius.gameserver.data.sql.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
@ -27,9 +25,9 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.L2Territory;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.model.L2Territory;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
|
||||
/**
|
||||
* @author Balancer, Mr
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@ -27,8 +25,8 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.holders.RangeAbilityPointsHolder;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.model.holders.RangeAbilityPointsHolder;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -30,14 +28,14 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2AccessLevel;
|
||||
import com.l2jserver.gameserver.model.L2AdminCommandAccessRight;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.model.L2AccessLevel;
|
||||
import com.l2jmobius.gameserver.model.L2AdminCommandAccessRight;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Loads administrator access levels and commands.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -26,13 +24,13 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.enums.Race;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.items.appearance.AppearanceStone;
|
||||
import com.l2jserver.gameserver.model.items.appearance.AppearanceTargetType;
|
||||
import com.l2jserver.gameserver.model.items.type.CrystalType;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.items.appearance.AppearanceStone;
|
||||
import com.l2jmobius.gameserver.model.items.appearance.AppearanceTargetType;
|
||||
import com.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -25,10 +23,10 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2ArmorSet;
|
||||
import com.l2jserver.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.model.L2ArmorSet;
|
||||
import com.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Loads armor set bonuses.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -25,12 +23,12 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.enums.Race;
|
||||
import com.l2jserver.gameserver.enums.Sex;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.beautyshop.BeautyData;
|
||||
import com.l2jserver.gameserver.model.beautyshop.BeautyItem;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.enums.Sex;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.beautyshop.BeautyData;
|
||||
import com.l2jmobius.gameserver.model.beautyshop.BeautyItem;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
@ -31,14 +29,14 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.model.buylist.L2BuyList;
|
||||
import com.l2jserver.gameserver.model.buylist.Product;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jserver.util.file.filter.NumericNameFilter;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.buylist.L2BuyList;
|
||||
import com.l2jmobius.gameserver.model.buylist.Product;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.util.file.filter.NumericNameFilter;
|
||||
|
||||
/**
|
||||
* Loads buy lists for NPCs.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -29,9 +27,9 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.enums.CastleSide;
|
||||
import com.l2jserver.gameserver.model.holders.CastleSpawnHolder;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.enums.CastleSide;
|
||||
import com.l2jmobius.gameserver.model.holders.CastleSpawnHolder;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* @author St3eT
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -29,8 +27,8 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.enums.CategoryType;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Loads the category data with Class or NPC IDs.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -25,9 +23,9 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.base.ClassId;
|
||||
import com.l2jserver.gameserver.model.base.ClassInfo;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
import com.l2jmobius.gameserver.model.base.ClassInfo;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Loads the the list of classes and it's info.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -27,11 +25,11 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.base.ClassId;
|
||||
import com.l2jserver.gameserver.model.holders.DailyMissionHolder;
|
||||
import com.l2jserver.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
import com.l2jmobius.gameserver.model.holders.DailyMissionHolder;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* The Class DailyMissionData.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@ -30,13 +28,13 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.instancemanager.MapRegionManager;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2DoorTemplate;
|
||||
import com.l2jserver.gameserver.pathfinding.AbstractNodeLoc;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2DoorTemplate;
|
||||
import com.l2jmobius.gameserver.pathfinding.AbstractNodeLoc;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Loads doors.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -26,11 +24,11 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.items.enchant.EnchantScroll;
|
||||
import com.l2jserver.gameserver.model.items.enchant.EnchantSupportItem;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.items.enchant.EnchantScroll;
|
||||
import com.l2jmobius.gameserver.model.items.enchant.EnchantSupportItem;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Loads item enchant data.
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
@ -16,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.data.xml.impl;
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -26,14 +24,14 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.model.holders.RangeChanceHolder;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.items.enchant.EnchantItemGroup;
|
||||
import com.l2jserver.gameserver.model.items.enchant.EnchantRateItem;
|
||||
import com.l2jserver.gameserver.model.items.enchant.EnchantScrollGroup;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.holders.RangeChanceHolder;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.enchant.EnchantItemGroup;
|
||||
import com.l2jmobius.gameserver.model.items.enchant.EnchantRateItem;
|
||||
import com.l2jmobius.gameserver.model.items.enchant.EnchantScrollGroup;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user