Initial changes.
This commit is contained in:
@@ -65,6 +65,7 @@ import org.l2jmobius.gameserver.enums.IllegalActionPunishmentType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
import org.l2jmobius.gameserver.util.FloodProtectorConfig;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
@@ -302,6 +303,7 @@ public class Config
|
||||
public static boolean STORE_UI_SETTINGS;
|
||||
public static String[] FORBIDDEN_NAMES;
|
||||
public static boolean SILENCE_MODE_EXCLUDE;
|
||||
public static CrystalType MAX_EQUIPABLE_ITEM_GRADE;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Castle Settings
|
||||
@@ -827,6 +829,11 @@ public class Config
|
||||
public static int ANTHARAS_SPAWN_INTERVAL;
|
||||
public static int ANTHARAS_SPAWN_RANDOM;
|
||||
|
||||
// Valakas
|
||||
public static int VALAKAS_WAIT_TIME;
|
||||
public static int VALAKAS_SPAWN_INTERVAL;
|
||||
public static int VALAKAS_SPAWN_RANDOM;
|
||||
|
||||
// Baium
|
||||
public static int BAIUM_SPAWN_INTERVAL;
|
||||
|
||||
@@ -1727,6 +1734,7 @@ public class Config
|
||||
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
||||
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
||||
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
||||
MAX_EQUIPABLE_ITEM_GRADE = Enum.valueOf(CrystalType.class, Character.getString("MaxEquipableItemGrade", "EVENT"));
|
||||
PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000;
|
||||
ABILITY_MAX_POINTS = Character.getInt("AbilityMaxPoints", 16);
|
||||
ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10_000_000);
|
||||
@@ -1869,7 +1877,7 @@ public class Config
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "There was an error while parsing ban chat channels: ", nfe);
|
||||
}
|
||||
WORLD_CHAT_MIN_LEVEL = General.getInt("WorldChatMinLevel", 95);
|
||||
WORLD_CHAT_MIN_LEVEL = General.getInt("WorldChatMinLevel", 0);
|
||||
WORLD_CHAT_POINTS_PER_DAY = General.getInt("WorldChatPointsPerDay", 10);
|
||||
WORLD_CHAT_INTERVAL = General.getDuration("WorldChatInterval", "20secs", Duration.ofSeconds(20));
|
||||
ALT_MANOR_REFRESH_TIME = General.getInt("AltManorRefreshTime", 20);
|
||||
@@ -2248,6 +2256,10 @@ public class Config
|
||||
ANTHARAS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAntharasSpawn", 264);
|
||||
ANTHARAS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAntharasSpawn", 72);
|
||||
|
||||
VALAKAS_WAIT_TIME = GrandBossSettings.getInt("ValakasWaitTime", 30);
|
||||
VALAKAS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfValakasSpawn", 264);
|
||||
VALAKAS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfValakasSpawn", 72);
|
||||
|
||||
BAIUM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfBaiumSpawn", 168);
|
||||
|
||||
CORE_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfCoreSpawn", 60);
|
||||
|
@@ -1174,6 +1174,12 @@ public class AttackableAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent thinking in non active regions.
|
||||
if (!_actor.isInActiveRegion())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Start thinking action
|
||||
_thinking = true;
|
||||
|
||||
|
@@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.buylist.Product;
|
||||
import org.l2jmobius.gameserver.model.buylist.ProductList;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
|
||||
/**
|
||||
* Loads buy lists for NPCs.
|
||||
@@ -128,6 +129,13 @@ public class BuyListData implements IXmlReader
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
|
||||
// Max equipable item grade configuration.
|
||||
final int itemCrystalId = item.getCrystalType().getId();
|
||||
if ((itemCrystalId > Config.MAX_EQUIPABLE_ITEM_GRADE.getId()) && (itemCrystalId < CrystalType.EVENT.getId()))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
|
@@ -45,6 +45,7 @@ import org.l2jmobius.gameserver.model.holders.MultisellListHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.enchant.EnchantItemGroup;
|
||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MultiSellList;
|
||||
|
||||
public class MultisellData implements IXmlReader
|
||||
@@ -154,6 +155,17 @@ public class MultisellData implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
// Max equipable item grade configuration.
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
final int itemCrystalId = item.getCrystalType().getId();
|
||||
if ((itemCrystalId > Config.MAX_EQUIPABLE_ITEM_GRADE.getId()) && (itemCrystalId < CrystalType.EVENT.getId()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
products.add(product);
|
||||
}
|
||||
else
|
||||
@@ -239,19 +251,16 @@ public class MultisellData implements IXmlReader
|
||||
return;
|
||||
}
|
||||
|
||||
if (!template.isNpcAllowed(-1))
|
||||
if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())))
|
||||
{
|
||||
if ((npc == null) || !template.isNpcAllowed(npc.getId()))
|
||||
if (player.isGM())
|
||||
{
|
||||
if (player.isGM())
|
||||
{
|
||||
player.sendMessage("Multisell " + listId + " is restricted. Under current conditions cannot be used. Only GMs are allowed to use it.");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Player " + player + " attempted to open multisell " + listId + " from npc " + npc + " which is not allowed!");
|
||||
return;
|
||||
}
|
||||
player.sendMessage("Multisell " + listId + " is restricted. Under current conditions cannot be used. Only GMs are allowed to use it.");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Player " + player + " attempted to open multisell " + listId + " from npc " + npc + " which is not allowed!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -48,6 +48,8 @@ import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.effects.EffectType;
|
||||
import org.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
@@ -450,12 +452,20 @@ public class NpcData implements IXmlReader
|
||||
{
|
||||
final double chance = parseDouble(drop_attrs, "chance");
|
||||
final DropHolder dropItem = new DropHolder(dropType, parseInteger(drop_attrs, "id"), parseLong(drop_attrs, "min"), parseLong(drop_attrs, "max"), dropType == DropType.LUCKY ? chance / 100 : chance);
|
||||
if (ItemTable.getInstance().getTemplate(parseInteger(drop_attrs, "id")) == null)
|
||||
final Item item = ItemTable.getInstance().getTemplate(parseInteger(drop_attrs, "id"));
|
||||
if (item == null)
|
||||
{
|
||||
LOGGER.warning("DropListItem: Could not find item with id " + parseInteger(drop_attrs, "id") + ".");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Max equipable item grade configuration.
|
||||
final int itemCrystalId = item.getCrystalType().getId();
|
||||
if ((itemCrystalId > Config.MAX_EQUIPABLE_ITEM_GRADE.getId()) && (itemCrystalId < CrystalType.EVENT.getId()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
dropLists.add(dropItem);
|
||||
}
|
||||
}
|
||||
|
@@ -27,12 +27,16 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.IXmlReader;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.RecipeInstance;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.RecipeStatInstance;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
|
||||
/**
|
||||
* The Class RecipeData.
|
||||
@@ -171,7 +175,20 @@ public class RecipeData implements IXmlReader
|
||||
}
|
||||
else if ("production".equalsIgnoreCase(c.getNodeName()))
|
||||
{
|
||||
set.set("itemId", Integer.parseInt(c.getAttributes().getNamedItem("id").getNodeValue()));
|
||||
final int itemId = Integer.parseInt(c.getAttributes().getNamedItem("id").getNodeValue());
|
||||
|
||||
// Max equipable item grade configuration.
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
final int itemCrystalId = item.getCrystalType().getId();
|
||||
if ((itemCrystalId > Config.MAX_EQUIPABLE_ITEM_GRADE.getId()) && (itemCrystalId < CrystalType.EVENT.getId()))
|
||||
{
|
||||
continue RECIPES_FILE;
|
||||
}
|
||||
}
|
||||
|
||||
set.set("itemId", itemId);
|
||||
set.set("count", Integer.parseInt(c.getAttributes().getNamedItem("count").getNodeValue()));
|
||||
}
|
||||
else if ("productionRare".equalsIgnoreCase(c.getNodeName()))
|
||||
|
@@ -10401,6 +10401,15 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
|
||||
}
|
||||
|
||||
// send info to nearby players
|
||||
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
|
||||
{
|
||||
if (isVisibleFor(player))
|
||||
{
|
||||
sendInfo(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -102,6 +102,11 @@ public class MultisellListHolder implements IIdentifiable
|
||||
|
||||
public boolean isNpcAllowed(int npcId)
|
||||
{
|
||||
return (_npcsAllowed != null) && _npcsAllowed.contains(npcId);
|
||||
return (_npcsAllowed == null) || _npcsAllowed.contains(npcId);
|
||||
}
|
||||
|
||||
public boolean isNpcOnly()
|
||||
{
|
||||
return _npcsAllowed != null;
|
||||
}
|
||||
}
|
@@ -34,12 +34,14 @@ public enum AbnormalType
|
||||
ATTACK_TIME_DOWN_SPECIAL(-1),
|
||||
AURA(-1),
|
||||
AVOID_SKILL_SPECIAL(-1),
|
||||
ASSASSINS_REFLEX(-1),
|
||||
BARRIER(-1),
|
||||
BATTLE_CRY(-1),
|
||||
BATTLE_TOLERANCE(-1),
|
||||
BIG_BODY_COMBINATION(-1),
|
||||
BLESS_THE_BLOOD(-1),
|
||||
BLOCK_ESCAPE(-1),
|
||||
BLOCK_INVINCIBILITY(-1),
|
||||
BLOCK_RESURRECTION(-1),
|
||||
BLOCK_SHIELD_UP(-1),
|
||||
BLOCK_SPEED_UP(-1),
|
||||
@@ -73,7 +75,9 @@ public enum AbnormalType
|
||||
CLASS_CHANGE(-1),
|
||||
CONFUSION(-1),
|
||||
COUNTER_CRITICAL(-1),
|
||||
COUNTER_FLIP(-1),
|
||||
COUNTER_CRITICAL_TRIGGER(-1),
|
||||
COMPELLING_WIND(-1),
|
||||
CRIPPLING_DANCE(-1),
|
||||
CRITICAL_SPECIAL(-1),
|
||||
CURIOUS_HOUSE(-1),
|
||||
@@ -86,18 +90,23 @@ public enum AbnormalType
|
||||
DEATH_PENALTY_GD(-1),
|
||||
DEATHWORM(-1),
|
||||
DEPORT(-1),
|
||||
EYE_STORM(-1),
|
||||
DITTY(-1),
|
||||
DIVINE_STORM(-1),
|
||||
DUAL_ATTACK_UP(-1),
|
||||
DUAL_DEFENCE_UP(-1),
|
||||
DUAL_DMG_SHIELD(-1),
|
||||
DUAL_SKILL_UP(-1),
|
||||
DWARF_ATTACK_BUFF(-1),
|
||||
DWARF_DEFENCE_BUFF(-1),
|
||||
EASTERLY_WIND_STRIKE(-1),
|
||||
EINHASADS_NECKLACE(-1),
|
||||
ENCHANTER_MOD(-1),
|
||||
ENERGY_OF_TOTEM_1(-1),
|
||||
ENERGY_OF_TOTEM_2(-1),
|
||||
ENERGY_OF_TOTEM_3(-1),
|
||||
ENERGY_OF_TOTEM_4(-1),
|
||||
EVAS_EARRING(-1),
|
||||
EVENT_GAWI(-1),
|
||||
EVENT_SANTA_REWARD(-1),
|
||||
EVENT_TERRITORY(-1),
|
||||
@@ -108,11 +117,15 @@ public enum AbnormalType
|
||||
FISH_STEW(-1),
|
||||
FLAG_BUF(-1),
|
||||
FLAG_DEBUF(-1),
|
||||
FREEZE(-1),
|
||||
FREEZE_SLOW(-1),
|
||||
FORCE_HP_UP(-1),
|
||||
GREATER_SERVITOR_BUFF(-1),
|
||||
GRAN_KAINS_NECKLACE(-1),
|
||||
HIDE(-1),
|
||||
IMPROVE_HIT_DEFENCE_CRT_RATE_UP(-1),
|
||||
INSTANT_EV_BUFF1(-1),
|
||||
INSTANT_EV_BUFF2(-1),
|
||||
INSTANT_EV_BUFF6(-1),
|
||||
INVINCIBILITY_SPECIAL(-1),
|
||||
KALIE_BUFF(-1),
|
||||
@@ -121,6 +134,8 @@ public enum AbnormalType
|
||||
LIFE_FORCE_HEALER(-1),
|
||||
LIFE_FORCE_HEALER_SELF(-1),
|
||||
LUMIERE_BUFF(-1),
|
||||
MANA_BURST(-1),
|
||||
MAPHRS_RING(-1),
|
||||
MARK_DEBUF_A(-1),
|
||||
MARK_DEBUF_B(-1),
|
||||
MARK_DEBUF_C(-1),
|
||||
@@ -130,6 +145,7 @@ public enum AbnormalType
|
||||
MARK_OF_PLAGUE(-1),
|
||||
MARK_OF_TRICK(-1),
|
||||
MAX_HP_UP_K(-1),
|
||||
MD_DOWN_AWAKEN(-1),
|
||||
MORALE_UP(-1),
|
||||
MOTION_OF_DEFENCE(-1),
|
||||
MOVEMENT(-1),
|
||||
@@ -151,7 +167,9 @@ public enum AbnormalType
|
||||
NPC_MULTI_BUFF1(-1),
|
||||
PATIENCE(-1),
|
||||
PET_FURY(-1),
|
||||
PAAGRIOS_EARRING(-1),
|
||||
POSSESSION_SPECIAL(-1),
|
||||
POWER_BLUFF(-1),
|
||||
PVP_WEAPON_BUFF(-1),
|
||||
PVP_WEAPON_DEBUFF(-1),
|
||||
RACE_DARKELF1(-1),
|
||||
@@ -165,10 +183,16 @@ public enum AbnormalType
|
||||
RESIST_DEATH(-1),
|
||||
RHAPSODY(-1),
|
||||
SACRIFICE(-1),
|
||||
SAYHA_FURY(-1),
|
||||
SAYHAS_RING(-1),
|
||||
SHADOW_FLASH(-1),
|
||||
SEED_OF_CRITICAL(-1),
|
||||
SEED_TALISMAN1(-1),
|
||||
SHIELD_ATTACK(-1),
|
||||
SHILLIEN_PROTECTION(-1),
|
||||
SHILENS_EARRING(-1),
|
||||
SHILENS_RING(-1),
|
||||
SHILENS_NECKLACE(-1),
|
||||
SHOOTING_STANCE(-1),
|
||||
SIGNAL_A(-1),
|
||||
SIGNAL_B(-1),
|
||||
@@ -176,6 +200,7 @@ public enum AbnormalType
|
||||
SIGNAL_D(-1),
|
||||
SIGNAL_E(-1),
|
||||
SKILL_IGNORE(-1),
|
||||
SQUALL(-1),
|
||||
SOA_BUFF1(-1),
|
||||
SOA_BUFF2(-1),
|
||||
SOA_BUFF3(-1),
|
||||
@@ -195,17 +220,7 @@ public enum AbnormalType
|
||||
SUPER_AVOID(-1),
|
||||
SUPER_BUFF(-1),
|
||||
SUPER_MOVE(-1),
|
||||
SYNERGY_EOLH(-1),
|
||||
SYNERGY_FEOH(-1),
|
||||
SYNERGY_IS(-1),
|
||||
SYNERGY_LENKER(-1),
|
||||
SYNERGY_OTHEL(-1),
|
||||
SYNERGY_PARTY_BUF(-1),
|
||||
SYNERGY_SEER(-1),
|
||||
SYNERGY_SIGEL(-1),
|
||||
SYNERGY_TIR(-1),
|
||||
SYNERGY_WYNN(-1),
|
||||
SYNERGY_YR(-1),
|
||||
TALISMAN_TRIGGER_SPECIAL(-1),
|
||||
TIME_BOMB(-1),
|
||||
TURN_CRYSTAL(-1),
|
||||
VAMPIRIC_ATTACK_SPECIAL(-1),
|
||||
@@ -217,13 +232,16 @@ public enum AbnormalType
|
||||
VP_UP(-1),
|
||||
WEAKENED_DEATH_PENALTY(-1),
|
||||
WEAPON_MASTER_SPECIAL(-1),
|
||||
WIND_BLEND(-1),
|
||||
WISPERING_OF_BATTLE(-1),
|
||||
WP_CHANGE_EVENT(-1),
|
||||
CLAN_TEAMWORK(-1),
|
||||
SONG_OF_ARCHERY(-1),
|
||||
DANCE_OF_SAGE(-1),
|
||||
SAYHA_BLESSING(-1),
|
||||
SONG_WEAPON(-1), // TODO: need find proper name
|
||||
HEAL_RESISTANCE(-1), // TODO: need find proper name
|
||||
EXP_HERB(-1),
|
||||
AB_HAWK_EYE(0),
|
||||
ALL_ATTACK_DOWN(1),
|
||||
ALL_ATTACK_UP(2),
|
||||
@@ -512,7 +530,19 @@ public enum AbnormalType
|
||||
AIRBIND(365),
|
||||
KNOCKDOWN(367),
|
||||
EARTHWORM_DEBUFF(424),
|
||||
SYNERGY_SIGEL(433),
|
||||
SYNERGY_TIR(434),
|
||||
SYNERGY_OTHEL(435),
|
||||
SYNERGY_YR(436),
|
||||
SYNERGY_FEOH(437),
|
||||
SYNERGY_IS(438),
|
||||
SYNERGY_WYNN(439),
|
||||
SYNERGY_EOLH(440),
|
||||
AGATHION_SONG_DANCE(444),
|
||||
SYNERGY_PARTY_BUF(465),
|
||||
POTION_OF_PROTECTION(552),
|
||||
SYNERGY_LENKER(589),
|
||||
SYNERGY_SEER(590),
|
||||
INSIDE_POSITION(593),
|
||||
STEEL_MIND(596),
|
||||
STRAWBERRY_FRUIT(-1),
|
||||
@@ -520,8 +550,7 @@ public enum AbnormalType
|
||||
CHERRY_FRUIT(-1),
|
||||
HERB_EXP(-1),
|
||||
HERB_SPEED(-1),
|
||||
HERB_ACCURANCY(-1),
|
||||
DRAGON_FRUIT(-1);
|
||||
HERB_ACCURANCY(-1);
|
||||
|
||||
private int _clientId;
|
||||
|
||||
|
@@ -36,7 +36,9 @@ public enum BaseStats
|
||||
DEX(Stats.STAT_DEX),
|
||||
WIT(Stats.STAT_WIT),
|
||||
CON(Stats.STAT_CON),
|
||||
MEN(Stats.STAT_MEN);
|
||||
MEN(Stats.STAT_MEN),
|
||||
CHA(Stats.STAT_CHA),
|
||||
LUC(Stats.STAT_LUC);
|
||||
|
||||
public static final int MAX_STAT_VALUE = 201;
|
||||
|
||||
|
@@ -171,6 +171,8 @@ public enum Stats
|
||||
STAT_INT("INT", new BaseStatsFinalizer()),
|
||||
STAT_WIT("WIT", new BaseStatsFinalizer()),
|
||||
STAT_MEN("MEN", new BaseStatsFinalizer()),
|
||||
STAT_LUC("LUC", new BaseStatsFinalizer()),
|
||||
STAT_CHA("CHA", new BaseStatsFinalizer()),
|
||||
|
||||
// Special stats, share one slot in Calculator
|
||||
|
||||
|
@@ -79,8 +79,6 @@ import org.l2jmobius.gameserver.network.clientpackets.primeshop.RequestBRPresent
|
||||
import org.l2jmobius.gameserver.network.clientpackets.primeshop.RequestBRProductInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.primeshop.RequestBRProductList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.primeshop.RequestBRRecentProductList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.raidbossinfo.RequestRaidBossSpawnInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.raidbossinfo.RequestRaidServerInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.sayune.RequestFlyMove;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.sayune.RequestFlyMoveStart;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.CannotMoveAnymoreInShuttle;
|
||||
@@ -381,8 +379,8 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_QUEUE_TICKET_LOGIN(0x126, null, ConnectionState.IN_GAME),
|
||||
REQUEST_BLOCK_MEMO_INFO(0x127, null, ConnectionState.IN_GAME),
|
||||
REQUEST_TRY_EN_SOUL_EXTRACTION(0x128, RequestTryEnSoulExtraction::new, ConnectionState.IN_GAME),
|
||||
REQUEST_RAIDBOSS_SPAWN_INFO(0x129, RequestRaidBossSpawnInfo::new, ConnectionState.IN_GAME),
|
||||
REQUEST_RAID_SERVER_INFO(0x12A, RequestRaidServerInfo::new, ConnectionState.IN_GAME),
|
||||
REQUEST_RAIDBOSS_SPAWN_INFO(0x129, null, ConnectionState.IN_GAME),
|
||||
REQUEST_RAID_SERVER_INFO(0x12A, null, ConnectionState.IN_GAME),
|
||||
REQUEST_SHOW_AGIT_SIEGE_INFO(0x12B, null, ConnectionState.IN_GAME),
|
||||
REQUEST_ITEM_AUCTION_STATUS(0x12C, null, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_OPEN(0x12D, null, ConnectionState.IN_GAME),
|
||||
|
@@ -4945,17 +4945,17 @@ public class SystemMessageId
|
||||
@ClientString(id = 1633, message = "The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 1 minute.")
|
||||
public static SystemMessageId THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE;
|
||||
|
||||
@ClientString(id = 1634, message = "The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 15 minutes.")
|
||||
public static SystemMessageId THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES_2;
|
||||
@ClientString(id = 1634, message = "The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 15 minutes.")
|
||||
public static SystemMessageId THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES;
|
||||
|
||||
@ClientString(id = 1635, message = "The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 10 minutes.")
|
||||
public static SystemMessageId THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES_2;
|
||||
@ClientString(id = 1635, message = "The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 10 minutes.")
|
||||
public static SystemMessageId THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES;
|
||||
|
||||
@ClientString(id = 1636, message = "The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 5 minutes.")
|
||||
public static SystemMessageId THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES_2;
|
||||
@ClientString(id = 1636, message = "The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 5 minutes.")
|
||||
public static SystemMessageId THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES;
|
||||
|
||||
@ClientString(id = 1637, message = "The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 1 minute.")
|
||||
public static SystemMessageId THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE_2;
|
||||
@ClientString(id = 1637, message = "The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 1 minute.")
|
||||
public static SystemMessageId THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE;
|
||||
|
||||
@ClientString(id = 1638, message = "You cannot fish while using a recipe book, private workshop or private store.")
|
||||
public static SystemMessageId YOU_CANNOT_FISH_WHILE_USING_A_RECIPE_BOOK_PRIVATE_WORKSHOP_OR_PRIVATE_STORE;
|
||||
|
@@ -83,7 +83,6 @@ import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoEquipSlot;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExVitalityEffectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExVoteSystemInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExWorldChatCnt;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.HennaInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
@@ -603,10 +602,12 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
player.sendPacket(new ExBeautyItemList(player));
|
||||
}
|
||||
|
||||
if (Config.ENABLE_WORLD_CHAT)
|
||||
{
|
||||
player.sendPacket(new ExWorldChatCnt(player));
|
||||
}
|
||||
// Disabled to give a more Classic feeling.
|
||||
// if (Config.ENABLE_WORLD_CHAT)
|
||||
// {
|
||||
// player.sendPacket(new ExWorldChatCnt(player));
|
||||
// }
|
||||
|
||||
player.sendPacket(new ExConnectedTimeAndGettableReward(player));
|
||||
player.sendPacket(new ExOneDayReceiveRewardList(player, true));
|
||||
|
||||
|
@@ -130,23 +130,16 @@ public class MultiSellChoose implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
final Npc npc = player.getLastFolkNPC();
|
||||
if (!list.isNpcAllowed(-1))
|
||||
if (!list.isNpcAllowed(-1) && !isAllowedToUse(player, npc, list))
|
||||
{
|
||||
if ((npc == null) //
|
||||
|| !list.isNpcAllowed(npc.getId()) //
|
||||
|| !list.checkNpcObjectId(npc.getObjectId()) //
|
||||
|| (player.getInstanceId() != npc.getInstanceId()) //
|
||||
|| !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE))
|
||||
if (player.isGM())
|
||||
{
|
||||
if (player.isGM())
|
||||
{
|
||||
player.sendMessage("Multisell " + _listId + " is restricted. Under current conditions cannot be used. Only GMs are allowed to use it.");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setMultiSell(null);
|
||||
return;
|
||||
}
|
||||
player.sendMessage("Multisell " + _listId + " is restricted. Under current conditions cannot be used. Only GMs are allowed to use it.");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setMultiSell(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,4 +650,30 @@ public class MultiSellChoose implements IClientIncomingPacket
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* @param npc
|
||||
* @param list
|
||||
* @return {@code true} if player can buy stuff from the multisell, {@code false} otherwise.
|
||||
*/
|
||||
private boolean isAllowedToUse(PlayerInstance player, Npc npc, PreparedMultisellListHolder list)
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
if (!list.isNpcAllowed(npc.getId()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (list.isNpcOnly() && (!list.checkNpcObjectId(npc.getObjectId()) || (npc.getInstanceWorld() != player.getInstanceWorld()) || !player.isInsideRadius3D(npc, Npc.INTERACTION_DISTANCE)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (list.isNpcOnly())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -40,6 +40,7 @@ import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||
import org.l2jmobius.gameserver.model.items.type.CrystalType;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@@ -170,6 +171,13 @@ public class UseItem implements IClientIncomingPacket
|
||||
|
||||
if (item.isEquipable())
|
||||
{
|
||||
// Max equipable item grade configuration.
|
||||
final int itemCrystalId = item.getItem().getCrystalType().getId();
|
||||
if (!player.isGM() && (itemCrystalId > Config.MAX_EQUIPABLE_ITEM_GRADE.getId()) && (itemCrystalId < CrystalType.EVENT.getId()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't allow to put formal wear while a cursed weapon is equipped.
|
||||
if (player.isCursedWeaponEquipped() && (_itemId == 6408))
|
||||
{
|
||||
|
@@ -1,65 +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.network.clientpackets.raidbossinfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpawnInfo;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
||||
{
|
||||
private final List<Integer> _bossIds = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
final int count = packet.readD();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
final int bossId = packet.readD();
|
||||
if (DBSpawnManager.getInstance().getNpcStatusId(bossId) == RaidBossStatus.ALIVE)
|
||||
{
|
||||
_bossIds.add(bossId);
|
||||
}
|
||||
else if (GrandBossManager.getInstance().getBossStatus(bossId) == 0)
|
||||
{
|
||||
_bossIds.add(bossId);
|
||||
}
|
||||
/*
|
||||
* else { String message = "Could not find spawn info for boss " + bossId; final NpcTemplate template = NpcData.getInstance().getTemplate(bossId); if (template != null) { message += " - " + template.getName() + "."; } else { message += " - NPC template not found."; }
|
||||
* System.out.println(message); }
|
||||
*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
client.sendPacket(new ExRaidBossSpawnInfo(_bossIds));
|
||||
}
|
||||
}
|
@@ -1,39 +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.network.clientpackets.raidbossinfo;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestRaidServerInfo implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// System.out.println("RequestRaidServerInfo");
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
}
|
||||
}
|
@@ -39,7 +39,7 @@ public class ExFriendDetailInfo implements IClientOutgoingPacket
|
||||
_objectId = player.getObjectId();
|
||||
_name = name;
|
||||
_friend = World.getInstance().getPlayer(_name);
|
||||
_lastAccess = (_friend == null) || _friend.isBlocked(player) ? 0 : _friend.isOnline() ? (int) System.currentTimeMillis() : (int) (System.currentTimeMillis() - _friend.getLastAccess()) / 1000;
|
||||
_lastAccess = _friend.isBlocked(player) ? 0 : _friend.isOnline() ? (int) System.currentTimeMillis() : (int) (System.currentTimeMillis() - _friend.getLastAccess()) / 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,50 +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.network.serverpackets.raidbossinfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRaidBossSpawnInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final List<Integer> _bossIds;
|
||||
|
||||
public ExRaidBossSpawnInfo(List<Integer> bossIds)
|
||||
{
|
||||
_bossIds = bossIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_RAID_BOSS_SPAWN_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_bossIds.size()); // alive count
|
||||
for (int id : _bossIds) // alive ids
|
||||
{
|
||||
packet.writeD(id);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,38 +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.network.serverpackets.raidbossinfo;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRaidServerInfo implements IClientOutgoingPacket
|
||||
{
|
||||
public ExRaidServerInfo()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_RAID_SERVER_INFO.writeId(packet);
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -31,7 +31,7 @@ public class LauncherGS extends AbstractDBLauncher
|
||||
{
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
final String defDatabase = "l2jmobiusclassic";
|
||||
final String defDatabase = "l2jmobiusclassicinterlude";
|
||||
final String dir = "sql/game/";
|
||||
|
||||
if ((args != null) && (args.length > 0))
|
||||
|
@@ -31,7 +31,7 @@ public class LauncherLS extends AbstractDBLauncher
|
||||
{
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
final String defDatabase = "l2jmobiusclassic";
|
||||
final String defDatabase = "l2jmobiusclassicinterlude";
|
||||
final String dir = "sql/login/";
|
||||
|
||||
if ((args != null) && (args.length > 0))
|
||||
|
Reference in New Issue
Block a user