This commit is contained in:
MobiusDev
2016-10-21 21:26:21 +00:00
parent 4247fae039
commit 34fc592ced
25699 changed files with 2534454 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author Zoey76
*/
public enum AISkillScope
{
BUFF,
DEBUFF,
NEGATIVE,
ATTACK,
IMMOBILIZE,
HEAL,
RES,
COT,
UNIVERSAL,
LONG_RANGE,
SHORT_RANGE,
GENERAL,
SUICIDE
}

View File

@@ -0,0 +1,30 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author Zoey76
*/
public enum AIType
{
FIGHTER,
ARCHER,
BALANCED,
MAGE,
HEALER,
CORPSE
}

View File

@@ -0,0 +1,22 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
public enum AuctionItemType
{
ClanHall
}

View File

@@ -0,0 +1,166 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* This class defines all category types.
* @author xban1x
*/
public enum CategoryType
{
FIGHTER_GROUP,
MAGE_GROUP,
WIZARD_GROUP,
CLERIC_GROUP,
ATTACKER_GROUP,
TANKER_GROUP,
FIRST_CLASS_GROUP,
SECOND_CLASS_GROUP,
THIRD_CLASS_GROUP,
FOURTH_CLASS_GROUP,
BOUNTY_HUNTER_GROUP,
WARSMITH_GROUP,
SUMMON_NPC_GROUP,
KNIGHT_GROUP,
WHITE_MAGIC_GROUP,
HEAL_GROUP,
ASSIST_MAGIC_GROUP,
WARRIOR_GROUP,
HUMAN_2ND_GROUP,
ELF_2ND_GROUP,
DELF_2ND_GROUP,
ORC_2ND_GROUP,
DWARF_2ND_GROUP,
STRIDER,
STRIDER_GROUP,
RED_STRIDER_GROUP,
WOLF_GROUP,
GROWN_UP_WOLF_GROUP,
HATCHLING_GROUP,
BABY_PET_GROUP,
UPGRADE_BABY_PET_GROUP,
WYVERN_GROUP,
ALL_WOLF_GROUP,
WOLF,
SIN_EATER_GROUP,
PET_GROUP,
ITEM_EQUIP_PET_GROUP,
SUBJOB_GROUP_DAGGER,
SUBJOB_GROUP_BOW,
SUBJOB_GROUP_KNIGHT,
SUBJOB_GROUP_SUMMONER,
SUBJOB_GROUP_HALF_HEALER,
SUBJOB_GROUP_DANCE,
SUBJOB_GROUP_WIZARD,
HUMAN_FALL_CLASS,
HUMAN_WALL_CLASS,
HUMAN_MALL_CLASS,
HUMAN_CALL_CLASS,
ELF_FALL_CLASS,
ELF_MALL_CLASS,
ELF_WALL_CLASS,
ELF_CALL_CLASS,
DELF_FALL_CLASS,
DELF_MALL_CLASS,
DELF_WALL_CLASS,
DELF_CALL_CLASS,
ORC_FALL_CLASS,
ORC_MALL_CLASS,
DWARF_ALL_CLASS,
DWARF_BOUNTY_CLASS,
DWARF_SMITH_CLASS,
KAMAEL_ALL_CLASS,
KAMAEL_FIRST_CLASS_GROUP,
KAMAEL_SECOND_CLASS_GROUP,
KAMAEL_THIRD_CLASS_GROUP,
KAMAEL_FOURTH_CLASS_GROUP,
BEGINNER_FIGHTER,
BEGINNER_MAGE,
KAMAEL_MALE_MAIN_OCCUPATION,
KAMAEL_FEMALE_MAIN_OCCUPATION,
ARCHER_GROUP,
SHIELD_MASTER,
BARD,
FORCE_MASTER,
WEAPON_MASTER,
BOW_MASTER,
DAGGER_MASTER,
HEAL_MASTER,
WIZARD_MASTER,
BUFF_MASTER,
SUMMON_MASTER,
WARRIOR_CLOACK,
ROGUE_CLOACK,
MAGE_CLOACK,
SHIELD_MASTER2_3,
BARD2_3,
FORCE_MASTER2_3,
WEAPON_MASTER2_3,
BOW_MASTER2_3,
DAGGER_MASTER2_3,
HEAL_MASTER2_3,
WIZARD_MASTER2_3,
BUFF_MASTER2_3,
SUMMON_MASTER2_3,
ATTRIBUTE_GROUP_SUMMONER,
SUB_GROUP_WARRIOR,
SUB_GROUP_ROGUE,
SUB_GROUP_KNIGHT,
SUB_GROUP_SUMMONER,
SUB_GROUP_WIZARD,
SUB_GROUP_HEALER,
SUB_GROUP_ENCHANTER,
SUB_GROUP_HEC,
SUB_GROUP_HEW,
SUB_GROUP_HEF,
SUB_GROUP_ORC,
SUB_GROUP_WARE,
SUB_GROUP_BLACK,
SUB_GROUP_DE,
SUB_GROUP_KAMAEL,
LIGHT_TANKER_GROUP,
DARK_TANKER_GROUP,
MELEE_ATTACKER,
RECOM_KNIGHT_GROUP,
RECOM_MAGIC_GROUP,
RECOM_WARRIOR_GROUP,
RECOM_ROGUE_GROUP,
RECOM_KAMAEL_GROUP,
RECOM_ORCF_GROUP,
RECOM_ORCM_GROUP,
DEINONYCHUS_PET_GROUP,
BEASTFARM_BEAST,
BEASTFARM_INVADER,
ICEQUEEN_NPC;
/**
* Finds category by it's name
* @param categoryName
* @return A {@code CategoryType} if category was found, {@code null} if category was not found
*/
public static CategoryType findByName(String categoryName)
{
for (CategoryType type : values())
{
if (type.name().equalsIgnoreCase(categoryName))
{
return type;
}
}
return null;
}
}

View File

@@ -0,0 +1,80 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author St3eT
*/
public enum ChatType
{
GENERAL(0),
SHOUT(1),
WHISPER(2),
PARTY(3),
CLAN(4),
GM(5),
PETITION_PLAYER(6),
PETITION_GM(7),
TRADE(8),
ALLIANCE(9),
ANNOUNCEMENT(10),
BOAT(11),
FRIEND(12),
MSNCHAT(13),
PARTYMATCH_ROOM(14),
PARTYROOM_COMMANDER(15),
PARTYROOM_ALL(16),
HERO_VOICE(17),
CRITICAL_ANNOUNCE(18),
SCREEN_ANNOUNCE(19),
BATTLEFIELD(20),
MPCC_ROOM(21),
NPC_GENERAL(22),
NPC_SHOUT(23);
private final int _clientId;
private ChatType(int clientId)
{
_clientId = clientId;
}
/**
* @return the client id.
*/
public int getClientId()
{
return _clientId;
}
/**
* Finds the {@code ChatType} by its clientId
* @param clientId the clientId
* @return the {@code ChatType} if its found, {@code null} otherwise.
*/
public static ChatType findByClientId(int clientId)
{
for (ChatType ChatType : values())
{
if (ChatType.getClientId() == clientId)
{
return ChatType;
}
}
return null;
}
}

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 com.l2jmobius.gameserver.enums;
public enum DuelResult
{
Continue,
Team1Win,
Team2Win,
Team1Surrender,
Team2Surrender,
Canceled,
Timeout
}

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 com.l2jmobius.gameserver.enums;
/**
* @author Zealar
*/
public enum EffectCalculationType
{
DIFF,
PER
}

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 com.l2jmobius.gameserver.enums;
/**
* @author UnAfraid
*/
public enum EventState
{
STARTED,
FINISHED,
}

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

View File

@@ -0,0 +1,29 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author HorridoJoho
*/
public enum HtmlActionScope
{
NPC_HTML,
NPC_ITEM_HTML,
NPC_QUEST_HTML,
TUTORIAL_HTML,
COMM_BOARD_HTML
}

View File

@@ -0,0 +1,42 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* Illegal Action Punishment Type.
* @author xban1x
*/
public enum IllegalActionPunishmentType
{
NONE,
BROADCAST,
KICK,
KICKBAN,
JAIL;
public static IllegalActionPunishmentType findByName(String name)
{
for (IllegalActionPunishmentType type : values())
{
if (type.name().toLowerCase().equals(name.toLowerCase()))
{
return type;
}
}
return NONE;
}
}

View File

@@ -0,0 +1,27 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author FallenAngel
*/
public enum InstanceReenterType
{
NONE,
ON_INSTANCE_ENTER,
ON_INSTANCE_FINISH,
}

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 com.l2jmobius.gameserver.enums;
/**
* @author St3eT
*/
public enum InstanceRemoveBuffType
{
NONE,
ALL,
WHITELIST,
BLACKLIST,
}

View File

@@ -0,0 +1,169 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
public enum InstanceType
{
L2Object(null),
L2ItemInstance(L2Object),
L2Character(L2Object),
L2Npc(L2Character),
L2Playable(L2Character),
L2Summon(L2Playable),
L2Decoy(L2Character),
L2PcInstance(L2Playable),
L2NpcInstance(L2Npc),
L2MerchantInstance(L2NpcInstance),
L2WarehouseInstance(L2NpcInstance),
L2StaticObjectInstance(L2Character),
L2DoorInstance(L2Character),
L2TerrainObjectInstance(L2Npc),
L2EffectPointInstance(L2Npc),
// Summons, Pets, Decoys and Traps
L2ServitorInstance(L2Summon),
L2PetInstance(L2Summon),
L2BabyPetInstance(L2PetInstance),
L2DecoyInstance(L2Decoy),
L2TrapInstance(L2Npc),
// Attackable
L2Attackable(L2Npc),
L2GuardInstance(L2Attackable),
L2QuestGuardInstance(L2GuardInstance),
L2MonsterInstance(L2Attackable),
L2ChestInstance(L2MonsterInstance),
L2ControllableMobInstance(L2MonsterInstance),
L2FeedableBeastInstance(L2MonsterInstance),
L2TamedBeastInstance(L2FeedableBeastInstance),
L2FriendlyMobInstance(L2Attackable),
L2RiftInvaderInstance(L2MonsterInstance),
L2RaidBossInstance(L2MonsterInstance),
L2GrandBossInstance(L2RaidBossInstance),
// FlyMobs
L2FlyNpcInstance(L2NpcInstance),
L2FlyMonsterInstance(L2MonsterInstance),
L2FlyRaidBossInstance(L2RaidBossInstance),
L2FlyTerrainObjectInstance(L2Npc),
// Sepulchers
L2SepulcherNpcInstance(L2NpcInstance),
L2SepulcherMonsterInstance(L2MonsterInstance),
// Festival
L2FestivalGiudeInstance(L2Npc),
L2FestivalMonsterInstance(L2MonsterInstance),
// Vehicles
L2Vehicle(L2Character),
L2BoatInstance(L2Vehicle),
L2AirShipInstance(L2Vehicle),
L2ControllableAirShipInstance(L2AirShipInstance),
// Siege
L2DefenderInstance(L2Attackable),
L2ArtefactInstance(L2NpcInstance),
L2ControlTowerInstance(L2Npc),
L2FlameTowerInstance(L2Npc),
L2SiegeFlagInstance(L2Npc),
// Fort Siege
L2FortCommanderInstance(L2DefenderInstance),
// Fort NPCs
L2FortLogisticsInstance(L2MerchantInstance),
L2FortManagerInstance(L2MerchantInstance),
// Seven Signs
L2SignsPriestInstance(L2Npc),
L2DawnPriestInstance(L2SignsPriestInstance),
L2DuskPriestInstance(L2SignsPriestInstance),
L2DungeonGatekeeperInstance(L2Npc),
// City NPCs
L2AdventurerInstance(L2NpcInstance),
L2AuctioneerInstance(L2Npc),
L2ClanHallManagerInstance(L2MerchantInstance),
L2FishermanInstance(L2MerchantInstance),
L2ObservationInstance(L2Npc),
L2OlympiadManagerInstance(L2Npc),
L2PetManagerInstance(L2MerchantInstance),
L2RaceManagerInstance(L2Npc),
L2TeleporterInstance(L2Npc),
L2TrainerInstance(L2NpcInstance),
L2VillageMasterInstance(L2NpcInstance),
// Doormens
L2DoormenInstance(L2NpcInstance),
L2CastleDoormenInstance(L2DoormenInstance),
L2FortDoormenInstance(L2DoormenInstance),
L2ClanHallDoormenInstance(L2DoormenInstance),
// Custom
L2ClassMasterInstance(L2NpcInstance),
L2NpcBufferInstance(L2Npc),
L2EventMobInstance(L2Npc);
private final InstanceType _parent;
private final long _typeL;
private final long _typeH;
private final long _maskL;
private final long _maskH;
private InstanceType(InstanceType parent)
{
_parent = parent;
final int high = ordinal() - (Long.SIZE - 1);
if (high < 0)
{
_typeL = 1L << ordinal();
_typeH = 0;
}
else
{
_typeL = 0;
_typeH = 1L << high;
}
if ((_typeL < 0) || (_typeH < 0))
{
throw new Error("Too many instance types, failed to load " + name());
}
if (parent != null)
{
_maskL = _typeL | parent._maskL;
_maskH = _typeH | parent._maskH;
}
else
{
_maskL = _typeL;
_maskH = _typeH;
}
}
public final InstanceType getParent()
{
return _parent;
}
public final boolean isType(InstanceType it)
{
return ((_maskL & it._typeL) > 0) || ((_maskH & it._typeH) > 0);
}
public final boolean isTypes(InstanceType... it)
{
for (InstanceType i : it)
{
if (isType(i))
{
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,32 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
public enum ItemLocation
{
VOID,
INVENTORY,
PAPERDOLL,
WAREHOUSE,
CLANWH,
PET,
PET_EQUIP,
LEASE,
REFUND,
MAIL,
FREIGHT
}

View File

@@ -0,0 +1,32 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* Macro type enumerated.
* @author Zoey76
*/
public enum MacroType
{
NONE,
SKILL,
ACTION,
TEXT,
SHORTCUT,
ITEM,
DELAY
}

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 com.l2jmobius.gameserver.enums;
/**
* @author malyelfik
*/
public enum ManorMode
{
DISABLED,
MODIFIABLE,
MAINTENANCE,
APPROVED
}

View File

@@ -0,0 +1,47 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
/**
* @author UnAfraid
*/
public enum MountType
{
NONE,
STRIDER,
WYVERN,
WOLF;
public static MountType findByNpcId(int npcId)
{
if (CategoryData.getInstance().isInCategory(CategoryType.STRIDER, npcId))
{
return STRIDER;
}
else if (CategoryData.getInstance().isInCategory(CategoryType.WYVERN_GROUP, npcId))
{
return WYVERN;
}
else if (CategoryData.getInstance().isInCategory(CategoryType.WOLF_GROUP, npcId))
{
return WOLF;
}
return NONE;
}
}

View File

@@ -0,0 +1,78 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author NosBit
*/
public enum PartyDistributionType
{
FINDERS_KEEPERS(0, 487),
RANDOM(1, 488),
RANDOM_INCLUDING_SPOIL(2, 798),
BY_TURN(3, 799),
BY_TURN_INCLUDING_SPOIL(4, 800);
private final int _id;
private final int _sysStringId;
/**
* Constructs a party distribution type.
* @param id the id used by packets.
* @param sysStringId the sysstring id
*/
private PartyDistributionType(int id, int sysStringId)
{
_id = id;
_sysStringId = sysStringId;
}
/**
* Gets the id used by packets.
* @return the id
*/
public int getId()
{
return _id;
}
/**
* Gets the sysstring id used by system messages.
* @return the sysstring-e id
*/
public int getSysStringId()
{
return _sysStringId;
}
/**
* Finds the {@code PartyDistributionType} by its id
* @param id the id
* @return the {@code PartyDistributionType} if its found, {@code null} otherwise.
*/
public static PartyDistributionType findById(int id)
{
for (PartyDistributionType partyDistributionType : values())
{
if (partyDistributionType.getId() == id)
{
return partyDistributionType;
}
}
return null;
}
}

View File

@@ -0,0 +1,34 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* Enum with petition states.
* @author xban1x
*/
public enum PetitionState
{
PENDING,
RESPONDER_CANCEL,
RESPONDER_MISSING,
RESPONDER_REJECT,
RESPONDER_COMPLETE,
PETITIONER_CANCEL,
PETITIONER_MISSING,
IN_PROCESS,
COMPLETED
}

View File

@@ -0,0 +1,34 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* Enum with petition types.
* @author xban1x
*/
public enum PetitionType
{
IMMOBILITY,
RECOVERY_RELATED,
BUG_REPORT,
QUEST_RELATED,
BAD_USER,
SUGGESTIONS,
GAME_TIP,
OPERATION_RELATED,
OTHER
}

View File

@@ -0,0 +1,38 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author UnAfraid
*/
public enum PlayerAction
{
ADMIN_COMMAND,
USER_ENGAGE;
private final int _mask;
private PlayerAction()
{
_mask = 1 << ordinal();
}
public int getMask()
{
return _mask;
}
}

View File

@@ -0,0 +1,55 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author NosBit
*/
public enum PrivateStoreType
{
NONE(0),
SELL(1),
SELL_MANAGE(2),
BUY(3),
BUY_MANAGE(4),
MANUFACTURE(5),
PACKAGE_SELL(8);
private int _id;
private PrivateStoreType(int id)
{
_id = id;
}
public int getId()
{
return _id;
}
public static PrivateStoreType findById(int id)
{
for (PrivateStoreType privateStoreType : values())
{
if (privateStoreType.getId() == id)
{
return privateStoreType;
}
}
return null;
}
}

View File

@@ -0,0 +1,170 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
/**
* This enum contains known sound effects used by quests.<br>
* The idea is to have only a single object of each quest sound instead of constructing a new one every time a script calls the playSound method.<br>
* This is pretty much just a memory and CPU cycle optimization; avoids constructing/deconstructing objects all the time if they're all the same.<br>
* For datapack scripts written in Java and extending the Quest class, this does not need an extra import.
* @author jurchiks
*/
public enum QuestSound
{
ITEMSOUND_QUEST_ACCEPT(new PlaySound("ItemSound.quest_accept")),
ITEMSOUND_QUEST_MIDDLE(new PlaySound("ItemSound.quest_middle")),
ITEMSOUND_QUEST_FINISH(new PlaySound("ItemSound.quest_finish")),
ITEMSOUND_QUEST_ITEMGET(new PlaySound("ItemSound.quest_itemget")),
// Newbie Guide tutorial (incl. some quests), Mutated Kaneus quests, Quest 192
ITEMSOUND_QUEST_TUTORIAL(new PlaySound("ItemSound.quest_tutorial")),
// Quests 107, 363, 364
ITEMSOUND_QUEST_GIVEUP(new PlaySound("ItemSound.quest_giveup")),
// Quests 212, 217, 224, 226, 416
ITEMSOUND_QUEST_BEFORE_BATTLE(new PlaySound("ItemSound.quest_before_battle")),
// Quests 211, 258, 266, 330
ITEMSOUND_QUEST_JACKPOT(new PlaySound("ItemSound.quest_jackpot")),
// Quests 508, 509 and 510
ITEMSOUND_QUEST_FANFARE_1(new PlaySound("ItemSound.quest_fanfare_1")),
// Played only after class transfer via Test Server Helpers (ID 31756 and 31757)
ITEMSOUND_QUEST_FANFARE_2(new PlaySound("ItemSound.quest_fanfare_2")),
// Quest 336
ITEMSOUND_QUEST_FANFARE_MIDDLE(new PlaySound("ItemSound.quest_fanfare_middle")),
// Quest 114
ITEMSOUND_ARMOR_WOOD(new PlaySound("ItemSound.armor_wood_3")),
// Quest 21
ITEMSOUND_ARMOR_CLOTH(new PlaySound("ItemSound.item_drop_equip_armor_cloth")),
AMDSOUND_ED_CHIMES(new PlaySound("AmdSound.ed_chimes_05")),
HORROR_01(new PlaySound("horror_01")), // played when spawned monster sees player
// Quest 22
AMBSOUND_HORROR_01(new PlaySound("AmbSound.dd_horror_01")),
AMBSOUND_HORROR_03(new PlaySound("AmbSound.d_horror_03")),
AMBSOUND_HORROR_15(new PlaySound("AmbSound.d_horror_15")),
// Quest 23
ITEMSOUND_ARMOR_LEATHER(new PlaySound("ItemSound.itemdrop_armor_leather")),
ITEMSOUND_WEAPON_SPEAR(new PlaySound("ItemSound.itemdrop_weapon_spear")),
AMBSOUND_MT_CREAK(new PlaySound("AmbSound.mt_creak01")),
AMBSOUND_EG_DRON(new PlaySound("AmbSound.eg_dron_02")),
SKILLSOUND_HORROR_02(new PlaySound("SkillSound5.horror_02")),
CHRSOUND_MHFIGHTER_CRY(new PlaySound("ChrSound.MHFighter_cry")),
// Quest 24
AMDSOUND_WIND_LOOT(new PlaySound("AmdSound.d_wind_loot_02")),
INTERFACESOUND_CHARSTAT_OPEN(new PlaySound("InterfaceSound.charstat_open_01")),
// Quest 25
AMDSOUND_HORROR_02(new PlaySound("AmdSound.dd_horror_02")),
CHRSOUND_FDELF_CRY(new PlaySound("ChrSound.FDElf_Cry")),
// Quest 115
AMBSOUND_WINGFLAP(new PlaySound("AmbSound.t_wingflap_04")),
AMBSOUND_THUNDER(new PlaySound("AmbSound.thunder_02")),
// Quest 120
AMBSOUND_DRONE(new PlaySound("AmbSound.ed_drone_02")),
AMBSOUND_CRYSTAL_LOOP(new PlaySound("AmbSound.cd_crystal_loop")),
AMBSOUND_PERCUSSION_01(new PlaySound("AmbSound.dt_percussion_01")),
AMBSOUND_PERCUSSION_02(new PlaySound("AmbSound.ac_percussion_02")),
// Quest 648 and treasure chests
ITEMSOUND_BROKEN_KEY(new PlaySound("ItemSound2.broken_key")),
// Quest 184
ITEMSOUND_SIREN(new PlaySound("ItemSound3.sys_siren")),
// Quest 648
ITEMSOUND_ENCHANT_SUCCESS(new PlaySound("ItemSound3.sys_enchant_success")),
ITEMSOUND_ENCHANT_FAILED(new PlaySound("ItemSound3.sys_enchant_failed")),
// Best farm mobs
ITEMSOUND_SOW_SUCCESS(new PlaySound("ItemSound3.sys_sow_success")),
// Quest 25
SKILLSOUND_HORROR_1(new PlaySound("SkillSound5.horror_01")),
// Quests 21 and 23
SKILLSOUND_HORROR_2(new PlaySound("SkillSound5.horror_02")),
// Quest 22
SKILLSOUND_ANTARAS_FEAR(new PlaySound("SkillSound3.antaras_fear")),
// Quest 505
SKILLSOUND_JEWEL_CELEBRATE(new PlaySound("SkillSound2.jewel.celebrate")),
// Quest 373
SKILLSOUND_LIQUID_MIX(new PlaySound("SkillSound5.liquid_mix_01")),
SKILLSOUND_LIQUID_SUCCESS(new PlaySound("SkillSound5.liquid_success_01")),
SKILLSOUND_LIQUID_FAIL(new PlaySound("SkillSound5.liquid_fail_01")),
// Quest 111
ETCSOUND_ELROKI_SONG_FULL(new PlaySound("EtcSound.elcroki_song_full")),
ETCSOUND_ELROKI_SONG_1ST(new PlaySound("EtcSound.elcroki_song_1st")),
ETCSOUND_ELROKI_SONG_2ND(new PlaySound("EtcSound.elcroki_song_2nd")),
ETCSOUND_ELROKI_SONG_3RD(new PlaySound("EtcSound.elcroki_song_3rd")),
// Long duration AI sounds
BS01_A(new PlaySound("BS01_A")),
BS02_A(new PlaySound("BS02_A")),
BS03_A(new PlaySound("BS03_A")),
BS04_A(new PlaySound("BS04_A")),
BS06_A(new PlaySound("BS06_A")),
BS07_A(new PlaySound("BS07_A")),
BS08_A(new PlaySound("BS08_A")),
BS01_D(new PlaySound("BS01_D")),
BS02_D(new PlaySound("BS02_D")),
BS05_D(new PlaySound("BS05_D")),
BS07_D(new PlaySound("BS07_D"));
private final PlaySound _playSound;
private static Map<String, PlaySound> soundPackets = new HashMap<>();
private QuestSound(PlaySound playSound)
{
_playSound = playSound;
}
/**
* Get a {@link PlaySound} packet by its name.
* @param soundName the name of the sound to look for
* @return the {@link PlaySound} packet with the specified sound or {@code null} if one was not found
*/
public static PlaySound getSound(String soundName)
{
if (soundPackets.containsKey(soundName))
{
return soundPackets.get(soundName);
}
for (QuestSound qs : QuestSound.values())
{
if (qs._playSound.getSoundName().equals(soundName))
{
soundPackets.put(soundName, qs._playSound); // cache in map to avoid looping repeatedly
return qs._playSound;
}
}
soundPackets.put(soundName, new PlaySound(soundName));
return soundPackets.get(soundName);
}
/**
* @return the name of the sound of this QuestSound object
*/
public String getSoundName()
{
return _playSound.getSoundName();
}
/**
* @return the {@link PlaySound} packet of this QuestSound object
*/
public PlaySound getPacket()
{
return _playSound;
}
}

View File

@@ -0,0 +1,27 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author Luis Arias
*/
public enum QuestType
{
REPEATABLE,
ONE_TIME,
DAILY
}

View File

@@ -0,0 +1,49 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* Creature races enumerated.
* @author Zealar
*/
public enum Race
{
HUMAN,
ELF,
DARK_ELF,
ORC,
DWARF,
KAMAEL,
ANIMAL,
BEAST,
BUG,
CASTLE_GUARD,
CONSTRUCT,
DEMONIC,
DIVINE,
DRAGON,
ELEMENTAL,
ETC,
FAIRY,
GIANT,
HUMANOID,
MERCENARY,
NONE,
PLANT,
SIEGE_WEAPON,
UNDEAD;
}

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 com.l2jmobius.gameserver.enums;
public enum Sex
{
MALE,
FEMALE,
ETC;
}

View File

@@ -0,0 +1,32 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* Shortcut type enumerated.
* @author Zoey76
*/
public enum ShortcutType
{
NONE,
ITEM,
SKILL,
ACTION,
MACRO,
RECIPE,
BOOKMARK,
}

View File

@@ -0,0 +1,40 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author UnAfraid
*/
public enum ShotType
{
SOULSHOTS,
SPIRITSHOTS,
BLESSED_SPIRITSHOTS,
FISH_SOULSHOTS;
private final int _mask;
private ShotType()
{
_mask = 1 << ordinal();
}
public int getMask()
{
return _mask;
}
}

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 com.l2jmobius.gameserver.enums;
public enum SiegeTeleportWhoType
{
Attacker,
Owner,
NotOwner,
Spectator
}

View File

@@ -0,0 +1,51 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author Zealar
*/
public enum StatFunction
{
ADD("Add", 30),
DIV("Div", 20),
ENCHANT("Enchant", 0),
ENCHANTHP("EnchantHp", 40),
MUL("Mul", 20),
SET("Set", 0),
SHARE("Share", 30),
SUB("Sub", 30);
String name;
int order;
StatFunction(String name, int order)
{
this.name = name;
this.order = order;
}
public String getName()
{
return name;
}
public int getOrder()
{
return order;
}
}

View File

@@ -0,0 +1,29 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
public enum StatType
{
HP,
MP,
XP,
SP,
GIM // grab item modifier:
// GIM: the default function uses only the skilllevel to determine
// how many item is grabbed in each step
// with this stat changer you can multiple this
}

View File

@@ -0,0 +1,39 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author NosBit
*/
public enum Team
{
NONE(0),
BLUE(1),
RED(2);
private int _id;
private Team(int id)
{
_id = id;
}
public int getId()
{
return _id;
}
}

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 com.l2jmobius.gameserver.enums;
public enum TrapAction
{
TRAP_TRIGGERED,
TRAP_DETECTED,
TRAP_DISARMED
}

View File

@@ -0,0 +1,70 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver.enums;
/**
* @author kombat
*/
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),
// Evading melee attack
ON_EVADED_HIT(8192),
// Effect only - on start
ON_START(16384),
// Effect only - each second
ON_ACTION_TIME(32768),
// Effect only - on exit
ON_EXIT(65536);
private final int _mask;
private TriggerType(int mask)
{
_mask = mask;
}
public final boolean check(int event)
{
return (_mask & event) != 0; // Trigger (sub-)type contains event (sub-)type
}
}