Moved enums to separate files.

This commit is contained in:
MobiusDevelopment
2022-01-18 22:10:20 +00:00
parent baf89b5e77
commit 406c54f14e
2882 changed files with 19106 additions and 13875 deletions

View File

@@ -56,41 +56,12 @@ import org.l2jmobius.gameserver.util.Broadcast;
*/
public class Shutdown extends Thread
{
public enum ShutdownModeType1
{
SIGTERM("Terminating"),
SHUTDOWN("Shutting down"),
RESTART("Restarting"),
ABORT("Aborting");
private final String _modeText;
ShutdownModeType1(String modeText)
{
_modeText = modeText;
}
public String getText()
{
return _modeText;
}
}
protected static final Logger LOGGER = Logger.getLogger(Shutdown.class.getName());
private static Shutdown _counterInstance = null;
private int _secondsShut;
private int _shutdownMode;
private boolean _shutdownStarted;
public static final int SIGTERM = 0;
public static final int GM_SHUTDOWN = 1;
public static final int GM_RESTART = 2;
public static final int ABORT = 3;
private static final int SIGTERM = 0;
private static final int GM_SHUTDOWN = 1;
private static final int GM_RESTART = 2;
private static final int ABORT = 3;
private static final String[] MODE_TEXT =
{
"SIGTERM",
@@ -99,6 +70,12 @@ public class Shutdown extends Thread
"aborting"
};
private static Shutdown _counterInstance = null;
private int _secondsShut;
private int _shutdownMode;
private boolean _shutdownStarted;
/**
* Default constructor is only used internal to create the shutdown-hook instance
*/

View File

@@ -27,7 +27,6 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.sql.TerritoryTable;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.instancemanager.DimensionalRiftManager;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -49,6 +48,7 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcWalker;
import org.l2jmobius.gameserver.model.actor.instance.PenaltyMonster;
import org.l2jmobius.gameserver.model.actor.instance.RaidBoss;
import org.l2jmobius.gameserver.model.actor.instance.RiftInvader;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.quest.EventType;

View File

@@ -27,6 +27,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
import org.l2jmobius.gameserver.ai.PlayerAI.IntentionCommand;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -36,7 +37,6 @@ import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Boat;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.zone.ZoneId;

View File

@@ -29,7 +29,6 @@ import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Attackable;
@@ -42,6 +41,7 @@ import org.l2jmobius.gameserver.model.actor.instance.Commander;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.actor.instance.Folk;
import org.l2jmobius.gameserver.model.actor.instance.FortSiegeGuard;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
import org.l2jmobius.gameserver.util.Util;

View File

@@ -27,7 +27,6 @@ import org.l2jmobius.Config;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Attackable;
@@ -39,6 +38,7 @@ import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.actor.instance.Folk;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.actor.instance.SiegeGuard;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;

View File

@@ -26,6 +26,7 @@ import java.util.Map;
import java.util.logging.Logger;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.communitybbs.TopicConstructorType;
import org.l2jmobius.gameserver.communitybbs.Manager.ForumsBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.TopicBBSManager;
@@ -123,7 +124,7 @@ public class Forum
while (result.next())
{
final Topic t = new Topic(Topic.ConstructorType.RESTORE, result.getInt("topic_id"), result.getInt("topic_forum_id"), result.getString("topic_name"), result.getLong("topic_date"), result.getString("topic_ownername"), result.getInt("topic_ownerid"), result.getInt("topic_type"), result.getInt("topic_reply"));
final Topic t = new Topic(TopicConstructorType.RESTORE, result.getInt("topic_id"), result.getInt("topic_forum_id"), result.getString("topic_name"), result.getLong("topic_date"), result.getString("topic_ownername"), result.getInt("topic_ownerid"), result.getInt("topic_type"), result.getInt("topic_reply"));
_topic.put(t.getID(), t);
if (t.getID() > TopicBBSManager.getInstance().getMaxID(this))
{

View File

@@ -21,6 +21,7 @@ import java.sql.PreparedStatement;
import java.util.logging.Logger;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.communitybbs.TopicConstructorType;
import org.l2jmobius.gameserver.communitybbs.Manager.TopicBBSManager;
public class Topic
@@ -49,7 +50,7 @@ public class Topic
* @param type
* @param cReply
*/
public Topic(ConstructorType ct, int id, int fid, String name, long date, String oname, int oid, int type, int cReply)
public Topic(TopicConstructorType ct, int id, int fid, String name, long date, String oname, int oid, int type, int cReply)
{
_id = id;
_forumId = fid;
@@ -61,7 +62,7 @@ public class Topic
_cReply = cReply;
TopicBBSManager.getInstance().addTopic(this);
if (ct == ConstructorType.CREATE)
if (ct == TopicConstructorType.CREATE)
{
insertIntoDb();
}
@@ -89,12 +90,6 @@ public class Topic
}
}
public enum ConstructorType
{
RESTORE,
CREATE
}
public int getID()
{
return _id;

View File

@@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.communitybbs.CommunityBoard;
import org.l2jmobius.gameserver.communitybbs.TopicConstructorType;
import org.l2jmobius.gameserver.communitybbs.BB.Forum;
import org.l2jmobius.gameserver.communitybbs.BB.Post;
import org.l2jmobius.gameserver.communitybbs.BB.Topic;
@@ -62,7 +63,7 @@ public class TopicBBSManager extends BaseBBSManager
}
f.vload();
final Topic t = new Topic(Topic.ConstructorType.CREATE, getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), player.getName(), player.getObjectId(), Topic.MEMO, 0);
final Topic t = new Topic(TopicConstructorType.CREATE, getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), player.getName(), player.getObjectId(), Topic.MEMO, 0);
f.addTopic(t);
getInstance().setMaxID(t.getID(), f);

View File

@@ -0,0 +1,23 @@
/*
* 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 org.l2jmobius.gameserver.communitybbs;
public enum TopicConstructorType
{
RESTORE,
CREATE
}

View File

@@ -1,189 +0,0 @@
/*
* 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 org.l2jmobius.gameserver.data;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import org.l2jmobius.gameserver.model.WorldObject;
public class DesireTable
{
public static final DesireType[] DEFAULT_DESIRES =
{
DesireType.FEAR,
DesireType.DISLIKE,
DesireType.HATE,
DesireType.DAMAGE
};
public enum DesireType
{
FEAR,
DISLIKE,
HATE,
DAMAGE
}
private final Map<WorldObject, Desires> _objectDesireTable;
private final Desires _generalDesires;
private final DesireType[] _desireTypes;
public DesireTable(DesireType... desireList)
{
_desireTypes = desireList;
_objectDesireTable = new HashMap<>();
_generalDesires = new Desires(_desireTypes);
}
public float getDesireValue(DesireType type)
{
return _generalDesires.getDesireValue(type).getValue();
}
public float getDesireValue(WorldObject object, DesireType type)
{
final Desires desireList = _objectDesireTable.get(object);
if (desireList == null)
{
return 0f;
}
return desireList.getDesireValue(type).getValue();
}
public void addDesireValue(DesireType type, float value)
{
_generalDesires.addValue(type, value);
}
public void addDesireValue(WorldObject object, DesireType type, float value)
{
final Desires desireList = _objectDesireTable.get(object);
if (desireList != null)
{
desireList.addValue(type, value);
}
}
public void createDesire(DesireType type)
{
_generalDesires.createDesire(type);
}
public void deleteDesire(DesireType type)
{
_generalDesires.deleteDesire(type);
}
public void createDesire(WorldObject object, DesireType type)
{
final Desires desireList = _objectDesireTable.get(object);
if (desireList != null)
{
desireList.createDesire(type);
}
}
public void deleteDesire(WorldObject object, DesireType type)
{
final Desires desireList = _objectDesireTable.get(object);
if (desireList != null)
{
desireList.deleteDesire(type);
}
}
public void addKnownObject(WorldObject object)
{
if (object != null)
{
addKnownObject(object, DesireType.DISLIKE, DesireType.FEAR, DesireType.DAMAGE, DesireType.HATE);
}
}
public void addKnownObject(WorldObject object, DesireType... desireList)
{
if (object != null)
{
_objectDesireTable.put(object, new Desires(desireList));
}
}
private class DesireValue
{
private float _value;
DesireValue()
{
this(0f);
}
DesireValue(Float pValue)
{
_value = pValue;
}
public void addValue(float pValue)
{
_value += pValue;
}
public float getValue()
{
return _value;
}
}
private class Desires
{
private final Map<DesireType, DesireValue> _desireTable;
public Desires(DesireType... desireList)
{
_desireTable = new EnumMap<>(DesireType.class);
for (DesireType desire : desireList)
{
_desireTable.put(desire, new DesireValue());
}
}
public DesireValue getDesireValue(DesireType type)
{
return _desireTable.get(type);
}
public void addValue(DesireType type, float value)
{
final DesireValue temp = getDesireValue(type);
if (temp != null)
{
temp.addValue(value);
}
}
public void createDesire(DesireType type)
{
_desireTable.put(type, new DesireValue());
}
public void deleteDesire(DesireType type)
{
_desireTable.remove(type);
}
}
}

View File

@@ -33,6 +33,7 @@ import org.l2jmobius.Config;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.data.sql.PetDataTable;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -45,7 +46,6 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
import org.l2jmobius.gameserver.util.DocumentItem;
/**

View File

@@ -29,8 +29,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.enums.CrestType;
import org.l2jmobius.gameserver.model.Crest;
import org.l2jmobius.gameserver.model.Crest.CrestType;
import org.l2jmobius.gameserver.model.clan.Clan;
/**

View File

@@ -30,13 +30,13 @@ import org.l2jmobius.Config;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.enums.ClassId;
import org.l2jmobius.gameserver.enums.NpcRace;
import org.l2jmobius.gameserver.model.DropCategory;
import org.l2jmobius.gameserver.model.DropData;
import org.l2jmobius.gameserver.model.MinionData;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate.Race;
import org.l2jmobius.gameserver.model.skill.BaseStat;
import org.l2jmobius.gameserver.model.skill.Stat;
@@ -114,8 +114,8 @@ public class NpcTable
if (skillId == 4416)
{
final Race race = npcDat.getRace();
if ((race == null) || (race == Race.UNKNOWN))
final NpcRace race = npcDat.getRace();
if ((race == null) || (race == NpcRace.UNKNOWN))
{
npcDat.setRace(level);
}

View File

@@ -0,0 +1,24 @@
/*
* 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 org.l2jmobius.gameserver.enums;
public enum AbsorbCrystalType
{
LAST_HIT,
FULL_PARTY,
PARTY_ONE_RANDOM
}

View 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 org.l2jmobius.gameserver.enums;
public enum CrestType
{
PLEDGE(1),
PLEDGE_LARGE(2),
ALLY(3);
private final int _id;
CrestType(int id)
{
_id = id;
}
public int getId()
{
return _id;
}
public static CrestType getById(int id)
{
for (CrestType crestType : values())
{
if (crestType.getId() == id)
{
return crestType;
}
}
return null;
}
}

View 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 org.l2jmobius.gameserver.enums;
public enum FortTeleportWhoType
{
All,
Attacker,
DefenderNotOwner,
Owner,
Spectator
}

View File

@@ -0,0 +1,33 @@
/*
* 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 org.l2jmobius.gameserver.enums;
/**
* Enumeration of locations for item.
*/
public enum ItemLocation
{
VOID,
INVENTORY,
PAPERDOLL,
WAREHOUSE,
CLANWH,
PET,
PET_EQUIP,
LEASE,
FREIGHT
}

View File

@@ -0,0 +1,45 @@
/*
* 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 org.l2jmobius.gameserver.enums;
public enum NpcRace
{
UNDEAD,
MAGICCREATURE,
BEAST,
ANIMAL,
PLANT,
HUMANOID,
SPIRIT,
ANGEL,
DEMON,
DRAGON,
GIANT,
BUG,
FAIRIE,
HUMAN,
ELVE,
DARKELVE,
ORC,
DWARVE,
OTHER,
NONLIVING,
SIEGEWEAPON,
DEFENDINGARMY,
MERCENARIE,
UNKNOWN
}

View 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 org.l2jmobius.gameserver.enums;
public enum PlayerState
{
RESTING,
MOVING,
RUNNING,
FLYING,
BEHIND,
FRONT,
SIDE
}

View File

@@ -0,0 +1,50 @@
/*
* 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 org.l2jmobius.gameserver.enums;
public enum PunishmentType
{
NONE(0, ""),
CHAT(1, "chat banned"),
JAIL(2, "jailed"),
CHAR(3, "banned"),
ACC(4, "banned");
private final int punValue;
private final String punString;
/**
* Instantiates a new punish level.
* @param value the value
* @param string the string
*/
PunishmentType(int value, String string)
{
punValue = value;
punString = string;
}
public int value()
{
return punValue;
}
public String string()
{
return punString;
}
}

View 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 org.l2jmobius.gameserver.enums;
public enum SiegeTeleportWhoType
{
All,
Attacker,
DefenderNotOwner,
Owner,
Spectator
}

View File

@@ -0,0 +1,24 @@
/*
* 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 org.l2jmobius.gameserver.enums;
public enum SkillAquireType
{
USUAL,
FISHING,
CLAN
}

View File

@@ -24,6 +24,7 @@ import java.util.StringTokenizer;
import org.l2jmobius.Config;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.LoginServerThread;
import org.l2jmobius.gameserver.enums.PunishmentType;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -112,7 +113,7 @@ public class AdminBan implements IAdminCommandHandler
}
else
{
targetPlayer.setPunishLevel(Player.PunishLevel.ACC, 0);
targetPlayer.setPunishLevel(PunishmentType.ACC, 0);
BuilderUtil.sendSysMessage(activeChar, "Account " + targetPlayer.getAccountName() + " banned.");
auditAction(command, activeChar, targetPlayer.getAccountName());
}
@@ -142,7 +143,7 @@ public class AdminBan implements IAdminCommandHandler
return false;
}
String banLengthStr = "";
targetPlayer.setPunishLevel(Player.PunishLevel.CHAT, duration);
targetPlayer.setPunishLevel(PunishmentType.CHAT, duration);
if (duration > 0)
{
banLengthStr = " for " + duration + " minutes";
@@ -167,7 +168,7 @@ public class AdminBan implements IAdminCommandHandler
{
if (targetPlayer.isChatBanned())
{
targetPlayer.setPunishLevel(Player.PunishLevel.NONE, 0);
targetPlayer.setPunishLevel(PunishmentType.NONE, 0);
activeChar.sendMessage(targetPlayer.getName() + "'s chat ban has now been lifted.");
auditAction(command, activeChar, targetPlayer.getName());
}
@@ -234,7 +235,7 @@ public class AdminBan implements IAdminCommandHandler
}
if (targetPlayer != null)
{
targetPlayer.setPunishLevel(Player.PunishLevel.JAIL, duration);
targetPlayer.setPunishLevel(PunishmentType.JAIL, duration);
BuilderUtil.sendSysMessage(activeChar, "Character " + targetPlayer.getName() + " jailed for " + (duration > 0 ? duration + " minutes." : "ever!"));
auditAction(command, activeChar, targetPlayer.getName());
if (targetPlayer.getParty() != null)
@@ -257,7 +258,7 @@ public class AdminBan implements IAdminCommandHandler
}
else if (targetPlayer != null)
{
targetPlayer.setPunishLevel(Player.PunishLevel.NONE, 0);
targetPlayer.setPunishLevel(PunishmentType.NONE, 0);
BuilderUtil.sendSysMessage(activeChar, "Character " + targetPlayer.getName() + " removed from jail");
auditAction(command, activeChar, targetPlayer.getName());
}
@@ -287,12 +288,12 @@ public class AdminBan implements IAdminCommandHandler
long value = 0;
if (ban)
{
level = Player.PunishLevel.CHAT.value();
level = PunishmentType.CHAT.value();
value = (delay > 0 ? delay * 60000 : 60000);
}
else
{
level = Player.PunishLevel.NONE.value();
level = PunishmentType.NONE.value();
value = 0;
}
@@ -333,7 +334,7 @@ public class AdminBan implements IAdminCommandHandler
statement.setInt(1, -114356);
statement.setInt(2, -249645);
statement.setInt(3, -2984);
statement.setInt(4, Player.PunishLevel.JAIL.value());
statement.setInt(4, PunishmentType.JAIL.value());
statement.setLong(5, (delay > 0 ? delay * 60000 : 0));
statement.setString(6, name);
statement.execute();

View File

@@ -19,10 +19,10 @@ package org.l2jmobius.gameserver.handler.admincommandhandlers;
import java.util.StringTokenizer;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import org.l2jmobius.gameserver.util.BuilderUtil;

View File

@@ -28,13 +28,13 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.handler.IItemHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Effect.EffectType;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;

View File

@@ -17,10 +17,11 @@
package org.l2jmobius.gameserver.handler.itemhandlers;
import org.l2jmobius.gameserver.handler.IItemHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.network.SystemMessageId;
@@ -133,7 +134,7 @@ public class Remedy implements IItemHandler
player.setImmobilized(false);
if (player.getFirstEffect(Effect.EffectType.ROOT) == null)
if (player.getFirstEffect(EffectType.ROOT) == null)
{
player.stopRooting(null);
}

View File

@@ -20,6 +20,7 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.data.sql.NpcTable;
import org.l2jmobius.gameserver.data.xml.SummonItemData;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.handler.IItemHandler;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.model.Skill;
@@ -217,7 +218,7 @@ public class SummonItems implements IItemHandler
_player.sendPacket(new MagicSkillLaunched(_player, 2046, 1));
// check for summon item validity
if ((_item == null) || (_item.getOwnerId() != _player.getObjectId()) || (_item.getItemLocation() != Item.ItemLocation.INVENTORY))
if ((_item == null) || (_item.getOwnerId() != _player.getObjectId()) || (_item.getItemLocation() != ItemLocation.INVENTORY))
{
return;
}

View File

@@ -21,12 +21,12 @@ import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Servitor;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.olympiad.Olympiad;

View File

@@ -19,11 +19,11 @@ package org.l2jmobius.gameserver.handler.skillhandlers;
import java.util.List;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.SkillType;
public class Charge implements ISkillHandler

View File

@@ -22,11 +22,11 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.siege.Castle;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.model.zone.ZoneId;

View File

@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.ai.CtrlEvent;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Attackable;
@@ -36,6 +35,7 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
import org.l2jmobius.gameserver.model.skill.SkillType;

View File

@@ -30,8 +30,6 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.xml.ExperienceData;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.handler.SkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Effect.EffectType;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Attackable;
@@ -41,6 +39,8 @@ import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummon;
import org.l2jmobius.gameserver.model.actor.tasks.player.CancelSkillRestoreTask;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
import org.l2jmobius.gameserver.model.skill.SkillType;

View File

@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.handler.skillhandlers;
import java.util.List;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
import org.l2jmobius.gameserver.model.skill.SkillType;

View File

@@ -22,7 +22,6 @@ import java.util.List;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -31,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.skill.BaseStat;
@@ -286,7 +287,7 @@ public class Pdam implements ISkillHandler
if ((skill.getId() == 345) || (skill.getId() == 346)) // Sonic Rage or Raging Force.
{
final EffectCharge effect = (EffectCharge) creature.getFirstEffect(Effect.EffectType.CHARGE);
final EffectCharge effect = (EffectCharge) creature.getFirstEffect(EffectType.CHARGE);
if (effect != null)
{
int effectcharge = effect.getLevel();

View File

@@ -26,6 +26,7 @@ import java.util.logging.Logger;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.data.sql.NpcTable;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.handler.AutoChatHandler;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -714,7 +715,7 @@ public class MercTicketManager
itemId = ITEM_IDS[i];
// create the ticket in the gameworld
final Item dropticket = new Item(IdManager.getInstance().getNextId(), itemId);
dropticket.setLocation(Item.ItemLocation.VOID);
dropticket.setLocation(ItemLocation.VOID);
dropticket.dropMe(null, x, y, z);
dropticket.setDropTime(0); // avoids it from beeing removed by the auto item destroyer
World.getInstance().storeObject(dropticket);
@@ -837,7 +838,7 @@ public class MercTicketManager
// create the ticket in the gameworld
final Item dropticket = new Item(IdManager.getInstance().getNextId(), itemId);
dropticket.setLocation(Item.ItemLocation.INVENTORY);
dropticket.setLocation(ItemLocation.INVENTORY);
dropticket.dropMe(null, x, y, z);
dropticket.setDropTime(0); // avoids it from beeing removed by the auto item destroyer
World.getInstance().storeObject(dropticket); // add to the world

View File

@@ -17,6 +17,7 @@
package org.l2jmobius.gameserver.model;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.CrestType;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
import org.l2jmobius.gameserver.network.serverpackets.AllyCrest;
@@ -28,37 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.PledgeCrest;
*/
public class Crest implements IIdentifiable
{
public enum CrestType
{
PLEDGE(1),
PLEDGE_LARGE(2),
ALLY(3);
private final int _id;
CrestType(int id)
{
_id = id;
}
public int getId()
{
return _id;
}
public static CrestType getById(int id)
{
for (CrestType crestType : values())
{
if (crestType.getId() == id)
{
return crestType;
}
}
return null;
}
}
private final int _id;
private final byte[] _data;
private final CrestType _type;

View File

@@ -20,6 +20,7 @@ import java.util.logging.Logger;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.effects.EffectForce;
/**

View File

@@ -43,8 +43,11 @@ import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.actor.instance.Servitor;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.clan.ClanMember;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.siege.Siege;
import org.l2jmobius.gameserver.model.skill.BaseStat;
import org.l2jmobius.gameserver.model.skill.ChanceCondition;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.model.skill.SkillOperateType;
@@ -284,7 +287,7 @@ public abstract class Skill
protected Condition _itemPreCondition;
protected FuncTemplate[] _funcTemplates;
private EffectTemplate[] _effectTemplates;
protected EffectTemplate[] _effectTemplatesSelf;
public EffectTemplate[] _effectTemplatesSelf;
private final boolean _nextActionIsAttack;
@@ -2498,10 +2501,10 @@ public abstract class Skill
if (e != null)
{
// Implements effect charge
if (e.getEffectType() == Effect.EffectType.CHARGE)
if (e.getEffectType() == EffectType.CHARGE)
{
env.skill = SkillTable.getInstance().getSkill(8, effector.getSkillLevel(8));
final EffectCharge effect = (EffectCharge) env.target.getFirstEffect(Effect.EffectType.CHARGE);
final EffectCharge effect = (EffectCharge) env.target.getFirstEffect(EffectType.CHARGE);
if (effect != null)
{
int effectcharge = effect.getLevel();

View File

@@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.ai.FortSiegeGuardAI;
import org.l2jmobius.gameserver.ai.SiegeGuardAI;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.xml.ManorSeedData;
import org.l2jmobius.gameserver.enums.AbsorbCrystalType;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.CommandChannel;
import org.l2jmobius.gameserver.model.DropCategory;
@@ -2206,7 +2207,7 @@ public class Attackable extends Npc
boolean isSuccess = true;
boolean doLevelup = true;
final boolean isBossMob = maxAbsorbLevel > 10;
final NpcTemplate.AbsorbCrystalType absorbType = getTemplate().getAbsorbType();
final AbsorbCrystalType absorbType = getTemplate().getAbsorbType();
final Player killer = attacker instanceof Summon ? ((Summon) attacker).getOwner() : (Player) attacker;
// If this mob is a boss, then skip some checkings
@@ -2256,11 +2257,11 @@ public class Attackable extends Npc
// 3- Everything is correct, but it failed. The crystal scatters. A sound event is played. (10%)
// 4- Everything is correct, the crystal level up. A sound event is played. (32.5%)
List<Player> players = new ArrayList<>();
if ((absorbType == NpcTemplate.AbsorbCrystalType.FULL_PARTY) && killer.isInParty())
if ((absorbType == AbsorbCrystalType.FULL_PARTY) && killer.isInParty())
{
players = killer.getParty().getPartyMembers();
}
else if ((absorbType == NpcTemplate.AbsorbCrystalType.PARTY_ONE_RANDOM) && killer.isInParty())
else if ((absorbType == AbsorbCrystalType.PARTY_ONE_RANDOM) && killer.isInParty())
{
// This is a naive method for selecting a random member. It gets any random party member and
// then checks if the member has a valid crystal. It does not select the random party member
@@ -2401,7 +2402,7 @@ public class Attackable extends Npc
final int chanceLevelUp = isBossMob ? 70 : SoulCrystal.LEVEL_CHANCE;
// If succeeds or it is a full party absorb, level up the crystal.
if (((absorbType == NpcTemplate.AbsorbCrystalType.FULL_PARTY) && doLevelup) || (dice <= chanceLevelUp))
if (((absorbType == AbsorbCrystalType.FULL_PARTY) && doLevelup) || (dice <= chanceLevelUp))
{
// Give staged crystal
exchangeCrystal(player, crystalOLD, crystalNEW, false);

View File

@@ -48,8 +48,6 @@ import org.l2jmobius.gameserver.handler.itemhandlers.Potions;
import org.l2jmobius.gameserver.instancemanager.DimensionalRiftManager;
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
import org.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
import org.l2jmobius.gameserver.model.ChanceSkillList;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.ForceBuff;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
@@ -76,6 +74,8 @@ import org.l2jmobius.gameserver.model.actor.stat.CreatureStat;
import org.l2jmobius.gameserver.model.actor.status.CreatureStatus;
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.holders.SkillUseHolder;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.instance.Item;
@@ -86,6 +86,7 @@ import org.l2jmobius.gameserver.model.quest.EventType;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skill.Calculator;
import org.l2jmobius.gameserver.model.skill.ChanceSkillList;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
import org.l2jmobius.gameserver.model.skill.SkillType;
@@ -2956,7 +2957,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if ((effect.getSkill().getId() == newEffect.getSkill().getId()) && (effect.getEffectType() == newEffect.getEffectType()) && (effect.getStackType().equals(newEffect.getStackType())))
{
if (((newEffect.getSkill().getSkillType() == SkillType.BUFF) || (newEffect.getEffectType() == Effect.EffectType.BUFF) || (newEffect.getEffectType() == Effect.EffectType.HEAL_OVER_TIME)) && (newEffect.getStackOrder() >= effect.getStackOrder()))
if (((newEffect.getSkill().getSkillType() == SkillType.BUFF) || (newEffect.getEffectType() == EffectType.BUFF) || (newEffect.getEffectType() == EffectType.HEAL_OVER_TIME)) && (newEffect.getStackOrder() >= effect.getStackOrder()))
{
effect.exit(false);
}
@@ -3338,7 +3339,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void stopBetray()
{
stopEffects(Effect.EffectType.BETRAY);
stopEffects(EffectType.BETRAY);
setBetrayed(false);
updateAbnormalEffect();
}
@@ -3383,7 +3384,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.IMMOBILEUNTILATTACKED);
stopEffects(EffectType.IMMOBILEUNTILATTACKED);
}
else
{
@@ -3410,7 +3411,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.CONFUSION);
stopEffects(EffectType.CONFUSION);
}
else
{
@@ -3460,7 +3461,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* <li>Update active skills in progress icones on player client</li><br>
* @param type The type of effect to stop ((ex : BUFF, DMG_OVER_TIME...)
*/
public void stopEffects(Effect.EffectType type)
public void stopEffects(EffectType type)
{
for (Effect effect : _effects)
{
@@ -3519,7 +3520,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.FAKE_DEATH);
stopEffects(EffectType.FAKE_DEATH);
}
else
{
@@ -3553,7 +3554,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.FEAR);
stopEffects(EffectType.FEAR);
}
else
{
@@ -3578,7 +3579,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.MUTE);
stopEffects(EffectType.MUTE);
}
else
{
@@ -3597,7 +3598,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.PSYCHICAL_MUTE);
stopEffects(EffectType.PSYCHICAL_MUTE);
}
else
{
@@ -3622,7 +3623,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.ROOT);
stopEffects(EffectType.ROOT);
}
else
{
@@ -3648,7 +3649,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (effect == null)
{
stopEffects(Effect.EffectType.SLEEP);
stopEffects(EffectType.SLEEP);
}
else
{
@@ -3679,7 +3680,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (effect == null)
{
stopEffects(Effect.EffectType.STUN);
stopEffects(EffectType.STUN);
}
else
{
@@ -3782,7 +3783,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
continue;
}
if ((effect.getEffectType() == Effect.EffectType.CHARGE) && (player != null))
if ((effect.getEffectType() == EffectType.CHARGE) && (player != null))
{
// handled by EtcStatusUpdate
continue;
@@ -4002,7 +4003,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* @param tp The Effect Type of skills whose effect must be returned
* @return The first Effect corresponding to the Effect Type
*/
public Effect getFirstEffect(Effect.EffectType tp)
public Effect getFirstEffect(EffectType tp)
{
Effect effNotInUse = null;
for (Effect effect : _effects)
@@ -4741,7 +4742,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public boolean isCastingNow()
{
final Effect mog = getFirstEffect(Effect.EffectType.SIGNET_GROUND);
final Effect mog = getFirstEffect(EffectType.SIGNET_GROUND);
if (mog != null)
{
return true;
@@ -4835,7 +4836,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
_forceBuff.onCastAbort();
}
final Effect mog = getFirstEffect(Effect.EffectType.SIGNET_GROUND);
final Effect mog = getFirstEffect(EffectType.SIGNET_GROUND);
if (mog != null)
{
mog.exit(true);
@@ -6968,7 +6969,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
return;
}
final Effect mog = getFirstEffect(Effect.EffectType.SIGNET_GROUND);
final Effect mog = getFirstEffect(EffectType.SIGNET_GROUND);
if (mog != null)
{
_skillCast = null;
@@ -7008,7 +7009,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
// If the skill is type STEALTH(ex: Dance of Shadow)
if (skill.isAbnormalEffectByName(ABNORMAL_EFFECT_STEALTH))
{
final Effect silentMove = target.getFirstEffect(Effect.EffectType.SILENT_MOVE);
final Effect silentMove = target.getFirstEffect(EffectType.SILENT_MOVE);
if (silentMove != null)
{
silentMove.exit(true);

View File

@@ -16,12 +16,13 @@
*/
package org.l2jmobius.gameserver.model.actor;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.knownlist.PlayableKnownList;
import org.l2jmobius.gameserver.model.actor.stat.PlayableStat;
import org.l2jmobius.gameserver.model.actor.status.PlayableStatus;
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
/**
* This class represents all Playable characters in the world.<br>
@@ -239,7 +240,7 @@ public abstract class Playable extends Creature
if (effect == null)
{
stopEffects(Effect.EffectType.NOBLESSE_BLESSING);
stopEffects(EffectType.NOBLESSE_BLESSING);
}
else
{
@@ -296,7 +297,7 @@ public abstract class Playable extends Creature
if (effect == null)
{
stopEffects(Effect.EffectType.PROTECTION_BLESSING);
stopEffects(EffectType.PROTECTION_BLESSING);
}
else
{
@@ -353,7 +354,7 @@ public abstract class Playable extends Creature
if (effect == null)
{
stopEffects(Effect.EffectType.PHOENIX_BLESSING);
stopEffects(EffectType.PHOENIX_BLESSING);
}
else
{
@@ -432,7 +433,7 @@ public abstract class Playable extends Creature
if (effect == null)
{
stopEffects(Effect.EffectType.CHARM_OF_LUCK);
stopEffects(EffectType.CHARM_OF_LUCK);
}
else
{

View File

@@ -63,6 +63,7 @@ import org.l2jmobius.gameserver.data.xml.RecipeData;
import org.l2jmobius.gameserver.data.xml.ZoneData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.ClassId;
import org.l2jmobius.gameserver.enums.PunishmentType;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.enums.TeleportWhereType;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
@@ -83,7 +84,6 @@ import org.l2jmobius.gameserver.instancemanager.RecipeManager;
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
import org.l2jmobius.gameserver.model.AccessLevel;
import org.l2jmobius.gameserver.model.BlockList;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Fish;
import org.l2jmobius.gameserver.model.Fishing;
import org.l2jmobius.gameserver.model.Location;
@@ -124,6 +124,8 @@ import org.l2jmobius.gameserver.model.actor.status.PlayerStatus;
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.clan.ClanMember;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.holders.PlayerStatsHolder;
import org.l2jmobius.gameserver.model.holders.SkillUseHolder;
@@ -473,7 +475,7 @@ public class Player extends Playable
private volatile int _fallingDamage = 0;
private Future<?> _fallingDamageTask = null;
private final Location _lastPartyPosition = new Location(0, 0, 0);
private PunishLevel _punishLevel = PunishLevel.NONE;
private PunishmentType _punishLevel = PunishmentType.NONE;
private long _punishTimer = 0;
private ScheduledFuture<?> _punishTask;
private final GatesRequest _gatesRequest = new GatesRequest();
@@ -3097,7 +3099,7 @@ public class Player extends Playable
if (_relax)
{
setRelax(false);
stopEffects(Effect.EffectType.RELAXING);
stopEffects(EffectType.RELAXING);
}
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_STANDING));
@@ -7546,7 +7548,7 @@ public class Player extends Playable
player.setLvlJoinedAcademy(rset.getInt("lvl_joined_academy"));
player.setIn7sDungeon(rset.getInt("isin7sdungeon") == 1);
player.setPunishLevel(rset.getInt("punish_level"));
if (player.getPunishLevel() != PunishLevel.NONE)
if (player.getPunishLevel() != PunishmentType.NONE)
{
player.setPunishTimer(rset.getLong("punish_timer"));
}
@@ -9415,7 +9417,7 @@ public class Player extends Playable
if ((skill.getNumCharges() > 0) && (skill.getSkillType() != SkillType.CHARGE) && (skill.getSkillType() != SkillType.CHARGEDAM) && (skill.getSkillType() != SkillType.CHARGE_EFFECT) && (skill.getSkillType() != SkillType.PDAM))
{
final EffectCharge effect = (EffectCharge) getFirstEffect(Effect.EffectType.CHARGE);
final EffectCharge effect = (EffectCharge) getFirstEffect(EffectType.CHARGE);
if ((effect == null) || (effect.numCharges < skill.getNumCharges()))
{
sendPacket(new SystemMessage(SystemMessageId.S1_IS_NOT_AVAILABLE_AT_THIS_TIME_BEING_PREPARED_FOR_REUSE).addSkillName(skillId));
@@ -14677,39 +14679,6 @@ public class Player extends Playable
_isStored = a;
}
public enum PunishLevel
{
NONE(0, ""),
CHAT(1, "chat banned"),
JAIL(2, "jailed"),
CHAR(3, "banned"),
ACC(4, "banned");
private final int punValue;
private final String punString;
/**
* Instantiates a new punish level.
* @param value the value
* @param string the string
*/
PunishLevel(int value, String string)
{
punValue = value;
punString = string;
}
public int value()
{
return punValue;
}
public String string()
{
return punString;
}
}
private static class GatesRequest
{
private Door _target = null;
@@ -14757,7 +14726,7 @@ public class Player extends Playable
* returns punishment level of player.
* @return the punish level
*/
public PunishLevel getPunishLevel()
public PunishmentType getPunishLevel()
{
return _punishLevel;
}
@@ -14768,7 +14737,7 @@ public class Player extends Playable
*/
public boolean isInJail()
{
return _punishLevel == PunishLevel.JAIL;
return _punishLevel == PunishmentType.JAIL;
}
/**
@@ -14777,7 +14746,7 @@ public class Player extends Playable
*/
public boolean isChatBanned()
{
return _punishLevel == PunishLevel.CHAT;
return _punishLevel == PunishmentType.CHAT;
}
/**
@@ -14790,27 +14759,27 @@ public class Player extends Playable
{
case 0:
{
_punishLevel = PunishLevel.NONE;
_punishLevel = PunishmentType.NONE;
break;
}
case 1:
{
_punishLevel = PunishLevel.CHAT;
_punishLevel = PunishmentType.CHAT;
break;
}
case 2:
{
_punishLevel = PunishLevel.JAIL;
_punishLevel = PunishmentType.JAIL;
break;
}
case 3:
{
_punishLevel = PunishLevel.CHAR;
_punishLevel = PunishmentType.CHAR;
break;
}
case 4:
{
_punishLevel = PunishLevel.ACC;
_punishLevel = PunishmentType.ACC;
break;
}
}
@@ -14821,7 +14790,7 @@ public class Player extends Playable
* @param state the state
* @param delayInMinutes the delay in minutes
*/
public void setPunishLevel(PunishLevel state, int delayInMinutes)
public void setPunishLevel(PunishmentType state, int delayInMinutes)
{
final long delayInMilliseconds = delayInMinutes * 60000;
setPunishLevel(state, delayInMilliseconds);
@@ -14832,7 +14801,7 @@ public class Player extends Playable
* @param state the state
* @param delayInMilliseconds 0 - Indefinite
*/
public void setPunishLevel(PunishLevel state, long delayInMilliseconds)
public void setPunishLevel(PunishmentType state, long delayInMilliseconds)
{
switch (state)
{
@@ -14872,7 +14841,7 @@ public class Player extends Playable
case CHAT: // Chat Ban
{
// not allow player to escape jail using chat ban
if (_punishLevel == PunishLevel.JAIL)
if (_punishLevel == PunishmentType.JAIL)
{
break;
}
@@ -14982,7 +14951,7 @@ public class Player extends Playable
*/
private void updatePunishState()
{
if (getPunishLevel() != PunishLevel.NONE)
if (getPunishLevel() != PunishmentType.NONE)
{
// If punish timer exists, restart punishtask.
if (_punishTimer > 0)
@@ -14991,7 +14960,7 @@ public class Player extends Playable
sendMessage("You are still " + getPunishLevel().string() + " for " + (_punishTimer / 60000) + " minutes.");
}
// If player escaped, put him back in jail
if ((getPunishLevel() == PunishLevel.JAIL) && !isInsideZone(ZoneId.JAIL))
if ((getPunishLevel() == PunishmentType.JAIL) && !isInsideZone(ZoneId.JAIL))
{
teleToLocation(MapRegionData.JAIL_LOCATION, false);
}
@@ -15036,7 +15005,7 @@ public class Player extends Playable
@Override
public void run()
{
_player.setPunishLevel(PunishLevel.NONE, 0);
_player.setPunishLevel(PunishmentType.NONE, 0);
}
}

View File

@@ -16,10 +16,10 @@
*/
package org.l2jmobius.gameserver.model.actor.instance;
import org.l2jmobius.gameserver.model.Effect.EffectType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.sevensigns.SevenSigns;
import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;

View File

@@ -28,13 +28,13 @@ import org.l2jmobius.gameserver.ai.CtrlEvent;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.handler.SkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.olympiad.Olympiad;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.model.skill.SkillType;

View File

@@ -21,6 +21,7 @@ import java.util.StringTokenizer;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.data.sql.SkillTreeTable;
import org.l2jmobius.gameserver.instancemanager.TradeManager;
import org.l2jmobius.gameserver.enums.SkillAquireType;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.SkillLearn;
import org.l2jmobius.gameserver.model.StoreTradeList;
@@ -117,7 +118,7 @@ public class Fisherman extends Folk
public void showSkillList(Player player)
{
final AquireSkillList asl = new AquireSkillList(AquireSkillList.skillType.Fishing);
final AquireSkillList asl = new AquireSkillList(SkillAquireType.FISHING);
int counts = 0;
for (SkillLearn s : SkillTreeTable.getInstance().getAvailableSkills(player))
{

View File

@@ -22,6 +22,7 @@ import org.l2jmobius.Config;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.data.sql.SkillTreeTable;
import org.l2jmobius.gameserver.enums.ClassId;
import org.l2jmobius.gameserver.enums.SkillAquireType;
import org.l2jmobius.gameserver.model.EnchantSkillLearn;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.SkillLearn;
@@ -98,7 +99,7 @@ public class Folk extends Npc
return;
}
final AquireSkillList asl = new AquireSkillList(AquireSkillList.skillType.Usual);
final AquireSkillList asl = new AquireSkillList(SkillAquireType.USUAL);
int counts = 0;
for (SkillLearn s : SkillTreeTable.getInstance().getAvailableSkills(player, classId))
{

View File

@@ -27,6 +27,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.sql.PetDataTable;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.model.PetData;
@@ -335,7 +336,7 @@ public class Pet extends Summon
{
for (Item item : _inventory.getItems())
{
if ((item.getItemLocation() == Item.ItemLocation.PET_EQUIP) && (item.getItem().getBodyPart() == ItemTemplate.SLOT_R_HAND))
if ((item.getItemLocation() == ItemLocation.PET_EQUIP) && (item.getItem().getBodyPart() == ItemTemplate.SLOT_R_HAND))
{
return item;
}

View File

@@ -18,12 +18,12 @@ package org.l2jmobius.gameserver.model.actor.instance;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
import org.l2jmobius.gameserver.model.SiegeClan;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.siege.Siege;
import org.l2jmobius.gameserver.model.siege.SiegeClan;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;

View File

@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.enums.ClassId;
import org.l2jmobius.gameserver.enums.ClassType;
import org.l2jmobius.gameserver.enums.PlayerClass;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.enums.SkillAquireType;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.FortManager;
import org.l2jmobius.gameserver.instancemanager.FortSiegeManager;
@@ -1025,7 +1026,7 @@ public class VillageMaster extends Folk
return;
}
final AquireSkillList asl = new AquireSkillList(AquireSkillList.skillType.Clan);
final AquireSkillList asl = new AquireSkillList(SkillAquireType.CLAN);
int counts = 0;
for (PledgeSkillLearn s : SkillTreeTable.getInstance().getAvailablePledgeSkills(player))
{

View File

@@ -24,7 +24,9 @@ import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import org.l2jmobius.gameserver.enums.AbsorbCrystalType;
import org.l2jmobius.gameserver.enums.ClassId;
import org.l2jmobius.gameserver.enums.NpcRace;
import org.l2jmobius.gameserver.model.DropCategory;
import org.l2jmobius.gameserver.model.DropData;
import org.l2jmobius.gameserver.model.MinionData;
@@ -75,45 +77,10 @@ public class NpcTemplate extends CreatureTemplate
private final AbsorbCrystalType _absorbType;
private String _factionId;
private final int _factionRange;
private Race _race;
private NpcRace _race;
private final boolean _custom;
public enum AbsorbCrystalType
{
LAST_HIT,
FULL_PARTY,
PARTY_ONE_RANDOM
}
public enum Race
{
UNDEAD,
MAGICCREATURE,
BEAST,
ANIMAL,
PLANT,
HUMANOID,
SPIRIT,
ANGEL,
DEMON,
DRAGON,
GIANT,
BUG,
FAIRIE,
HUMAN,
ELVE,
DARKELVE,
ORC,
DWARVE,
OTHER,
NONLIVING,
SIEGEWEAPON,
DEFENDINGARMY,
MERCENARIE,
UNKNOWN
}
private final StatSet _npcStatSet;
/** The table containing all Item that can be dropped by Npc using this NpcTemplate */
@@ -363,132 +330,132 @@ public class NpcTemplate extends CreatureTemplate
{
case 1:
{
_race = Race.UNDEAD;
_race = NpcRace.UNDEAD;
break;
}
case 2:
{
_race = Race.MAGICCREATURE;
_race = NpcRace.MAGICCREATURE;
break;
}
case 3:
{
_race = Race.BEAST;
_race = NpcRace.BEAST;
break;
}
case 4:
{
_race = Race.ANIMAL;
_race = NpcRace.ANIMAL;
break;
}
case 5:
{
_race = Race.PLANT;
_race = NpcRace.PLANT;
break;
}
case 6:
{
_race = Race.HUMANOID;
_race = NpcRace.HUMANOID;
break;
}
case 7:
{
_race = Race.SPIRIT;
_race = NpcRace.SPIRIT;
break;
}
case 8:
{
_race = Race.ANGEL;
_race = NpcRace.ANGEL;
break;
}
case 9:
{
_race = Race.DEMON;
_race = NpcRace.DEMON;
break;
}
case 10:
{
_race = Race.DRAGON;
_race = NpcRace.DRAGON;
break;
}
case 11:
{
_race = Race.GIANT;
_race = NpcRace.GIANT;
break;
}
case 12:
{
_race = Race.BUG;
_race = NpcRace.BUG;
break;
}
case 13:
{
_race = Race.FAIRIE;
_race = NpcRace.FAIRIE;
break;
}
case 14:
{
_race = Race.HUMAN;
_race = NpcRace.HUMAN;
break;
}
case 15:
{
_race = Race.ELVE;
_race = NpcRace.ELVE;
break;
}
case 16:
{
_race = Race.DARKELVE;
_race = NpcRace.DARKELVE;
break;
}
case 17:
{
_race = Race.ORC;
_race = NpcRace.ORC;
break;
}
case 18:
{
_race = Race.DWARVE;
_race = NpcRace.DWARVE;
break;
}
case 19:
{
_race = Race.OTHER;
_race = NpcRace.OTHER;
break;
}
case 20:
{
_race = Race.NONLIVING;
_race = NpcRace.NONLIVING;
break;
}
case 21:
{
_race = Race.SIEGEWEAPON;
_race = NpcRace.SIEGEWEAPON;
break;
}
case 22:
{
_race = Race.DEFENDINGARMY;
_race = NpcRace.DEFENDINGARMY;
break;
}
case 23:
{
_race = Race.MERCENARIE;
_race = NpcRace.MERCENARIE;
break;
}
default:
{
_race = Race.UNKNOWN;
_race = NpcRace.UNKNOWN;
break;
}
}
}
public Race getRace()
public NpcRace getRace()
{
if (_race == null)
{
_race = Race.UNKNOWN;
_race = NpcRace.UNKNOWN;
}
return _race;
}

View File

@@ -14,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 org.l2jmobius.gameserver.model;
package org.l2jmobius.gameserver.model.effects;
import java.util.ArrayList;
import java.util.Collections;
@@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.skill.Env;
@@ -43,69 +44,6 @@ public abstract class Effect
{
static final Logger LOGGER = Logger.getLogger(Effect.class.getName());
public enum EffectState
{
CREATED,
ACTING,
FINISHING
}
public enum EffectType
{
BUFF,
DEBUFF,
CHARGE,
DMG_OVER_TIME,
HEAL_OVER_TIME,
COMBAT_POINT_HEAL_OVER_TIME,
MANA_DMG_OVER_TIME,
MANA_HEAL_OVER_TIME,
MP_CONSUME_PER_LEVEL,
RELAXING,
STUN,
ROOT,
SLEEP,
HATE,
FAKE_DEATH,
CONFUSION,
CONFUSE_MOB_ONLY,
MUTE,
IMMOBILEUNTILATTACKED,
FEAR,
SALVATION,
SILENT_MOVE,
SIGNET_EFFECT,
SIGNET_GROUND,
SEED,
PARALYZE,
STUN_SELF,
PSYCHICAL_MUTE,
REMOVE_TARGET,
TARGET_ME,
SILENCE_MAGIC_PHYSICAL,
BETRAY,
NOBLESSE_BLESSING,
PHOENIX_BLESSING,
PETRIFICATION,
BLUFF,
BATTLE_FORCE,
SPELL_FORCE,
CHARM_OF_LUCK,
INVINCIBLE,
PROTECTION_BLESSING,
INTERRUPT,
MEDITATION,
BLOW,
FUSION,
CANCEL,
BLOCK_BUFF,
BLOCK_DEBUFF,
PREVENT_BUFF,
CLAN_GATE,
NEGATE,
HERO_CANCEL
}
// member _effector is the instance of Creature that cast/used the spell/skill that is causing this effect. Do not confuse with the instance of Creature that is being affected by this effect.
private final Creature _effector;

View File

@@ -0,0 +1,24 @@
/*
* 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 org.l2jmobius.gameserver.model.effects;
public enum EffectState
{
CREATED,
ACTING,
FINISHING
}

View File

@@ -0,0 +1,77 @@
/*
* 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 org.l2jmobius.gameserver.model.effects;
/**
* Effect types.
* @author nBd
*/
public enum EffectType
{
BUFF,
DEBUFF,
CHARGE,
DMG_OVER_TIME,
HEAL_OVER_TIME,
COMBAT_POINT_HEAL_OVER_TIME,
MANA_DMG_OVER_TIME,
MANA_HEAL_OVER_TIME,
MP_CONSUME_PER_LEVEL,
RELAXING,
STUN,
ROOT,
SLEEP,
HATE,
FAKE_DEATH,
CONFUSION,
CONFUSE_MOB_ONLY,
MUTE,
IMMOBILEUNTILATTACKED,
FEAR,
SALVATION,
SILENT_MOVE,
SIGNET_EFFECT,
SIGNET_GROUND,
SEED,
PARALYZE,
STUN_SELF,
PSYCHICAL_MUTE,
REMOVE_TARGET,
TARGET_ME,
SILENCE_MAGIC_PHYSICAL,
BETRAY,
NOBLESSE_BLESSING,
PHOENIX_BLESSING,
PETRIFICATION,
BLUFF,
BATTLE_FORCE,
SPELL_FORCE,
CHARM_OF_LUCK,
INVINCIBLE,
PROTECTION_BLESSING,
INTERRUPT,
MEDITATION,
BLOW,
FUSION,
CANCEL,
BLOCK_BUFF,
BLOCK_DEBUFF,
PREVENT_BUFF,
CLAN_GATE,
NEGATE,
HERO_CANCEL
}

View File

@@ -21,10 +21,10 @@ import java.util.Collections;
import java.util.List;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.skill.Env;

View File

@@ -23,12 +23,12 @@ import java.util.List;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.handler.SkillHandler;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.type.WeaponType;
import org.l2jmobius.gameserver.model.quest.EventType;

View File

@@ -30,6 +30,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.util.Chronos;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import org.l2jmobius.gameserver.model.DropProtection;
@@ -63,22 +64,6 @@ public class Item extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
/**
* Enumeration of locations for item.
*/
public enum ItemLocation
{
VOID,
INVENTORY,
PAPERDOLL,
WAREHOUSE,
CLANWH,
PET,
PET_EQUIP,
LEASE,
FREIGHT
}
/** Owner */
private int _ownerId;
private Player _owner;

View File

@@ -17,9 +17,9 @@
package org.l2jmobius.gameserver.model.itemcontainer;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
public class ClanWarehouse extends Warehouse
{

View File

@@ -26,6 +26,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.data.xml.ArmorSetData;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.ArmorSet;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.World;
@@ -36,7 +37,6 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
import org.l2jmobius.gameserver.model.item.type.WeaponType;

View File

@@ -30,13 +30,13 @@ import java.util.logging.Logger;
import org.l2jmobius.Config;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
/**
* @author Advi

View File

@@ -16,8 +16,8 @@
*/
package org.l2jmobius.gameserver.model.itemcontainer;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
public class PetInventory extends Inventory
{

View File

@@ -20,9 +20,9 @@ import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
public class PlayerFreight extends ItemContainer
{

View File

@@ -23,13 +23,13 @@ import java.util.LinkedList;
import java.util.List;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.TradeList;
import org.l2jmobius.gameserver.model.TradeList.TradeItem;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
import org.l2jmobius.gameserver.model.item.type.EtcItemType;
public class PlayerInventory extends Inventory

View File

@@ -16,8 +16,8 @@
*/
package org.l2jmobius.gameserver.model.itemcontainer;
import org.l2jmobius.gameserver.enums.ItemLocation;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.item.instance.Item.ItemLocation;
public class PlayerWarehouse extends Warehouse
{

View File

@@ -58,16 +58,6 @@ public class ClanHallAuction
private int _startingBid = 0;
private final Map<Integer, Bidder> _bidders = new HashMap<>();
private static final String[] ItemTypeName =
{
"ClanHall"
};
public enum ItemTypeEnum
{
ClanHall
}
public class Bidder
{
private final String _name;
@@ -280,16 +270,6 @@ public class ClanHallAuction
ThreadPool.schedule(new AutoEndTask(), taskDelay);
}
/**
* Gets the item type name.
* @param value the value
* @return the item type name
*/
public static String getItemTypeName(ItemTypeEnum value)
{
return ItemTypeName[value.ordinal()];
}
/**
* Save Auction Data End.
*/

View File

@@ -28,14 +28,13 @@ import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.data.sql.NpcTable;
import org.l2jmobius.gameserver.enums.FortTeleportWhoType;
import org.l2jmobius.gameserver.enums.TeleportWhereType;
import org.l2jmobius.gameserver.instancemanager.FortSiegeGuardManager;
import org.l2jmobius.gameserver.instancemanager.FortSiegeManager;
import org.l2jmobius.gameserver.instancemanager.FortSiegeManager.SiegeSpawn;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.MercTicketManager;
import org.l2jmobius.gameserver.model.SiegeClan;
import org.l2jmobius.gameserver.model.SiegeClan.SiegeClanType;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Npc;
@@ -59,15 +58,6 @@ public class FortSiege
{
protected static final Logger LOGGER = Logger.getLogger(FortSiege.class.getName());
public enum TeleportWhoType
{
All,
Attacker,
DefenderNotOwner,
Owner,
Spectator
}
public class ScheduleEndSiegeTask implements Runnable
{
/** The _fort inst. */
@@ -252,13 +242,13 @@ public class FortSiege
unSpawnFlags();
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.Attacker, TeleportWhereType.TOWN);
teleportPlayer(FortTeleportWhoType.Attacker, TeleportWhereType.TOWN);
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.DefenderNotOwner, TeleportWhereType.TOWN);
teleportPlayer(FortTeleportWhoType.DefenderNotOwner, TeleportWhereType.TOWN);
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.Spectator, TeleportWhereType.TOWN);
teleportPlayer(FortTeleportWhoType.Spectator, TeleportWhereType.TOWN);
// Flag so that siege instance can be started
_isInProgress = false;
@@ -398,7 +388,7 @@ public class FortSiege
updatePlayerSiegeStateFlags(false);
// Teleport to the closest town
teleportPlayer(TeleportWhoType.Attacker, TeleportWhereType.TOWN);
teleportPlayer(FortTeleportWhoType.Attacker, TeleportWhereType.TOWN);
// Spawn commander
spawnCommander(getFort().getFortId());
@@ -970,7 +960,7 @@ public class FortSiege
* @param teleportWho the teleport who
* @param teleportWhere the teleport where
*/
public void teleportPlayer(TeleportWhoType teleportWho, TeleportWhereType teleportWhere)
public void teleportPlayer(FortTeleportWhoType teleportWho, TeleportWhereType teleportWhere)
{
List<Player> players;
switch (teleportWho)

View File

@@ -33,14 +33,13 @@ import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Chronos;
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.data.sql.NpcTable;
import org.l2jmobius.gameserver.enums.SiegeTeleportWhoType;
import org.l2jmobius.gameserver.enums.TeleportWhereType;
import org.l2jmobius.gameserver.instancemanager.IdManager;
import org.l2jmobius.gameserver.instancemanager.MercTicketManager;
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
import org.l2jmobius.gameserver.instancemanager.SiegeManager.SiegeSpawn;
import org.l2jmobius.gameserver.model.SiegeClan;
import org.l2jmobius.gameserver.model.SiegeClan.SiegeClanType;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Npc;
@@ -104,15 +103,6 @@ public class Siege
protected static final Logger LOGGER = Logger.getLogger(Siege.class.getName());
private final SimpleDateFormat fmt = new SimpleDateFormat("H:mm.");
public enum TeleportWhoType
{
All,
Attacker,
DefenderNotOwner,
Owner,
Spectator
}
private int _controlTowerCount;
private int _controlTowerMaxCount;
@@ -327,13 +317,13 @@ public class Siege
removeFlags();
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.Attacker, TeleportWhereType.TOWN);
teleportPlayer(SiegeTeleportWhoType.Attacker, TeleportWhereType.TOWN);
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.DefenderNotOwner, TeleportWhereType.TOWN);
teleportPlayer(SiegeTeleportWhoType.DefenderNotOwner, TeleportWhereType.TOWN);
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.Spectator, TeleportWhereType.TOWN);
teleportPlayer(SiegeTeleportWhoType.Spectator, TeleportWhereType.TOWN);
// Flag so that siege instance can be started
_isInProgress = false;
@@ -499,10 +489,10 @@ public class Siege
}
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.Attacker, TeleportWhereType.SIEGEFLAG);
teleportPlayer(SiegeTeleportWhoType.Attacker, TeleportWhereType.SIEGEFLAG);
// Teleport to the second closest town
teleportPlayer(TeleportWhoType.Spectator, TeleportWhereType.TOWN);
teleportPlayer(SiegeTeleportWhoType.Spectator, TeleportWhereType.TOWN);
// Removes defenders' flags
removeDefenderFlags();
@@ -560,7 +550,7 @@ public class Siege
updatePlayerSiegeStateFlags(false);
// Teleport to the closest town
teleportPlayer(TeleportWhoType.Attacker, TeleportWhereType.TOWN);
teleportPlayer(SiegeTeleportWhoType.Attacker, TeleportWhereType.TOWN);
_controlTowerCount = 0;
_controlTowerMaxCount = 0;
@@ -1092,7 +1082,7 @@ public class Siege
* @param teleportWho the teleport who
* @param teleportWhere the teleport where
*/
public void teleportPlayer(TeleportWhoType teleportWho, TeleportWhereType teleportWhere)
public void teleportPlayer(SiegeTeleportWhoType teleportWho, TeleportWhereType teleportWhere)
{
List<Player> players;
switch (teleportWho)

View File

@@ -14,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 org.l2jmobius.gameserver.model;
package org.l2jmobius.gameserver.model.siege;
import java.util.ArrayList;
import java.util.List;
@@ -28,14 +28,6 @@ public class SiegeClan
private int _numFlagsAdded = 0;
private SiegeClanType _type;
public enum SiegeClanType
{
OWNER,
DEFENDER,
ATTACKER,
DEFENDER_PENDING
}
public SiegeClan(int clanId, SiegeClanType type)
{
_clanId = clanId;

View File

@@ -0,0 +1,25 @@
/*
* 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 org.l2jmobius.gameserver.model.siege;
public enum SiegeClanType
{
OWNER,
DEFENDER,
ATTACKER,
DEFENDER_PENDING
}

View File

@@ -14,9 +14,10 @@
* 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 org.l2jmobius.gameserver.model;
package org.l2jmobius.gameserver.model.skill;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.StatSet;
/**
* @author kombat
@@ -37,53 +38,11 @@ public class ChanceCondition
public static final int EVT_HIT_BY_OFFENSIVE_SKILL = 2048;
public static final int EVT_HIT_BY_GOOD_MAGIC = 4096;
public enum TriggerType
{
// You hit an enemy
ON_HIT(1),
// You hit an enemy - was crit
ON_CRIT(2),
// You cast a skill
ON_CAST(4),
// You cast a skill - it was a physical one
ON_PHYSICAL(8),
// You cast a skill - it was a magic one
ON_MAGIC(16),
// You cast a skill - it was a magic one - good magic
ON_MAGIC_GOOD(32),
// You cast a skill - it was a magic one - offensive magic
ON_MAGIC_OFFENSIVE(64),
// You are attacked by enemy
ON_ATTACKED(128),
// You are attacked by enemy - by hit
ON_ATTACKED_HIT(256),
// You are attacked by enemy - by hit - was crit
ON_ATTACKED_CRIT(512),
// A skill was casted on you
ON_HIT_BY_SKILL(1024),
// An evil skill was casted on you
ON_HIT_BY_OFFENSIVE_SKILL(2048),
// A good skill was casted on you
ON_HIT_BY_GOOD_MAGIC(4096);
private int _mask;
private TriggerType(int mask)
{
_mask = mask;
}
public boolean check(int event)
{
return (_mask & event) != 0; // Trigger (sub-)type contains event (sub-)type
}
}
private final TriggerType _triggerType;
private final ChanceConditionType _triggerType;
private final int _chance;
private ChanceCondition(TriggerType trigger, int chance)
private ChanceCondition(ChanceConditionType trigger, int chance)
{
_triggerType = trigger;
_chance = chance;
@@ -93,7 +52,7 @@ public class ChanceCondition
{
try
{
final TriggerType trigger = set.getEnum("chanceType", TriggerType.class);
final ChanceConditionType trigger = set.getEnum("chanceType", ChanceConditionType.class);
final int chance = set.getInt("activationChance", 0);
if ((trigger != null) && (chance > 0))
{

View File

@@ -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 org.l2jmobius.gameserver.model.skill;
public enum ChanceConditionType
{
// You hit an enemy
ON_HIT(1),
// You hit an enemy - was crit
ON_CRIT(2),
// You cast a skill
ON_CAST(4),
// You cast a skill - it was a physical one
ON_PHYSICAL(8),
// You cast a skill - it was a magic one
ON_MAGIC(16),
// You cast a skill - it was a magic one - good magic
ON_MAGIC_GOOD(32),
// You cast a skill - it was a magic one - offensive magic
ON_MAGIC_OFFENSIVE(64),
// You are attacked by enemy
ON_ATTACKED(128),
// You are attacked by enemy - by hit
ON_ATTACKED_HIT(256),
// You are attacked by enemy - by hit - was crit
ON_ATTACKED_CRIT(512),
// A skill was casted on you
ON_HIT_BY_SKILL(1024),
// An evil skill was casted on you
ON_HIT_BY_OFFENSIVE_SKILL(2048),
// A good skill was casted on you
ON_HIT_BY_GOOD_MAGIC(4096);
private int _mask;
private ChanceConditionType(int mask)
{
_mask = mask;
}
public boolean check(int event)
{
return (_mask & event) != 0; // Trigger (sub-)type contains event (sub-)type
}
}

View File

@@ -14,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 org.l2jmobius.gameserver.model;
package org.l2jmobius.gameserver.model.skill;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.handler.ISkillHandler;
import org.l2jmobius.gameserver.handler.SkillHandler;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.skill.Formulas;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillLaunched;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;

View File

@@ -21,10 +21,10 @@ import java.util.logging.Logger;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.sql.ClanHallTable;
import org.l2jmobius.gameserver.enums.NpcRace;
import org.l2jmobius.gameserver.enums.PlayerState;
import org.l2jmobius.gameserver.instancemanager.ClassDamageManager;
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.SiegeClan;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
@@ -34,8 +34,8 @@ import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.actor.instance.Cubic;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.actor.instance.Pet;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.item.Armor;
import org.l2jmobius.gameserver.model.item.ItemTemplate;
import org.l2jmobius.gameserver.model.item.Weapon;
@@ -46,8 +46,8 @@ import org.l2jmobius.gameserver.model.residences.ClanHall;
import org.l2jmobius.gameserver.model.sevensigns.SevenSigns;
import org.l2jmobius.gameserver.model.sevensigns.SevenSignsFestival;
import org.l2jmobius.gameserver.model.siege.Siege;
import org.l2jmobius.gameserver.model.siege.SiegeClan;
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerState;
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerState.CheckPlayerState;
import org.l2jmobius.gameserver.model.skill.conditions.ConditionUsingItemType;
import org.l2jmobius.gameserver.model.skill.effects.EffectTemplate;
import org.l2jmobius.gameserver.model.skill.funcs.Func;
@@ -143,7 +143,7 @@ public class Formulas
private FuncMultRegenResting(Stat pStat)
{
super(pStat, 0x20, null);
setCondition(new ConditionPlayerState(CheckPlayerState.RESTING, true));
setCondition(new ConditionPlayerState(PlayerState.RESTING, true));
}
/**
@@ -1541,32 +1541,32 @@ public class Formulas
if (attacker instanceof Npc)
{
// Skill Race : Undead
if (((Npc) attacker).getTemplate().getRace() == NpcTemplate.Race.UNDEAD)
if (((Npc) attacker).getTemplate().getRace() == NpcRace.UNDEAD)
{
damage /= attacker.getPDefUndead(target);
}
if (((Npc) attacker).getTemplate().getRace() == NpcTemplate.Race.PLANT)
if (((Npc) attacker).getTemplate().getRace() == NpcRace.PLANT)
{
damage /= attacker.getPDefPlants(target);
}
if (((Npc) attacker).getTemplate().getRace() == NpcTemplate.Race.BUG)
if (((Npc) attacker).getTemplate().getRace() == NpcRace.BUG)
{
damage /= attacker.getPDefInsects(target);
}
if (((Npc) attacker).getTemplate().getRace() == NpcTemplate.Race.ANIMAL)
if (((Npc) attacker).getTemplate().getRace() == NpcRace.ANIMAL)
{
damage /= attacker.getPDefAnimals(target);
}
if (((Npc) attacker).getTemplate().getRace() == NpcTemplate.Race.BEAST)
if (((Npc) attacker).getTemplate().getRace() == NpcRace.BEAST)
{
damage /= attacker.getPDefMonsters(target);
}
if (((Npc) attacker).getTemplate().getRace() == NpcTemplate.Race.DRAGON)
if (((Npc) attacker).getTemplate().getRace() == NpcRace.DRAGON)
{
damage /= attacker.getPDefDragons(target);
}

View File

@@ -16,7 +16,7 @@
*/
package org.l2jmobius.gameserver.model.skill.conditions;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.effects.EffectBattleForce;
import org.l2jmobius.gameserver.model.skill.effects.EffectSpellForce;

View File

@@ -24,30 +24,16 @@ import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
*/
public class ConditionGameTime extends Condition
{
public enum CheckGameTime
{
NIGHT
}
private final CheckGameTime _check;
private final boolean _required;
public ConditionGameTime(CheckGameTime check, boolean required)
public ConditionGameTime(boolean required)
{
_check = check;
_required = required;
}
@Override
public boolean testImpl(Env env)
{
switch (_check)
{
case NIGHT:
{
return GameTimeTaskManager.getInstance().isNight() == _required;
}
}
return !_required;
return GameTimeTaskManager.getInstance().isNight() == _required;
}
}

View File

@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.skill.conditions;
import org.l2jmobius.gameserver.enums.PlayerState;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.skill.Env;
@@ -24,21 +25,10 @@ import org.l2jmobius.gameserver.model.skill.Env;
*/
public class ConditionPlayerState extends Condition
{
public enum CheckPlayerState
{
RESTING,
MOVING,
RUNNING,
FLYING,
BEHIND,
FRONT,
SIDE
}
private final CheckPlayerState _check;
private final PlayerState _check;
private final boolean _required;
public ConditionPlayerState(CheckPlayerState check, boolean required)
public ConditionPlayerState(PlayerState check, boolean required)
{
_check = check;
_required = required;

View File

@@ -16,6 +16,7 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -17,8 +17,9 @@
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -17,9 +17,10 @@
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
public class EffectBigHead extends Effect

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
public class EffectBlockBuff extends Effect
@@ -29,7 +30,7 @@ public class EffectBlockBuff extends Effect
@Override
public EffectType getEffectType()
{
return Effect.EffectType.BLOCK_BUFF;
return EffectType.BLOCK_BUFF;
}
@Override

View File

@@ -16,13 +16,14 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.instance.Artefact;
import org.l2jmobius.gameserver.model.actor.instance.ControlTower;
import org.l2jmobius.gameserver.model.actor.instance.EffectPoint;
import org.l2jmobius.gameserver.model.actor.instance.Folk;
import org.l2jmobius.gameserver.model.actor.instance.SiegeFlag;
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummon;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.network.serverpackets.BeginRotation;
import org.l2jmobius.gameserver.network.serverpackets.StopRotation;

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -17,8 +17,9 @@
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.model.skill.Stat;

View File

@@ -17,9 +17,10 @@
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.network.SystemMessageId;

View File

@@ -16,8 +16,9 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;

View File

@@ -16,8 +16,9 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -16,10 +16,11 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;

View File

@@ -21,10 +21,11 @@ import java.util.List;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -21,9 +21,10 @@ import java.util.List;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -16,8 +16,9 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
import org.l2jmobius.gameserver.network.SystemMessageId;

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
public class EffectDebuff extends Effect

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.SkillType;
import org.l2jmobius.gameserver.network.SystemMessageId;

View File

@@ -16,7 +16,8 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;

View File

@@ -18,7 +18,6 @@ package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Commander;
@@ -27,6 +26,8 @@ import org.l2jmobius.gameserver.model.actor.instance.FortSiegeGuard;
import org.l2jmobius.gameserver.model.actor.instance.SiegeFlag;
import org.l2jmobius.gameserver.model.actor.instance.SiegeGuard;
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummon;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -19,8 +19,9 @@ package org.l2jmobius.gameserver.model.skill.effects;
import java.util.logging.Logger;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.util.Util;

View File

@@ -17,7 +17,8 @@
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.data.SkillTable;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
/**

View File

@@ -16,9 +16,10 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
public class EffectGrow extends Effect

View File

@@ -16,8 +16,9 @@
*/
package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.instance.Door;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;

View File

@@ -18,7 +18,8 @@ package org.l2jmobius.gameserver.model.skill.effects;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.effects.Effect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.skill.Env;
import org.l2jmobius.gameserver.model.skill.SkillType;

Some files were not shown because too many files have changed in this diff Show More