Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_gameserver
- diff --git config/npcs.properties
- index c5a3339..3f300ce 100644
- --- config/npcs.properties
- +++ config/npcs.properties
- @@ -23,40 +23,45 @@
- # Enable Red Name Champion color?
- EnableRedNameChampion = True
- # Atk bonus for champion (changes apply on patk & matk)
- ChampionAtk = 1.
- # Spd Atk bonus for champion (changes apply on patkspd & matkspd)
- ChampionSpdAtk = 1.
- # Chance to obtain a specified reward item from a higher lvl champion (in percents) default is off using glittering medal as reward
- ChampionRewardItem = 0
- # Specified reward item ID
- ChampionRewardItemID = 6393
- # Specified reward item rnd qty
- ChampionRewardItemQty = 1
- +#=============================================================
- +# Vender todos items por 0 Adena no NPCS
- +#=============================================================
- +DisablePriceAdenaItems = True
- #=============================================================
- # Desabilitar ataque aos Npcs na cidade
- #=============================================================
- # Retail False
- DisableAttackToNpcs = true
- #=============================================================
- # Buffer
- #=============================================================
- # Maximum number of available schemes per player.
- BufferMaxSchemesPerChar = 4
- # Static cost of buffs ; override skills price if different of -1.
- BufferStaticCostPerBuff = -1
- #=============================================================
- # Misc
- #=============================================================
- # Allow the use of class Managers to change occupation
- diff --git java/net/sf/l2j/Config.java
- index cff5321..58fdcc4 100644
- --- java/net/sf/l2j/Config.java
- +++ java/net/sf/l2j/Config.java
- @@ -516,40 +516,41 @@
- // NPCs / Monsters
- // --------------------------------------------------
- /** Champion Mod */
- public static int CHAMPION_FREQUENCY;
- public static int CHAMP_MIN_LVL;
- public static int CHAMP_MAX_LVL;
- public static int CHAMPION_HP;
- public static int CHAMPION_REWARDS;
- public static int CHAMPION_ADENAS_REWARDS;
- public static double CHAMPION_HP_REGEN;
- public static double CHAMPION_ATK;
- public static double CHAMPION_SPD_ATK;
- public static int CHAMPION_REWARD;
- public static int CHAMPION_REWARD_ID;
- public static int CHAMPION_REWARD_QTY;
- public static int L2JMOD_CHAMPION_ENABLE_AURA;
- public static boolean AGGRESSION_CHAMPION;
- public static boolean SHOW_RED_NAME_CHAMPION;
- public static boolean DISABLE_ATTACK_NPC_TYPE;
- + public static boolean BLOCK_SELL_ITEMS_ADENA;
- /** Crazy Rates Event */
- public static int EVENT_CRAZY_DROP_TIME;
- public static String[] EVENT_CRAZY_FARM_INTERVAL_BY_TIME_OF_DAY;
- public static float RateMultipler;
- public static boolean ENABLE_EVENT_CRAZY_RATES;
- public static String CRAZY_RATES_MESSAGE_TEXT;
- /** Chat trade global. */
- public static String DEFAULT_GLOBAL_CHAT;
- public static boolean ENABLE_BLOCK_SUPPORTZONE;
- public static String DEFAULT_TRADE_CHAT;
- public static boolean DISABLE_CAPSLOCK;
- public static int CUSTOM_GLOBAL_CHAT_TIME;
- public static boolean GLOBAL_CHAT_WITH_PVP;
- public static int GLOBAL_PVP_AMOUNT;
- public static boolean TRADE_CHAT_WITH_PVP;
- public static int TRADE_PVP_AMOUNT;
- public static int CUSTOM_HERO_CHAT_TIME;
- @@ -1752,40 +1753,41 @@
- hexSetting.setProperty("HexID", hexId);
- try (OutputStream out = new FileOutputStream(file))
- {
- hexSetting.store(out, "the hexID to auth into login");
- }
- }
- catch (Exception e)
- {
- LOGGER.error("Failed to save hex ID to '{}' file.", e, filename);
- }
- }
- /**
- * Loads NPC settings.<br>
- * Such as champion monsters, NPC buffer, class master, wyvern, raid bosses and grand bosses, AI.
- */
- private static final void loadNpcs()
- {
- final ExProperties npcs = initProperties(NPCS_FILE);
- + BLOCK_SELL_ITEMS_ADENA = Boolean.parseBoolean(npcs.getProperty("DisablePriceAdenaItems", "False"));
- DISABLE_ATTACK_NPC_TYPE = Boolean.parseBoolean(npcs.getProperty("DisableAttackToNpcs", "False"));
- CHAMPION_FREQUENCY = npcs.getProperty("ChampionFrequency", 0);
- CHAMP_MIN_LVL = npcs.getProperty("ChampionMinLevel", 20);
- CHAMP_MAX_LVL = npcs.getProperty("ChampionMaxLevel", 70);
- CHAMPION_HP = npcs.getProperty("ChampionHp", 8);
- CHAMPION_HP_REGEN = npcs.getProperty("ChampionHpRegen", 1.);
- CHAMPION_REWARDS = npcs.getProperty("ChampionRewards", 8);
- CHAMPION_ADENAS_REWARDS = npcs.getProperty("ChampionAdenasRewards", 1);
- CHAMPION_ATK = npcs.getProperty("ChampionAtk", 1.);
- CHAMPION_SPD_ATK = npcs.getProperty("ChampionSpdAtk", 1.);
- CHAMPION_REWARD = npcs.getProperty("ChampionRewardItem", 0);
- CHAMPION_REWARD_ID = npcs.getProperty("ChampionRewardItemID", 6393);
- CHAMPION_REWARD_QTY = npcs.getProperty("ChampionRewardItemQty", 1);
- L2JMOD_CHAMPION_ENABLE_AURA = Integer.parseInt(npcs.getProperty("ChampionEnableAura", "0"));
- AGGRESSION_CHAMPION = Boolean.parseBoolean(npcs.getProperty("DisableAgressionChampion", "False"));
- SHOW_RED_NAME_CHAMPION = Boolean.parseBoolean(npcs.getProperty("EnableRedNameChampion", "False"));
- BUFFER_MAX_SCHEMES = npcs.getProperty("BufferMaxSchemesPerChar", 4);
- BUFFER_STATIC_BUFF_COST = npcs.getProperty("BufferStaticCostPerBuff", -1);
- //COIN_ITEMID = Integer.parseInt(npcs.getProperty("CoinIdPriceBuff", "-1"));
- diff --git java/net/sf/l2j/gameserver/model/item/kind/Item.java
- index d3d3545..780f237 100644
- --- java/net/sf/l2j/gameserver/model/item/kind/Item.java
- +++ java/net/sf/l2j/gameserver/model/item/kind/Item.java
- @@ -1,29 +1,31 @@
- package net.sf.l2j.gameserver.model.item.kind;
- import java.util.ArrayList;
- import java.util.Collections;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import net.sf.l2j.commons.util.StatsSet;
- +
- +import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.data.xml.IconTable;
- import net.sf.l2j.gameserver.enums.items.ActionType;
- import net.sf.l2j.gameserver.enums.items.ArmorType;
- import net.sf.l2j.gameserver.enums.items.CrystalType;
- import net.sf.l2j.gameserver.enums.items.EtcItemType;
- import net.sf.l2j.gameserver.enums.items.ItemType;
- import net.sf.l2j.gameserver.enums.items.MaterialType;
- import net.sf.l2j.gameserver.enums.items.WeaponType;
- import net.sf.l2j.gameserver.model.WorldObject;
- import net.sf.l2j.gameserver.model.actor.Creature;
- import net.sf.l2j.gameserver.model.actor.Player;
- import net.sf.l2j.gameserver.model.actor.Summon;
- import net.sf.l2j.gameserver.model.holder.IntIntHolder;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- import net.sf.l2j.gameserver.scripting.Quest;
- import net.sf.l2j.gameserver.skills.Env;
- import net.sf.l2j.gameserver.skills.basefuncs.Func;
- import net.sf.l2j.gameserver.skills.basefuncs.FuncTemplate;
- @@ -126,41 +128,48 @@
- private final boolean _heroItem;
- private final boolean _isOlyRestricted;
- private final ActionType _defaultAction;
- protected List<FuncTemplate> _funcTemplates;
- protected List<Condition> _preConditions;
- private IntIntHolder[] _skillHolder;
- private List<Quest> _questEvents = Collections.emptyList();
- protected Item(StatsSet set)
- {
- _itemId = set.getInteger("item_id");
- _name = set.getString("name");
- _weight = set.getInteger("weight", 0);
- _materialType = set.getEnum("material", MaterialType.class, MaterialType.STEEL);
- _duration = set.getInteger("duration", -1);
- _bodyPart = SLOTS.get(set.getString("bodypart", "none"));
- - _referencePrice = set.getInteger("price", 0);
- + if(Config.BLOCK_SELL_ITEMS_ADENA)
- + {
- + _referencePrice = 0;
- + }
- + else
- + {
- + _referencePrice = set.getInteger("price", 0);
- + }
- _crystalType = set.getEnum("crystal_type", CrystalType.class, CrystalType.NONE);
- _crystalCount = set.getInteger("crystal_count", 0);
- _stackable = set.getBool("is_stackable", false);
- _sellable = set.getBool("is_sellable", true);
- _dropable = set.getBool("is_dropable", true);
- _destroyable = set.getBool("is_destroyable", true);
- _tradable = set.getBool("is_tradable", true);
- _depositable = set.getBool("is_depositable", true);
- _heroItem = (_itemId >= 6611 && _itemId <= 6621) || _itemId == 6842;
- _isOlyRestricted = set.getBool("is_oly_restricted", false);
- _defaultAction = set.getEnum("default_action", ActionType.class, ActionType.none);
- if (set.containsKey("item_skill"))
- _skillHolder = set.getIntIntHolderArray("item_skill");
- }
- /**
Add Comment
Please, Sign In to add comment