Continue with previous commit.
This commit is contained in:
@@ -776,7 +776,6 @@ public final class Config
|
||||
public static boolean L2JMOD_MULTILANG_NS_ENABLE;
|
||||
public static List<String> L2JMOD_MULTILANG_NS_ALLOWED = new ArrayList<>();
|
||||
public static boolean L2WALKER_PROTECTION;
|
||||
public static boolean L2JMOD_DEBUG_VOICE_COMMAND;
|
||||
public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
|
||||
public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
|
||||
public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
|
||||
@@ -2563,7 +2562,6 @@ public final class Config
|
||||
}
|
||||
|
||||
L2WALKER_PROTECTION = CustomSettings.getBoolean("L2WalkerProtection", false);
|
||||
L2JMOD_DEBUG_VOICE_COMMAND = CustomSettings.getBoolean("DebugVoiceCommand", false);
|
||||
|
||||
L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP = CustomSettings.getInt("DualboxCheckMaxPlayersPerIP", 0);
|
||||
L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP = CustomSettings.getInt("DualboxCheckMaxOlympiadParticipantsPerIP", 0);
|
||||
|
@@ -244,12 +244,6 @@ public final class WalkingManager implements IXmlReader
|
||||
if ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_ACTIVE) || (npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE))
|
||||
{
|
||||
final WalkInfo walk = new WalkInfo(routeName);
|
||||
|
||||
if (npc.isDebug())
|
||||
{
|
||||
walk.setLastAction(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
L2NpcWalkerNode node = walk.getCurrentNode();
|
||||
|
||||
// adjust next waypoint, if NPC spawns at first waypoint
|
||||
@@ -257,18 +251,15 @@ public final class WalkingManager implements IXmlReader
|
||||
{
|
||||
walk.calculateNextNode(npc);
|
||||
node = walk.getCurrentNode();
|
||||
npc.sendDebugMessage("Route '" + routeName + "': spawn point is same with first waypoint, adjusted to next");
|
||||
}
|
||||
|
||||
if (!npc.isInsideRadius(node, 3000, true, false))
|
||||
{
|
||||
final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start";
|
||||
LOGGER.warning(getClass().getSimpleName() + ": " + message);
|
||||
npc.sendDebugMessage(message);
|
||||
return;
|
||||
}
|
||||
|
||||
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
|
||||
if (node.runToLocation())
|
||||
{
|
||||
npc.setRunning();
|
||||
@@ -286,7 +277,6 @@ public final class WalkingManager implements IXmlReader
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.sendDebugMessage("Failed to start moving along route '" + routeName + "', scheduled");
|
||||
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
|
||||
}
|
||||
}
|
||||
@@ -302,13 +292,11 @@ public final class WalkingManager implements IXmlReader
|
||||
// Prevent call simultaneously from scheduled task and onArrived() or temporarily stop walking for resuming in future
|
||||
if (walk.isBlocked() || walk.isSuspended())
|
||||
{
|
||||
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (operation is blocked)");
|
||||
return;
|
||||
}
|
||||
|
||||
walk.setBlocked(true);
|
||||
final L2NpcWalkerNode node = walk.getCurrentNode();
|
||||
npc.sendDebugMessage("Route '" + routeName + "', continuing to node " + walk.getCurrentNodeId());
|
||||
if (node.runToLocation())
|
||||
{
|
||||
npc.setRunning();
|
||||
@@ -321,10 +309,6 @@ public final class WalkingManager implements IXmlReader
|
||||
walk.setBlocked(false);
|
||||
walk.setStoppedByAttack(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (wrong AI state - " + npc.getAI().getIntention() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,8 +402,6 @@ public final class WalkingManager implements IXmlReader
|
||||
return;
|
||||
}
|
||||
|
||||
npc.sendDebugMessage("Route '" + walk.getRoute().getName() + "', arrived to node " + walk.getCurrentNodeId());
|
||||
npc.sendDebugMessage("Done in " + ((System.currentTimeMillis() - walk.getLastAction()) / 1000) + " s");
|
||||
walk.calculateNextNode(npc);
|
||||
walk.setBlocked(true); // prevents to be ran from walk check task, if there is delay in this node.
|
||||
|
||||
@@ -432,10 +414,6 @@ public final class WalkingManager implements IXmlReader
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
|
||||
}
|
||||
|
||||
if (npc.isDebug())
|
||||
{
|
||||
walk.setLastAction(System.currentTimeMillis());
|
||||
}
|
||||
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
|
||||
}
|
||||
|
||||
|
@@ -77,7 +77,6 @@ public class WalkInfo
|
||||
}
|
||||
|
||||
_currentNode = newNode;
|
||||
npc.sendDebugMessage("Route: " + getRoute().getName() + ", next random node is " + _currentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -94,7 +93,6 @@ public class WalkInfo
|
||||
{
|
||||
// Notify quest
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnNpcMoveRouteFinished(npc), npc);
|
||||
npc.sendDebugMessage("Route: " + getRoute().getName() + ", last node arrived");
|
||||
|
||||
if (!getRoute().repeatWalk())
|
||||
{
|
||||
|
@@ -217,8 +217,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
private final byte[] _zones = new byte[ZoneId.getZoneCount()];
|
||||
protected byte _zoneValidateCounter = 4;
|
||||
|
||||
private L2Character _debugger = null;
|
||||
|
||||
private final ReentrantLock _teleportLock = new ReentrantLock();
|
||||
private final StampedLock _attackLock = new StampedLock();
|
||||
|
||||
@@ -354,48 +352,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return _effectList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if this character is under debug.
|
||||
* @return {@code true} if this character is under debug, {@code false} otherwise
|
||||
*/
|
||||
public boolean isDebug()
|
||||
{
|
||||
return _debugger != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets character instance, to which debug packets will be send.
|
||||
* @param debugger the character debugging this character
|
||||
*/
|
||||
public void setDebug(L2Character debugger)
|
||||
{
|
||||
_debugger = debugger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send debug packet.
|
||||
* @param pkt
|
||||
*/
|
||||
public void sendDebugPacket(L2GameServerPacket pkt)
|
||||
{
|
||||
if (_debugger != null)
|
||||
{
|
||||
_debugger.sendPacket(pkt);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send debug text string
|
||||
* @param msg
|
||||
*/
|
||||
public void sendDebugMessage(String msg)
|
||||
{
|
||||
if (_debugger != null)
|
||||
{
|
||||
_debugger.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return character inventory, default null, overridden in L2Playable types and in L2NPcInstance
|
||||
*/
|
||||
@@ -2506,8 +2462,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
@Override
|
||||
public boolean deleteMe()
|
||||
{
|
||||
setDebug(null);
|
||||
|
||||
if (hasAI())
|
||||
{
|
||||
getAI().stopAITask();
|
||||
|
@@ -11082,7 +11082,6 @@ public final class L2PcInstance extends L2Playable
|
||||
abortAttack();
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
setDebug(null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@@ -26,8 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import com.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
import com.l2jmobius.gameserver.network.Debug;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
import com.l2jmobius.util.Rnd;
|
||||
|
||||
/**
|
||||
@@ -173,34 +171,6 @@ public final class EnchantScroll extends AbstractEnchantItem
|
||||
final double random = 100 * Rnd.nextDouble();
|
||||
final boolean success = (random < finalChance);
|
||||
|
||||
if (player.isDebug())
|
||||
{
|
||||
final EnchantItemGroup group = EnchantItemGroupsData.getInstance().getItemGroup(enchantItem.getItem(), _scrollGroupId);
|
||||
final StatsSet set = new StatsSet();
|
||||
if (isBlessed())
|
||||
{
|
||||
set.set("isBlessed", isBlessed());
|
||||
}
|
||||
if (isSafe())
|
||||
{
|
||||
set.set("isSafe", isSafe());
|
||||
}
|
||||
set.set("chance", Util.formatDouble(chance, "#.##"));
|
||||
if (bonusRate > 0)
|
||||
{
|
||||
set.set("bonusRate", Util.formatDouble(bonusRate, "#.##"));
|
||||
}
|
||||
if (supportBonusRate > 0)
|
||||
{
|
||||
set.set("supportBonusRate", Util.formatDouble(supportBonusRate, "#.##"));
|
||||
}
|
||||
set.set("finalChance", Util.formatDouble(finalChance, "#.##"));
|
||||
set.set("random", Util.formatDouble(random, "#.##"));
|
||||
set.set("success", success);
|
||||
set.set("item group", group.getName());
|
||||
set.set("scroll group", _scrollGroupId);
|
||||
Debug.sendItemDebug(player, enchantItem, set);
|
||||
}
|
||||
return success ? EnchantResultType.SUCCESS : EnchantResultType.FAILURE;
|
||||
}
|
||||
}
|
||||
|
@@ -75,7 +75,6 @@ public class Options
|
||||
{
|
||||
funcs.add(fuction);
|
||||
}
|
||||
player.sendDebugMessage("Adding stats: " + fuctionTemplate.getStat() + " val: " + fuctionTemplate.getValue());
|
||||
}
|
||||
return funcs;
|
||||
}
|
||||
@@ -157,7 +156,6 @@ public class Options
|
||||
|
||||
public void apply(L2PcInstance player)
|
||||
{
|
||||
player.sendDebugMessage("Activating option id: " + _id);
|
||||
if (hasFuncs())
|
||||
{
|
||||
player.addStatFuncs(getStatFuncs(null, player));
|
||||
@@ -165,19 +163,16 @@ public class Options
|
||||
if (hasActiveSkill())
|
||||
{
|
||||
addSkill(player, getActiveSkill().getSkill());
|
||||
player.sendDebugMessage("Adding active skill: " + getActiveSkill());
|
||||
}
|
||||
if (hasPassiveSkill())
|
||||
{
|
||||
addSkill(player, getPassiveSkill().getSkill());
|
||||
player.sendDebugMessage("Adding passive skill: " + getPassiveSkill());
|
||||
}
|
||||
if (hasActivationSkills())
|
||||
{
|
||||
for (OptionsSkillHolder holder : _activationSkills)
|
||||
{
|
||||
player.addTriggerSkill(holder);
|
||||
player.sendDebugMessage("Adding trigger skill: " + holder);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +181,6 @@ public class Options
|
||||
|
||||
public void remove(L2PcInstance player)
|
||||
{
|
||||
player.sendDebugMessage("Deactivating option id: " + _id);
|
||||
if (hasFuncs())
|
||||
{
|
||||
player.removeStatsOwner(this);
|
||||
@@ -194,19 +188,16 @@ public class Options
|
||||
if (hasActiveSkill())
|
||||
{
|
||||
player.removeSkill(getActiveSkill().getSkill(), false, false);
|
||||
player.sendDebugMessage("Removing active skill: " + getActiveSkill());
|
||||
}
|
||||
if (hasPassiveSkill())
|
||||
{
|
||||
player.removeSkill(getPassiveSkill().getSkill(), false, true);
|
||||
player.sendDebugMessage("Removing passive skill: " + getPassiveSkill());
|
||||
}
|
||||
if (hasActivationSkills())
|
||||
{
|
||||
for (OptionsSkillHolder holder : _activationSkills)
|
||||
{
|
||||
player.removeTriggerSkill(holder);
|
||||
player.sendDebugMessage("Removing trigger skill: " + holder);
|
||||
}
|
||||
}
|
||||
player.sendSkillList();
|
||||
|
@@ -1379,7 +1379,6 @@ public final class Skill implements IIdentifiable
|
||||
|
||||
if (effected.isInvulAgainst(getId(), getLevel()))
|
||||
{
|
||||
effected.sendDebugMessage("Skill " + toString() + " has been ignored (invul against)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,6 @@ import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.L2SiegeClan;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2CubicInstance;
|
||||
@@ -75,7 +74,6 @@ import com.l2jmobius.gameserver.model.zone.type.L2CastleZone;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2ClanHallZone;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2FortZone;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2MotherTreeZone;
|
||||
import com.l2jmobius.gameserver.network.Debug;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@@ -620,28 +618,6 @@ public final class Formulas
|
||||
damage *= weaponMod;
|
||||
damage *= penaltyMod;
|
||||
|
||||
if (attacker.isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("skillPower", skill.getPower(isPvP, isPvE));
|
||||
set.set("ssboost", ssboost);
|
||||
set.set("proximityBonus", proximityBonus);
|
||||
set.set("pvpBonus", pvpBonus);
|
||||
set.set("baseMod", baseMod);
|
||||
set.set("criticalMod", criticalMod);
|
||||
set.set("criticalModPos", criticalModPos);
|
||||
set.set("criticalVulnMod", criticalVulnMod);
|
||||
set.set("criticalAddMod", criticalAddMod);
|
||||
set.set("criticalAddVuln", criticalAddVuln);
|
||||
set.set("weaponTraitMod", weaponTraitMod);
|
||||
set.set("generalTraitMod", generalTraitMod);
|
||||
set.set("attributeMod", attributeMod);
|
||||
set.set("weaponMod", weaponMod);
|
||||
set.set("penaltyMod", penaltyMod);
|
||||
set.set("damage", (int) damage);
|
||||
Debug.sendSkillDebug(attacker, target, skill, set);
|
||||
}
|
||||
|
||||
return Math.max(damage, 1);
|
||||
}
|
||||
|
||||
@@ -711,26 +687,6 @@ public final class Formulas
|
||||
damage *= weaponMod;
|
||||
damage *= penaltyMod;
|
||||
|
||||
if (attacker.isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("skillPower", skill.getPower(isPvP, isPvE));
|
||||
set.set("ssboost", ssboost);
|
||||
set.set("proximityBonus", proximityBonus);
|
||||
set.set("pvpBonus", pvpBonus);
|
||||
set.set("baseMod", baseMod);
|
||||
set.set("criticalMod", criticalMod);
|
||||
set.set("criticalVulnMod", criticalVulnMod);
|
||||
set.set("criticalAddMod", criticalAddMod);
|
||||
set.set("criticalAddVuln", criticalAddVuln);
|
||||
set.set("generalTraitMod", generalTraitMod);
|
||||
set.set("attributeMod", attributeMod);
|
||||
set.set("weaponMod", weaponMod);
|
||||
set.set("penaltyMod", penaltyMod);
|
||||
set.set("damage", (int) damage);
|
||||
Debug.sendSkillDebug(attacker, target, skill, set);
|
||||
}
|
||||
|
||||
return Math.max(damage, 1);
|
||||
}
|
||||
|
||||
@@ -1431,19 +1387,6 @@ public final class Formulas
|
||||
final double rate = baseMod * elementMod * traitMod * mAtkMod * buffDebuffMod;
|
||||
final double finalRate = traitMod > 0 ? Util.constrain(rate, skill.getMinChance(), skill.getMaxChance()) : 0;
|
||||
|
||||
if (attacker.isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("baseMod", baseMod);
|
||||
set.set("elementMod", elementMod);
|
||||
set.set("traitMod", traitMod);
|
||||
set.set("mAtkMod", mAtkMod);
|
||||
set.set("buffDebuffMod", buffDebuffMod);
|
||||
set.set("rate", rate);
|
||||
set.set("finalRate", finalRate);
|
||||
Debug.sendSkillDebug(attacker, target, skill, set);
|
||||
}
|
||||
|
||||
if (finalRate <= Rnd.get(100))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
|
||||
@@ -1503,19 +1446,6 @@ public final class Formulas
|
||||
// Check the Rate Limits.
|
||||
final double finalRate = Util.constrain(rate, skill.getMinChance(), skill.getMaxChance());
|
||||
|
||||
if (attacker.getOwner().isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("baseMod", baseRate);
|
||||
set.set("resMod", resMod);
|
||||
set.set("statMod", statMod);
|
||||
set.set("elementMod", elementMod);
|
||||
set.set("lvlBonusMod", lvlBonusMod);
|
||||
set.set("rate", rate);
|
||||
set.set("finalRate", finalRate);
|
||||
Debug.sendSkillDebug(attacker.getOwner(), target, skill, set);
|
||||
}
|
||||
|
||||
return (Rnd.get(100) < finalRate);
|
||||
}
|
||||
|
||||
@@ -1546,17 +1476,6 @@ public final class Formulas
|
||||
final double resModifier = target.calcStat(Stats.MAGIC_SUCCESS_RES, 1, null, skill);
|
||||
final int rate = 100 - Math.round((float) (lvlModifier * targetModifier * resModifier));
|
||||
|
||||
if (attacker.isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("lvlDifference", lvlDifference);
|
||||
set.set("lvlModifier", lvlModifier);
|
||||
set.set("resModifier", resModifier);
|
||||
set.set("targetModifier", targetModifier);
|
||||
set.set("rate", rate);
|
||||
Debug.sendSkillDebug(attacker, target, skill, set);
|
||||
}
|
||||
|
||||
return (Rnd.get(100) < rate);
|
||||
}
|
||||
|
||||
@@ -1973,17 +1892,7 @@ public final class Formulas
|
||||
final double baseRate = blowChance * dexMod * sideMod;
|
||||
// Apply blow rates
|
||||
final double rate = activeChar.calcStat(Stats.BLOW_RATE, baseRate, target, null);
|
||||
// Debug
|
||||
if (activeChar.isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("dexMod", dexMod);
|
||||
set.set("blowChance", blowChance);
|
||||
set.set("sideMod", sideMod);
|
||||
set.set("baseRate", baseRate);
|
||||
set.set("rate", rate);
|
||||
Debug.sendSkillDebug(activeChar, target, skill, set);
|
||||
}
|
||||
|
||||
return Rnd.get(100) < rate;
|
||||
}
|
||||
|
||||
@@ -2000,15 +1909,7 @@ public final class Formulas
|
||||
final double prof = activeChar.calcStat(Stats.CANCEL_PROF, 0, target, null);
|
||||
final double resMod = 1 + (((vuln + prof) * -1) / 100);
|
||||
final double finalRate = rate / resMod;
|
||||
if (activeChar.isDebug())
|
||||
{
|
||||
final StatsSet set = new StatsSet();
|
||||
set.set("baseMod", rate);
|
||||
set.set("magicLevel", cancelMagicLvl);
|
||||
set.set("resMod", resMod);
|
||||
set.set("rate", finalRate);
|
||||
Debug.sendSkillDebug(activeChar, target, skill, set);
|
||||
}
|
||||
|
||||
// Prevent initialization.
|
||||
final List<BuffInfo> buffs = target.getEffectList().hasBuffs() ? new ArrayList<>(target.getEffectList().getBuffs()) : new ArrayList<>(1);
|
||||
if (target.getEffectList().hasTriggered())
|
||||
|
Reference in New Issue
Block a user