DrakeSnake 0 Опубликовано 24 апреля, 2015 Доброго времени суток всем. Давненько использовал на свой, исключительно домашний, сервер мод advanced champion и захотелось его к последней сборке Hi5 l2jserver приспособить. Смог его привести к виду, когда патч спокойно заливается в сорсы, но при компиляции происходят ошибки. Ошибка в старом коде, который уже не соответствует серверу. К сожалению, необходимых знаний у меня нет, чтобы узнать где именно необходимо и что нужно исправить, надеюсь, кто-нибудь поможет разобраться. P.S Надеюсь, тему создал в нужном разделе. ### Eclipse Workspace Patch 1.0#P L2J_DataPack_BETAIndex: dist/game/data/scripts/handlers/admincommandhandlers/AdminKill.java===================================================================--- dist/game/data/scripts/handlers/admincommandhandlers/AdminKill.java (revision 10213)+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminKill.java (working copy)@@ -24,9 +24,11 @@ import java.util.logging.Logger; import com.l2jserver.Config;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2World;+import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2ControllableMobInstance; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;@@ -135,9 +137,9 @@ } target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar, null); }- else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())+ else if (ChampionData.getInstance().isEnabled() && target.isChampion()) {- target.reduceCurrentHp((target.getMaxHp() * Config.L2JMOD_CHAMPION_HP) + 1, activeChar, null);+ target.reduceCurrentHp((target.getMaxHp() * ChampionData.getInstance().getHpMultipler((L2Attackable) target)) + 1, activeChar, null); } else {Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminMenu.java===================================================================--- dist/game/data/scripts/handlers/admincommandhandlers/AdminMenu.java (revision 10213)+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminMenu.java (working copy)@@ -22,14 +22,15 @@ import java.util.logging.Level; import java.util.logging.Logger; -import com.l2jserver.Config; import com.l2jserver.gameserver.data.xml.impl.AdminData;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.handler.AdminCommandHandler; import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.model.L2Clan; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.Location;+import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.SystemMessageId;@@ -253,9 +254,9 @@ target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar, null); filename = "charmanage.htm"; }- else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())+ else if (ChampionData.getInstance().isEnabled() && target.isChampion()) {- target.reduceCurrentHp((target.getMaxHp() * Config.L2JMOD_CHAMPION_HP) + 1, activeChar, null);+ target.reduceCurrentHp((target.getMaxHp() * ChampionData.getInstance().getHpMultipler((L2Attackable) target)) + 1, activeChar, null); } else {#P L2J_Server_BETAIndex: java/com/l2jserver/gameserver/model/actor/L2Character.java===================================================================--- java/com/l2jserver/gameserver/model/actor/L2Character.java (revision 6438)+++ java/com/l2jserver/gameserver/model/actor/L2Character.java (working copy)@@ -46,6 +46,7 @@ import com.l2jserver.gameserver.ai.L2CharacterAI; import com.l2jserver.gameserver.data.xml.impl.CategoryData; import com.l2jserver.gameserver.data.xml.impl.DoorData;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.enums.CategoryType; import com.l2jserver.gameserver.enums.InstanceType;@@ -6342,9 +6343,9 @@ public void reduceCurrentHp(double i, L2Character attacker, boolean awake, boolean isDOT, L2Skill skill) {- if (Config.L2JMOD_CHAMPION_ENABLE && isChampion() && (Config.L2JMOD_CHAMPION_HP != 0))+ if (ChampionData.getInstance().isEnabled() && isChampion()) {- getStatus().reduceHp(i / Config.L2JMOD_CHAMPION_HP, attacker, awake, isDOT, false);+ getStatus().reduceHp(i / ChampionData.getInstance().getHpMultipler((L2Attackable) this), attacker, awake, isDOT, false); } else {Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java===================================================================--- java/com/l2jserver/gameserver/model/actor/L2Attackable.java (revision 6438)+++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java (working copy)@@ -35,6 +35,7 @@ import com.l2jserver.gameserver.ai.L2CharacterAI; import com.l2jserver.gameserver.ai.L2FortSiegeGuardAI; import com.l2jserver.gameserver.ai.L2SiegeGuardAI;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.datatables.EventDroplist; import com.l2jserver.gameserver.datatables.EventDroplist.DateDrop; import com.l2jserver.gameserver.datatables.ItemTable;@@ -77,6 +78,7 @@ private boolean _isRaid = false; private boolean _isRaidMinion = false; private boolean _champion = false;+ private boolean _isHardChamp = false; private final Map<L2Character, AggroInfo> _aggroList = new ConcurrentHashMap<>(); private boolean _isReturningToSpawnPoint = false; private boolean _canReturnToSpawnPoint = true;@@ -515,10 +517,10 @@ long exp = expSp[0]; int sp = expSp[1]; - if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())+ if (ChampionData.getInstance().isEnabled() && isChampion()) {- exp *= Config.L2JMOD_CHAMPION_REWARDS;- sp *= Config.L2JMOD_CHAMPION_REWARDS;+ exp *= ChampionData.getInstance().getRewardMultipler(this);+ sp *= ChampionData.getInstance().getRewardMultipler(this); } exp *= penalty;@@ -624,10 +626,10 @@ long exp = expSp[0]; int sp = expSp[1]; - if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())+ if (ChampionData.getInstance().isEnabled() && isChampion()) {- exp *= Config.L2JMOD_CHAMPION_REWARDS;- sp *= Config.L2JMOD_CHAMPION_REWARDS;+ exp *= ChampionData.getInstance().getRewardMultipler(this);+ sp *= ChampionData.getInstance().getRewardMultipler(this); } exp *= partyMul;@@ -1061,12 +1063,11 @@ } // Apply Special Item drop with random(rnd) quantity(qty) for champions.- if (Config.L2JMOD_CHAMPION_ENABLE && isChampion() && ((Config.L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE > 0) || (Config.L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE > 0)))+ if (ChampionData.getInstance().isEnabled() && isChampion() && ((ChampionData.getInstance().getLowerLvChance(this) > 0) || (ChampionData.getInstance().getHigherLvChance(this) > 0))) {- int champqty = Rnd.get(Config.L2JMOD_CHAMPION_REWARD_QTY);- ItemHolder item = new ItemHolder(Config.L2JMOD_CHAMPION_REWARD_ID, ++champqty);- - if ((player.getLevel() <= getLevel()) && (Rnd.get(100) < Config.L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE))+ int champqty = Rnd.get(ChampionData.getInstance().getRewardCount(this));+ ItemHolder item = new ItemHolder(ChampionData.getInstance().getRewardId(this), ++champqty);+ if ((player.getLevel() <= getLevel()) && (Rnd.get(100) < ChampionData.getInstance().getLowerLvChance(this))) { if (Config.AUTO_LOOT || isFlying()) {@@ -1077,7 +1078,7 @@ dropItem(player, item); } }- else if ((player.getLevel() > getLevel()) && (Rnd.get(100) < Config.L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE))+ else if ((player.getLevel() > getLevel()) && (Rnd.get(100) < ChampionData.getInstance().getHigherLvChance(this))) { if (Config.AUTO_LOOT || isFlying()) {@@ -1709,7 +1710,7 @@ */ public boolean useVitalityRate() {- if (isChampion() && !Config.L2JMOD_CHAMPION_ENABLE_VITALITY)+ if (isChampion() && !ChampionData.getInstance().isEnabledVitality(this)) { return false; }@@ -1774,6 +1775,16 @@ return _champion; } + public void setHardChampion(boolean champ)+ {+ _isHardChamp = champ;+ }+ + public boolean isHardChampion()+ {+ return _isHardChamp;+ }+ @Override public boolean isAttackable() {Index: java/com/l2jserver/gameserver/model/stats/Formulas.java===================================================================--- java/com/l2jserver/gameserver/model/stats/Formulas.java (revision 6438)+++ java/com/l2jserver/gameserver/model/stats/Formulas.java (working copy)@@ -25,6 +25,7 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.SevenSigns; import com.l2jserver.gameserver.SevenSignsFestival;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.data.xml.impl.HitConditionBonusData; import com.l2jserver.gameserver.data.xml.impl.KarmaData; import com.l2jserver.gameserver.enums.ShotType;@@ -254,9 +255,9 @@ double hpRegenMultiplier = cha.isRaid() ? Config.RAID_HP_REGEN_MULTIPLIER : Config.HP_REGEN_MULTIPLIER; double hpRegenBonus = 0; - if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())+ if (ChampionData.getInstance().isEnabled() && cha.isChampion()) {- hpRegenMultiplier *= Config.L2JMOD_CHAMPION_HP_REGEN;+ hpRegenMultiplier *= ChampionData.getInstance().getHpRegMultipler((L2Attackable) cha); } if (cha.isPlayer())Index: java/com/l2jserver/gameserver/model/quest/Quest.java===================================================================--- java/com/l2jserver/gameserver/model/quest/Quest.java (revision 6438)+++ java/com/l2jserver/gameserver/model/quest/Quest.java (working copy)@@ -37,6 +37,7 @@ import com.l2jserver.Config; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.cache.HtmCache;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.enums.CategoryType; import com.l2jserver.gameserver.enums.Race; import com.l2jserver.gameserver.enums.TrapAction;Index: java\com\l2jserver\gameserver\model\events\AbstractScript.java===================================================================--- java\com\l2jserver\gameserver\model\events\AbstractScript.java (revision 6438)+++ java\com\l2jserver\gameserver\model\events\AbstractScript.java (working copy)@@ -2287,18 +2288,18 @@ minAmount *= Config.RATE_QUEST_DROP; maxAmount *= Config.RATE_QUEST_DROP; dropChance *= Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount- if ((npc != null) && Config.L2JMOD_CHAMPION_ENABLE && npc.isChampion())+ if ((npc != null) && ChampionData.getInstance().isEnabled() && npc.isChampion()) {- dropChance *= Config.L2JMOD_CHAMPION_REWARDS;+ dropChance *= ChampionData.getInstance().getRewardMultipler((L2Attackable) npc); if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID)) {- minAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS;- maxAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS;+ minAmount *= ChampionData.getInstance().getAdenaMultipler((L2Attackable) npc);+ maxAmount *= ChampionData.getInstance().getAdenaMultipler((L2Attackable) npc); } else {- minAmount *= Config.L2JMOD_CHAMPION_REWARDS;- maxAmount *= Config.L2JMOD_CHAMPION_REWARDS;+ minAmount *= ChampionData.getInstance().getRewardMultipler((L2Attackable) npc);+ maxAmount *= ChampionData.getInstance().getRewardMultipler((L2Attackable) npc); } } Index: java/com/l2jserver/gameserver/ai/L2AttackableAI.java===================================================================--- java/com/l2jserver/gameserver/ai/L2AttackableAI.java (revision 6438)+++ java/com/l2jserver/gameserver/ai/L2AttackableAI.java (working copy)@@ -31,6 +31,7 @@ import com.l2jserver.gameserver.GameTimeController; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ThreadPoolManager;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.data.sql.impl.TerritoryTable; import com.l2jserver.gameserver.data.xml.impl.NpcData; import com.l2jserver.gameserver.enums.AISkillScope;@@ -292,7 +293,7 @@ return false; } - if (me.isChampion() && Config.L2JMOD_CHAMPION_PASSIVE)+ if (me.isChampion() && ChampionData.getInstance().isPassive(me)) { return false; }Index: java/com/l2jserver/Config.java===================================================================--- java/com/l2jserver/Config.java (revision 6438)+++ java/com/l2jserver/Config.java (working copy)@@ -107,6 +107,7 @@ public static final String EMAIL_CONFIG_FILE = "./config/Email.properties"; public static final String CH_SIEGE_FILE = "./config/ConquerableHallSiege.properties"; public static final String GEODATA_FILE = "./config/GeoData.properties";+ public static final String CHAMPION_MOD = "./config/ChampionMod.properties"; // -------------------------------------------------- // L2J Variable Definitions // --------------------------------------------------@@ -667,24 +668,6 @@ // -------------------------------------------------- // L2JMods Settings // --------------------------------------------------- public static boolean L2JMOD_CHAMPION_ENABLE;- public static boolean L2JMOD_CHAMPION_PASSIVE;- public static int L2JMOD_CHAMPION_FREQUENCY;- public static String L2JMOD_CHAMP_TITLE;- public static int L2JMOD_CHAMP_MIN_LVL;- public static int L2JMOD_CHAMP_MAX_LVL;- public static int L2JMOD_CHAMPION_HP;- public static int L2JMOD_CHAMPION_REWARDS;- public static float L2JMOD_CHAMPION_ADENAS_REWARDS;- public static float L2JMOD_CHAMPION_HP_REGEN;- public static float L2JMOD_CHAMPION_ATK;- public static float L2JMOD_CHAMPION_SPD_ATK;- public static int L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;- public static int L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;- public static int L2JMOD_CHAMPION_REWARD_ID;- public static int L2JMOD_CHAMPION_REWARD_QTY;- public static boolean L2JMOD_CHAMPION_ENABLE_VITALITY;- public static boolean L2JMOD_CHAMPION_ENABLE_IN_INSTANCES; public static boolean TVT_EVENT_ENABLED; public static boolean TVT_EVENT_IN_INSTANCE; public static String TVT_EVENT_INSTANCE_FILE;@@ -968,6 +951,40 @@ public static int STARTING_VITALITY_POINTS; // --------------------------------------------------+ // Champion Mod Settings+ // --------------------------------------------------+ public static boolean CHAMPION_ENABLE;+ public static boolean CHAMPION_PASSIVE;+ public static int CHAMPION_FREQUENCY_EASY;+ public static int CHAMPION_FREQUENCY_HARD;+ public static String CHAMPION_TITLE_EASY;+ public static String CHAMPION_TITLE_HARD;+ public static int CHAMPION_MIN_LVL_EASY;+ public static int CHAMPION_MIN_LVL_HARD;+ public static int CHAMPION_MAX_LVL_EASY;+ public static int CHAMPION_MAX_LVL_HARD;+ public static int CHAMPION_HP_EASY;+ public static int CHAMPION_HP_HARD;+ public static int CHAMPION_REWARDS_EASY;+ public static int CHAMPION_REWARDS_HARD;+ public static float CHAMPION_ADENAS_REWARD_EASY;+ public static float CHAMPION_ADENAS_REWARD_HARD;+ public static float CHAMPION_HP_REGEN_EASY;+ public static float CHAMPION_HP_REGEN_HARD;+ public static float CHAMPION_ATK_EASY;+ public static float CHAMPION_ATK_HARD;+ public static float CHAMPION_SPD_ATK_EASY;+ public static float CHAMPION_SPD_ATK_HARD;+ public static int CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;+ public static int CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;+ public static int CHAMPION_REWARD_ID_EASY;+ public static int CHAMPION_REWARD_ID_HARD;+ public static int CHAMPION_REWARD_QTY_EASY;+ public static int CHAMPION_REWARD_QTY_HARD;+ public static boolean CHAMPION_ENABLE_VITALITY;+ public static boolean CHAMPION_ENABLE_IN_INSTANCES;+ + // -------------------------------------------------- // No classification assigned to the following yet // -------------------------------------------------- public static int MAX_ITEM_IN_PACKET;@@ -2154,28 +2171,41 @@ } } + // Load Champion Mod L2Properties file (if exists)+ final PropertiesParser ChampionMod = new PropertiesParser(CHAMPION_MOD);+ CHAMPION_ENABLE = ChampionMod.getBoolean("ChampionEnable", false);+ CHAMPION_PASSIVE = ChampionMod.getBoolean("ChampionPassive", false);+ CHAMPION_ENABLE_VITALITY = ChampionMod.getBoolean("ChampionEnableVitality", false);+ CHAMPION_ENABLE_IN_INSTANCES = ChampionMod.getBoolean("ChampionEnableInInstances", false);+ CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = ChampionMod.getInt("ChampionRewardLowerLvlItemChance", 0);+ CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = ChampionMod.getInt("ChampionRewardHigherLvlItemChance", 0);+ CHAMPION_FREQUENCY_EASY = ChampionMod.getInt("ChampionFrequencyEasy", 0);+ CHAMPION_FREQUENCY_HARD = ChampionMod.getInt("ChampionFrequencyHard", 0);+ CHAMPION_TITLE_EASY = ChampionMod.getString("ChampionTitleEasy", "Easy Champion");+ CHAMPION_TITLE_HARD = ChampionMod.getString("ChampionTitleHard", "Hard Champion");+ CHAMPION_MIN_LVL_EASY = ChampionMod.getInt("ChampionMinLevelEasy", 20);+ CHAMPION_MIN_LVL_HARD = ChampionMod.getInt("ChampionMinLevelHard", 20);+ CHAMPION_MAX_LVL_EASY = ChampionMod.getInt("ChampionMaxLevelEasy", 60);+ CHAMPION_MAX_LVL_HARD = ChampionMod.getInt("ChampionMaxLevelHard", 60);+ CHAMPION_HP_EASY = ChampionMod.getInt("ChampionHpEasy", 7);+ CHAMPION_HP_HARD = ChampionMod.getInt("ChampionHpHard", 14);+ CHAMPION_HP_REGEN_EASY = ChampionMod.getFloat("ChampionHpRegenEasy", 1);+ CHAMPION_HP_REGEN_HARD = ChampionMod.getFloat("ChampionHpRegenHard", 1);+ CHAMPION_REWARDS_EASY = ChampionMod.getInt("ChampionRewardsEasy", 2);+ CHAMPION_REWARDS_HARD = ChampionMod.getInt("ChampionRewardsHard", 3);+ CHAMPION_ADENAS_REWARD_EASY = ChampionMod.getFloat("ChampionAdenasRewardsEasy", 1);+ CHAMPION_ADENAS_REWARD_HARD = ChampionMod.getFloat("ChampionAdenasRewardsHard", 2);+ CHAMPION_ATK_EASY = ChampionMod.getFloat("ChampionAtkEasy", 1);+ CHAMPION_ATK_HARD = ChampionMod.getFloat("ChampionAtkHard", 2);+ CHAMPION_SPD_ATK_EASY = ChampionMod.getFloat("ChampionSpdAtkEasy", 1);+ CHAMPION_SPD_ATK_HARD = ChampionMod.getFloat("ChampionSpdAtkHard", 2);+ CHAMPION_REWARD_ID_EASY = ChampionMod.getInt("ChampionRewardItemIDEasy", 6393);+ CHAMPION_REWARD_ID_HARD = ChampionMod.getInt("ChampionRewardItemIDHard", 6393);+ CHAMPION_REWARD_QTY_EASY = ChampionMod.getInt("ChampionRewardItemQtyEasy", 1);+ CHAMPION_REWARD_QTY_HARD = ChampionMod.getInt("ChampionRewardItemQtyHard", 2);+ // Load L2JMod L2Properties file (if exists) final PropertiesParser L2JModSettings = new PropertiesParser(L2JMOD_CONFIG_FILE);- - L2JMOD_CHAMPION_ENABLE = L2JModSettings.getBoolean("ChampionEnable", false);- L2JMOD_CHAMPION_PASSIVE = L2JModSettings.getBoolean("ChampionPassive", false);- L2JMOD_CHAMPION_FREQUENCY = L2JModSettings.getInt("ChampionFrequency", 0);- L2JMOD_CHAMP_TITLE = L2JModSettings.getString("ChampionTitle", "Champion");- L2JMOD_CHAMP_MIN_LVL = L2JModSettings.getInt("ChampionMinLevel", 20);- L2JMOD_CHAMP_MAX_LVL = L2JModSettings.getInt("ChampionMaxLevel", 60);- L2JMOD_CHAMPION_HP = L2JModSettings.getInt("ChampionHp", 7);- L2JMOD_CHAMPION_HP_REGEN = L2JModSettings.getFloat("ChampionHpRegen", 1);- L2JMOD_CHAMPION_REWARDS = L2JModSettings.getInt("ChampionRewards", ;- L2JMOD_CHAMPION_ADENAS_REWARDS = L2JModSettings.getFloat("ChampionAdenasRewards", 1);- L2JMOD_CHAMPION_ATK = L2JModSettings.getFloat("ChampionAtk", 1);- L2JMOD_CHAMPION_SPD_ATK = L2JModSettings.getFloat("ChampionSpdAtk", 1);- L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = L2JModSettings.getInt("ChampionRewardLowerLvlItemChance", 0);- L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = L2JModSettings.getInt("ChampionRewardHigherLvlItemChance", 0);- L2JMOD_CHAMPION_REWARD_ID = L2JModSettings.getInt("ChampionRewardItemID", 6393);- L2JMOD_CHAMPION_REWARD_QTY = L2JModSettings.getInt("ChampionRewardItemQty", 1);- L2JMOD_CHAMPION_ENABLE_VITALITY = L2JModSettings.getBoolean("ChampionEnableVitality", false);- L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = L2JModSettings.getBoolean("ChampionEnableInInstances", false);- TVT_EVENT_ENABLED = L2JModSettings.getBoolean("TvTEventEnabled", false); TVT_EVENT_IN_INSTANCE = L2JModSettings.getBoolean("TvTEventInInstance", false); TVT_EVENT_INSTANCE_FILE = L2JModSettings.getString("TvTEventInstanceFile", "coliseum.xml");@@ -3432,51 +3462,6 @@ case "commonrecipelimit": COMMON_RECIPE_LIMIT = Integer.parseInt(pValue); break;- case "championenable":- L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(pValue);- break;- case "championfrequency":- L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(pValue);- break;- case "championminlevel":- L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(pValue);- break;- case "championmaxlevel":- L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(pValue);- break;- case "championhp":- L2JMOD_CHAMPION_HP = Integer.parseInt(pValue);- break;- case "championhpregen":- L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue);- break;- case "championrewards":- L2JMOD_CHAMPION_REWARDS = Integer.parseInt(pValue);- break;- case "championadenasrewards":- L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(pValue);- break;- case "championatk":- L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue);- break;- case "championspdatk":- L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(pValue);- break;- case "championrewardlowerlvlitemchance":- L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);- break;- case "championrewardhigherlvlitemchance":- L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);- break;- case "championrewarditemid":- L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);- break;- case "championrewarditemqty":- L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);- break;- case "championenableininstances":- L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue);- break; case "allowwedding": L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue); break;Index: java/com/l2jserver/gameserver/datatables/ChampionData.java===================================================================--- java/com/l2jserver/gameserver/datatables/ChampionData.java (revision 0)+++ java/com/l2jserver/gameserver/datatables/ChampionData.java (working copy)@@ -0,0 +1,140 @@+/*+ * Copyright © 2004-2014 L2J Server+ *+ * This file is part of L2J Server.+ *+ * L2J Server 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.+ *+ * L2J Server 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.l2jserver.gameserver.datatables;++import java.util.logging.Logger;++import com.l2jserver.Config;+import com.l2jserver.gameserver.model.actor.L2Attackable;++/**+ * @author St3eT+ */+public class ChampionData+{+ private static final Logger _log = Logger.getLogger(ChampionData.class.getName());+ + public boolean isEnabled()+ {+ return Config.CHAMPION_ENABLE;+ }+ + public boolean isPassive(L2Attackable champion)+ {+ // TODO: Implement it for both champions.+ return Config.CHAMPION_PASSIVE;+ }+ + public String getTitle(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_TITLE_HARD : Config.CHAMPION_TITLE_EASY;+ }+ + public int getChance(boolean isHard)+ {+ return isHard ? Config.CHAMPION_FREQUENCY_HARD : Config.CHAMPION_FREQUENCY_EASY;+ }+ + public int getMinLv(boolean isHard)+ {+ return isHard ? Config.CHAMPION_MIN_LVL_HARD : Config.CHAMPION_MIN_LVL_EASY;+ }+ + public int getMaxLv(boolean isHard)+ {+ return isHard ? Config.CHAMPION_MAX_LVL_HARD : Config.CHAMPION_MAX_LVL_EASY;+ }+ + public int getHpMultipler(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_HP_HARD : Config.CHAMPION_HP_EASY;+ }+ + public int getRewardMultipler(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_REWARDS_HARD : Config.CHAMPION_REWARDS_EASY;+ }+ + public float getAdenaMultipler(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_ADENAS_REWARD_HARD : Config.CHAMPION_ADENAS_REWARD_EASY;+ }+ + public float getHpRegMultipler(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_HP_REGEN_HARD : Config.CHAMPION_HP_REGEN_EASY;+ }+ + public float getAttackMultipler(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_ATK_HARD : Config.CHAMPION_ATK_EASY;+ }+ + public float getAttacSpdkMultipler(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_SPD_ATK_HARD : Config.CHAMPION_SPD_ATK_EASY;+ }+ + public int getLowerLvChance(L2Attackable champion)+ {+ // TODO: Implement it for both champions.+ return Config.CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;+ }+ + public int getHigherLvChance(L2Attackable champion)+ {+ // TODO: Implement it for both champions.+ return Config.CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;+ }+ + public int getRewardId(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_REWARD_ID_HARD : Config.CHAMPION_REWARD_ID_EASY;+ }+ + public int getRewardCount(L2Attackable champion)+ {+ return champion.isHardChampion() ? Config.CHAMPION_REWARD_QTY_HARD : Config.CHAMPION_REWARD_QTY_EASY;+ }+ + public boolean isEnabledVitality(L2Attackable champion)+ {+ // TODO: Implement it for both champions.+ return Config.CHAMPION_ENABLE_VITALITY;+ }+ + public boolean inInstanceEnabled()+ {+ return Config.CHAMPION_ENABLE_IN_INSTANCES;+ }+ + /**+ * Gets the single instance of ChampionData.+ * @return single instance of ChampionData+ */+ public static ChampionData getInstance()+ {+ return SingletonHolder._instance;+ }+ + private static class SingletonHolder+ {+ protected static final ChampionData _instance = new ChampionData();+ }+}\ No newline at end of fileIndex: java/com/l2jserver/gameserver/model/L2Spawn.java===================================================================--- java/com/l2jserver/gameserver/model/L2Spawn.java (revision 6438)+++ java/com/l2jserver/gameserver/model/L2Spawn.java (working copy)@@ -31,6 +31,7 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.GeoData; import com.l2jserver.gameserver.ThreadPoolManager;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.data.sql.impl.TerritoryTable; import com.l2jserver.gameserver.data.xml.impl.NpcData; import com.l2jserver.gameserver.datatables.NpcPersonalAIData;@@ -645,16 +646,26 @@ ((L2Attackable) mob).setChampion(false); } - if (Config.L2JMOD_CHAMPION_ENABLE)+ if (ChampionData.getInstance().isEnabled()) { // Set champion on next spawn- if (mob.isMonster() && !getTemplate().isUndying() && !mob.isRaid() && !mob.isRaidMinion() && (Config.L2JMOD_CHAMPION_FREQUENCY > 0) && (mob.getLevel() >= Config.L2JMOD_CHAMP_MIN_LVL) && (mob.getLevel() <= Config.L2JMOD_CHAMP_MAX_LVL) && (Config.L2JMOD_CHAMPION_ENABLE_IN_INSTANCES || (getInstanceId() == 0)))+ if (mob.isMonster() && !getTemplate().isUndying() && !mob.isRaid() && !mob.isRaidMinion() && (mob.getLevel() >= ChampionData.getInstance().getMinLv(false)) && (mob.getLevel() <= ChampionData.getInstance().getMaxLv(false)) && (ChampionData.getInstance().inInstanceEnabled() || (getInstanceId() == 0))) {- if (Rnd.get(100) < Config.L2JMOD_CHAMPION_FREQUENCY)+ if (Rnd.get(100) < ChampionData.getInstance().getChance(false)) { ((L2Attackable) mob).setChampion(true);+ ((L2Attackable) mob).setHardChampion(false); } }+ + if (mob.isMonster() && !getTemplate().isUndying() && !mob.isRaid() && !mob.isRaidMinion() && (mob.getLevel() >= ChampionData.getInstance().getMinLv(true)) && (mob.getLevel() <= ChampionData.getInstance().getMaxLv(true)) && (ChampionData.getInstance().inInstanceEnabled() || (getInstanceId() == 0)))+ {+ if (Rnd.get(100) < ChampionData.getInstance().getChance(true))+ {+ ((L2Attackable) mob).setChampion(true);+ ((L2Attackable) mob).setHardChampion(true);+ }+ } } // Link the L2NpcInstance to this L2SpawnIndex: java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java===================================================================--- java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java (revision 6438)+++ java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java (working copy)@@ -22,6 +22,8 @@ import java.util.List; import com.l2jserver.Config; import com.l2jserver.gameserver.datatables.ItemTable;+import com.l2jserver.gameserver.datatables.ChampionData;+import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.drops.GeneralDropItem; import com.l2jserver.gameserver.model.itemcontainer.Inventory;@@ -55,7 +57,7 @@ double multiplier = 1; if (victim.isChampion()) {- multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS : Config.L2JMOD_CHAMPION_ADENAS_REWARDS;+ multiplier *= item.getItemId() != Inventory.ADENA_ID ? ChampionData.getInstance().getRewardMultipler((L2Attackable) victim) : ChampionData.getInstance().getAdenaMultipler((L2Attackable) victim); } Float dropChanceMultiplier = Config.RATE_DROP_AMOUNT_MULTIPLIER.get(item.getItemId()); if (dropChanceMultiplier != null)Index: java/com/l2jserver/gameserver/model/actor/stat/CharStat.java===================================================================--- java/com/l2jserver/gameserver/model/actor/stat/CharStat.java (revision 6438)+++ java/com/l2jserver/gameserver/model/actor/stat/CharStat.java (working copy)@@ -21,8 +21,10 @@ import java.util.Arrays; import com.l2jserver.Config;+import com.l2jserver.gameserver.datatables.ChampionData; import com.l2jserver.gameserver.model.Elementals; import com.l2jserver.gameserver.model.PcCondOverride;+import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.items.L2Weapon; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;@@ -298,9 +300,9 @@ public int getMAtk(L2Character target, L2Skill skill) { float bonusAtk = 1;- if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())+ if (ChampionData.getInstance().isEnabled() && _activeChar.isChampion()) {- bonusAtk = Config.L2JMOD_CHAMPION_ATK;+ bonusAtk = ChampionData.getInstance().getAttackMultipler((L2Attackable) _activeChar); } if (_activeChar.isRaid()) {@@ -317,9 +319,9 @@ public int getMAtkSpd() { float bonusSpdAtk = 1;- if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())+ if (ChampionData.getInstance().isEnabled() && _activeChar.isChampion()) {- bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;+ bonusSpdAtk = ChampionData.getInstance().getAttacSpdkMultipler((L2Attackable) _activeChar); } double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().getBaseMAtkSpd() * bonusSpdAtk);@@ -429,9 +431,9 @@ public int getPAtk(L2Character target) { float bonusAtk = 1;- if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())+ if (ChampionData.getInstance().isEnabled() && _activeChar.isChampion()) {- bonusAtk = Config.L2JMOD_CHAMPION_ATK;+ bonusAtk = ChampionData.getInstance().getAttackMultipler((L2Attackable) _activeChar); } if (_activeChar.isRaid()) {@@ -446,9 +448,9 @@ public int getPAtkSpd() { float bonusAtk = 1;- if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())+ if (ChampionData.getInstance().isEnabled() && _activeChar.isChampion()) {- bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;+ bonusAtk = ChampionData.getInstance().getAttacSpdkMultipler((L2Attackable) _activeChar); } int val = (int) Math.round(calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().getBasePAtkSpd() * bonusAtk, null, null)); return val;Index: java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java===================================================================--- java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java (revision 6438)+++ java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java (working copy)@@ -19,10 +19,13 @@ package com.l2jserver.gameserver.network.serverpackets; import com.l2jserver.Config;+import com.l2jserver.gameserver.datatables.ChampionData;import com.l2jserver.gameserver.data.sql.impl.ClanTable;+import com.l2jserver.gameserver.enums.Team; import com.l2jserver.gameserver.instancemanager.TownManager; import com.l2jserver.gameserver.model.L2Clan; import com.l2jserver.gameserver.model.PcCondOverride;+import com.l2jserver.gameserver.model.actor.L2Attackable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Summon;@@ -100,8 +103,8 @@ _title = "Invisible"; } - else if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())+ if (ChampionData.getInstance().isEnabled() && cha.isChampion()) {- _title = (Config.L2JMOD_CHAMP_TITLE); // On every subclass+ _title = ChampionData.getInstance().getTitle((L2Attackable) cha); } else if (cha.getTemplate().isUsingServerSideTitle()) {@@ -189,8 +192,16 @@ writeD(_allyCrest); // all crest writeC(_npc.isInsideZone(ZoneId.WATER) ? 1 : _npc.isFlying() ? 2 : 0); // C2- writeC(_npc.getTeam().getId()); + if (_npc.isChampion())+ {+ writeC(((L2Attackable) _npc).isHardChampion() ? Team.RED.getId() : Team.BLUE.getId());+ }+ else+ {+ writeC(_npc.getTeam().getId());+ }+ writeF(_collisionRadius); writeF(_collisionHeight); writeD(_enchantEffect); // C4 Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
2terege 67 Опубликовано 24 апреля, 2015 (изменено) НУ в этом могу помочь и разьяснить само трудоемкое дело чутку на скок вы распалагаете стоп это тип скрипт чемпионы я их те с нуля могу написать даже неск видов у меня в моей сборке стоят 3 класа красных и 3 класа синих и выходит 6 видов чемпионов за это могу взятся ток оплата какую распологаете Изменено 24 апреля, 2015 пользователем 2terege Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
DrakeSnake 0 Опубликовано 24 апреля, 2015 (изменено) НУ в этом могу помочь и разьяснить само трудоемкое дело чутку на скок вы распалагаете стоп это тип скрипт чемпионы я их те с нуля могу написать даже неск видов у меня в моей сборке стоят 3 класа красных и 3 класа синих и выходит 6 видов чемпионов за это могу взятся ток оплата какую распологаете Разъяснение были бы очень кстати. А оплата. Боюсь, что для сборки, в которой максимальный онлайн будет 2-5 человек, финансов получится выделить меньше, чем вы ожидаете. Да и в конечном итоге с выходом каждой новой ревизии что-то придётся менять и реорганизовывать, что с моими нынешними знаниями абсолютно невозможно. Изменено 24 апреля, 2015 пользователем DrakeSnake Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
2terege 67 Опубликовано 24 апреля, 2015 Разъяснение были бы очень кстати. А оплата. Боюсь, что для сборки, в которой максимальный онлайн будет 2-5 человек, финансов получится выделить меньше, чем вы ожидаете. Да и в конечном итоге с выходом каждой новой ревизии что-то придётся менять и реорганизовывать, что с моими нынешними знаниями абсолютно невозможно. раз онлайн маленький тогда зачем те это Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
2terege 67 Опубликовано 24 апреля, 2015 раз онлайн маленький тогда зачем те это У меня есть свое гф ядро а хв5 не делал еше руки не дошли Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
DrakeSnake 0 Опубликовано 24 апреля, 2015 раз онлайн маленький тогда зачем те это Исключительно для себя, т.к дополнение пришлось по вкусу. Ну и не всем держать сервера с большим онлайном, кого-то устроят и свои маленькие домашние. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
2terege 67 Опубликовано 24 апреля, 2015 отпис в скайп условимся Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
gPoligon 15 Опубликовано 26 апреля, 2015 Лучше покажите ошибки, которые при компиле выскакивают. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты