1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-11 09:42:54 +00:00

Implemented new packets and several services

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-17 12:37:52 -03:00
parent 5e21f16735
commit 31cc1a97e3
66 changed files with 2767 additions and 104 deletions

View File

@@ -0,0 +1,43 @@
/*
* This file is part of l2jserver <l2jserver.com>.
*
* l2jserver 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.
*
* l2jserver 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 l2jserver. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.model.id;
import com.l2jserver.model.Model;
/**
* This is an abstract ID for most model objects that do not extend
* {@link ObjectID}.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public abstract class AbstractModelID<T, O extends Model<? extends ID<T>>>
extends ID<T> {
/**
* @param id
* the id
*/
protected AbstractModelID(T id) {
super(id);
}
/**
* @return the {@link Model} object associated with this
* {@link AbstractModelID}. <tt>null</tt> if {@link Model} does not
* exists.
*/
public abstract O getObject();
}

View File

@@ -0,0 +1,38 @@
/*
* This file is part of l2jserver <l2jserver.com>.
*
* l2jserver 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.
*
* l2jserver 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 l2jserver. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.model.id;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
/**
* Each {@link Castle} is identified by an {@link ID}.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class CastleID extends ID<Integer> {
/**
* Creates a new instance
*
* @param id
* the id
*/
@Inject
public CastleID(@Assisted int id) {
super(id);
}
}

View File

@@ -0,0 +1,45 @@
/*
* This file is part of l2jserver <l2jserver.com>.
*
* l2jserver 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.
*
* l2jserver 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 l2jserver. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.model.id;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.l2jserver.model.game.Fort;
/**
* Each {@link Fort} is identified by an {@link ID}.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class FortID extends AbstractModelID<Integer, Fort> {
/**
* Creates a new instance
*
* @param id
* the id
*/
@Inject
public FortID(@Assisted int id) {
super(id);
}
@Override
public Fort getObject() {
// TODO Auto-generated method stub
return null;
}
}

View File

@@ -0,0 +1,27 @@
/*
* This file is part of l2jserver <l2jserver.com>.
*
* l2jserver 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.
*
* l2jserver 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 l2jserver. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.model.id.factory;
import com.l2jserver.model.id.CastleID;
/**
* Creates a new {@link CastleID}
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface CastleIDFactory extends IDFactory<Integer, CastleID> {
}

View File

@@ -0,0 +1,27 @@
/*
* This file is part of l2jserver <l2jserver.com>.
*
* l2jserver 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.
*
* l2jserver 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 l2jserver. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.model.id.factory;
import com.l2jserver.model.id.FortID;
/**
* Creates a new {@link FortID}
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface FortIDFactory extends IDFactory<Integer, FortID> {
}

View File

@@ -43,9 +43,6 @@ public class IDFactoryModule extends AbstractModule {
bind(IDAllocator.class).to(BitSetIDAllocator.class)
.in(Scopes.SINGLETON);
// ACCOUNT ID
install(new FactoryModuleBuilder().build(AccountIDFactory.class));
// OBJECT IDS
bind(CharacterIDFactory.class).in(Scopes.SINGLETON);
install(new FactoryModuleBuilder().build(CharacterIDGuiceFactory.class));
@@ -59,6 +56,10 @@ public class IDFactoryModule extends AbstractModule {
// bind(PetIDFactory.class).in(Scopes.SINGLETON);
// install(new FactoryModuleBuilder().build(PetIDGuiceFactory.class));
// MISC OBJECTS
install(new FactoryModuleBuilder().build(AccountIDFactory.class));
install(new FactoryModuleBuilder().build(FortIDFactory.class));
// TEMPLATE IDS
install(new FactoryModuleBuilder().build(ItemTemplateIDFactory.class));
install(new FactoryModuleBuilder().build(SkillTemplateIDFactory.class));