Removed admin debug command.

This commit is contained in:
MobiusDev 2017-12-08 20:54:24 +00:00
parent 7f03ec8d94
commit bdba87dec2
95 changed files with 0 additions and 1920 deletions

View File

@ -95,9 +95,6 @@
<admin command="admin_cw_add" accessLevel="100" confirmDlg="true" />
<admin command="admin_cw_info_menu" accessLevel="100" />
<!-- ADMIN DEBUG -->
<admin command="admin_debug" accessLevel="100" />
<!-- ADMIN DELETE -->
<admin command="admin_delete" accessLevel="100" />

View File

@ -68,7 +68,6 @@ import handlers.admincommandhandlers.AdminClan;
import handlers.admincommandhandlers.AdminClanHall;
import handlers.admincommandhandlers.AdminCreateItem;
import handlers.admincommandhandlers.AdminCursedWeapons;
import handlers.admincommandhandlers.AdminDebug;
import handlers.admincommandhandlers.AdminDelete;
import handlers.admincommandhandlers.AdminDisconnect;
import handlers.admincommandhandlers.AdminDoorControl;
@ -329,7 +328,6 @@ import handlers.usercommandhandlers.Unstuck;
import handlers.voicedcommandhandlers.Banking;
import handlers.voicedcommandhandlers.ChangePassword;
import handlers.voicedcommandhandlers.ChatAdmin;
import handlers.voicedcommandhandlers.Debug;
import handlers.voicedcommandhandlers.Lang;
import handlers.voicedcommandhandlers.Premium;
import handlers.voicedcommandhandlers.StatsVCmd;
@ -398,7 +396,6 @@ public class MasterHandler
AdminPcCondOverride.class,
AdminCreateItem.class,
AdminCursedWeapons.class,
AdminDebug.class,
AdminDelete.class,
AdminDisconnect.class,
AdminDoorControl.class,
@ -585,7 +582,6 @@ public class MasterHandler
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.CHAT_ADMIN ? ChatAdmin.class : null,
Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.DEBUG_VOICE_COMMAND ? Debug.class : null,
Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
},

View File

@ -1,85 +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 handlers.admincommandhandlers;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
public class AdminDebug implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_debug"
};
@Override
public final boolean useAdminCommand(String command, L2PcInstance activeChar)
{
final String[] commandSplit = command.split(" ");
if (ADMIN_COMMANDS[0].equalsIgnoreCase(commandSplit[0]))
{
L2Object target;
if (commandSplit.length > 1)
{
target = L2World.getInstance().getPlayer(commandSplit[1].trim());
if (target == null)
{
activeChar.sendPacket(SystemMessageId.THAT_PLAYER_IS_NOT_ONLINE);
return true;
}
}
else
{
target = activeChar.getTarget();
}
if (target instanceof L2Character)
{
setDebug(activeChar, (L2Character) target);
}
else
{
setDebug(activeChar, activeChar);
}
}
return true;
}
@Override
public final String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private final void setDebug(L2PcInstance activeChar, L2Character target)
{
if (target.isDebug())
{
target.setDebug(null);
activeChar.sendMessage("Stop debugging " + target.getName());
}
else
{
target.setDebug(activeChar);
activeChar.sendMessage("Start debugging " + target.getName());
}
}
}

View File

@ -59,18 +59,15 @@ public final class ResistSkill extends AbstractEffect
for (SkillHolder holder : _skills)
{
effected.addIgnoreSkillEffects(holder);
effected.sendDebugMessage("Applying invul against " + holder.getSkill());
}
}
@Override
public void onExit(BuffInfo info)
{
final L2Character effected = info.getEffected();
for (SkillHolder holder : _skills)
{
info.getEffected().removeIgnoreSkillEffects(holder);
effected.sendDebugMessage("Removing invul against " + holder.getSkill());
}
}
}

View File

@ -1,59 +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 handlers.voicedcommandhandlers;
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
public class Debug implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS =
{
"debug"
};
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
{
if (!AdminData.getInstance().hasAccess(command, activeChar.getAccessLevel()))
{
return false;
}
if (VOICED_COMMANDS[0].equalsIgnoreCase(command))
{
if (activeChar.isDebug())
{
activeChar.setDebug(null);
activeChar.sendMessage("Debugging disabled.");
}
else
{
activeChar.setDebug(activeChar);
activeChar.sendMessage("Debugging enabled.");
}
}
return true;
}
@Override
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}

View File

@ -274,12 +274,6 @@ public final class WalkingManager implements IGameXmlReader
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
@ -287,18 +281,15 @@ public final class WalkingManager implements IGameXmlReader
{
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(message);
npc.sendDebugMessage(message);
return;
}
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
if (node.runToLocation())
{
npc.setRunning();
@ -314,7 +305,6 @@ public final class WalkingManager implements IGameXmlReader
}
else
{
npc.sendDebugMessage("Failed to start moving along route '" + routeName + "', scheduled");
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
}
}
@ -332,13 +322,11 @@ public final class WalkingManager implements IGameXmlReader
// 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();
@ -351,10 +339,6 @@ public final class WalkingManager implements IGameXmlReader
walk.setBlocked(false);
walk.setStoppedByAttack(false);
}
else
{
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (wrong AI state - " + npc.getAI().getIntention() + ")");
}
}
}
}
@ -450,8 +434,6 @@ public final class WalkingManager implements IGameXmlReader
final L2NpcWalkerNode node = walk.getRoute().getNodeList().get(walk.getCurrentNodeId());
if (npc.isInsideRadius(node, 10, false, false))
{
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.
@ -464,11 +446,6 @@ public final class WalkingManager implements IGameXmlReader
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
}
if (npc.isDebug())
{
walk.setLastAction(System.currentTimeMillis());
}
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
}
}

View File

@ -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())
{

View File

@ -220,8 +220,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 Object _attackLock = new Object();
@ -353,48 +351,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(IClientOutgoingPacket 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
*/
@ -1712,8 +1668,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
@Override
public boolean deleteMe()
{
setDebug(null);
if (hasAI())
{
getAI().stopAITask();

View File

@ -728,10 +728,6 @@ public class L2Npc extends L2Character
{
html = html.replaceAll("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(new NpcHtmlMessage(getObjectId(), html));
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML : data/html/" + type + "/" + getId() + "-pk.htm");
}
player.sendPacket(ActionFailed.STATIC_PACKET);
return true;
}
@ -857,11 +853,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@ -879,11 +870,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -10757,7 +10757,6 @@ public final class L2PcInstance extends L2Playable
abortAttack();
abortCast();
stopMove(null);
setDebug(null);
}
catch (Exception e)
{

View File

@ -520,11 +520,6 @@ public class Hero
}
activeChar.sendPacket(DiaryReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herodiary.htm");
}
}
}
}
@ -617,11 +612,6 @@ public class Hero
FightReply.replace("%loos%", String.valueOf(_loss));
activeChar.sendPacket(FightReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herohistory.htm");
}
}
}
}

View File

@ -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;
/**
* @author UnAfraid
@ -183,34 +181,6 @@ public final class EnchantScroll extends AbstractEnchantItem
final double random = 100 * Rnd.nextDouble();
boolean success = (random < finalChance) || player.tryLuck();
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;
}
}

View File

@ -209,10 +209,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}
@ -240,10 +236,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}

View File

@ -159,7 +159,6 @@ public class Options
public void apply(L2PcInstance player)
{
player.sendDebugMessage("Activating option id: " + _id);
if (hasEffects())
{
final BuffInfo info = new BuffInfo(player, player, null, true, null, this);
@ -171,7 +170,6 @@ public class Options
{
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem());
}
player.sendDebugMessage("Appling instant effect: " + effect.getClass().getSimpleName());
}
else
{
@ -182,8 +180,6 @@ public class Options
{
info.addEffect(effect);
}
player.sendDebugMessage("Appling continious effect: " + effect.getClass().getSimpleName());
}
}
if (!info.getEffects().isEmpty())
@ -196,7 +192,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -204,7 +199,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -212,7 +206,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.addTriggerSkill(holder);
player.sendDebugMessage("Adding trigger skill: " + holder);
}
}
@ -222,14 +215,12 @@ public class Options
public void remove(L2PcInstance player)
{
player.sendDebugMessage("Deactivating option id: " + _id);
if (hasEffects())
{
for (BuffInfo info : player.getEffectList().getOptions())
{
if (info.getOption() == this)
{
player.sendDebugMessage("Removing effects: " + info.getEffects());
player.getEffectList().remove(info, false, true, true);
}
}
@ -239,7 +230,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
player.removeSkill(holder.getSkill(), false, false);
player.sendDebugMessage("Removing active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -247,7 +237,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
player.removeSkill(holder.getSkill(), false, true);
player.sendDebugMessage("Removing passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -255,7 +244,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.removeTriggerSkill(holder);
player.sendDebugMessage("Removing trigger skill: " + holder);
}
}

View File

@ -2770,11 +2770,6 @@ public class Quest extends AbstractScript implements IIdentifiable
player.sendPacket(npcReply);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + (filename.startsWith("data/") ? filename : "data/scripts/" + getPath().toLowerCase() + "/" + getName() + "/" + filename));
}
}
return content;

View File

@ -1159,7 +1159,6 @@ public final class Skill implements IIdentifiable
{
return null;
}
activeChar.sendDebugMessage("-> " + this + "\n TT: " + getTargetType() + "\n AS: " + getAffectScope() + "\n AO: " + getAffectObject());
final IAffectScopeHandler handler = AffectScopeHandler.getInstance().getHandler(getAffectScope());
if (handler != null)
{
@ -1338,7 +1337,6 @@ public final class Skill implements IIdentifiable
if (effected.isIgnoringSkillEffects(getId(), getLevel()))
{
effected.sendDebugMessage("Skill " + toString() + " has been ignored (ignoring skill effects)");
return;
}
@ -1376,7 +1374,6 @@ public final class Skill implements IIdentifiable
{
final BasicPropertyResist resist = effected.getBasicPropertyResist(getBasicProperty());
resist.increaseResistLevel();
effected.sendDebugMessage(toString() + " has increased your " + getBasicProperty() + " debuff resistance to " + resist.getResistLevel() + " level for " + resist.getRemainTime().toMillis() + " milliseconds.");
}
}

View File

@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.enums.BasicProperty;
import com.l2jmobius.gameserver.enums.DispelSlotType;
import com.l2jmobius.gameserver.enums.Position;
import com.l2jmobius.gameserver.enums.ShotType;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance;
@ -46,7 +45,6 @@ import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
import com.l2jmobius.gameserver.network.Debug;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@ -124,26 +122,6 @@ public final class Formulas
final double baseMod = ((77 * (((power + attacker.getPAtk()) * 0.666 * ssmod * cdMult) + (isPosition * (power + (attacker.getPAtk() * ssmod)) * randomMod) + (6 * cdPatk))) / defence);
final double damage = baseMod * weaponTraitMod * generalTraitMod * attributeMod * randomMod * pvpPveMod;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("skillPower", power);
set.set("ssboost", ssmod);
set.set("isPosition", isPosition);
set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod);
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", randomMod);
set.set("penaltyMod", pvpPveMod);
set.set("damage", (int) damage);
Debug.sendSkillDebug(attacker, target, skill, set);
}
return damage;
}
@ -706,18 +684,6 @@ public final class Formulas
final double rate = baseMod * elementMod * traitMod * buffDebuffMod;
final double finalRate = traitMod > 0 ? CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist : 0;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", baseMod);
set.set("elementMod", elementMod);
set.set("traitMod", traitMod);
set.set("buffDebuffMod", buffDebuffMod);
set.set("rate", rate);
set.set("finalRate", finalRate);
Debug.sendSkillDebug(attacker, target, skill, set);
}
if ((finalRate <= Rnd.get(100)) && (target != attacker))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
@ -786,19 +752,6 @@ public final class Formulas
// Check the Rate Limits.
final double finalRate = CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist;
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;
}
@ -824,17 +777,6 @@ public final class Formulas
final double resModifier = target.getStat().getValue(Stats.MAGIC_SUCCESS_RES, 1);
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);
}
@ -1102,15 +1044,6 @@ public final class Formulas
{
// Resist Modifier.
final int cancelMagicLvl = skill.getMagicLevel();
if (activeChar.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", rate);
set.set("magicLevel", cancelMagicLvl);
set.set("resMod", target.getStat().getValue(Stats.RESIST_DISPEL_BUFF, 1));
set.set("rate", rate);
Debug.sendSkillDebug(activeChar, target, skill, set);
}
// Prevent initialization.
final List<BuffInfo> buffs = target.getEffectList().getBuffs();

View File

@ -164,10 +164,6 @@ public final class RequestBypassToServer implements IClientIncomingPacket
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}
}
else
{
activeChar.sendDebugMessage("ObjectId of npc bypass is not digit: " + id);
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -76,10 +76,5 @@ public final class RequestLinkHtml implements IClientIncomingPacket
final NpcHtmlMessage msg = new NpcHtmlMessage(htmlObjectId);
msg.setFile(actor.getHtmlPrefix(), filename);
actor.sendPacket(msg);
if (actor.isGM() && actor.isDebug())
{
actor.sendMessage("HTML: " + filename);
}
}
}

View File

@ -95,9 +95,6 @@
<admin command="admin_cw_add" accessLevel="100" confirmDlg="true" />
<admin command="admin_cw_info_menu" accessLevel="100" />
<!-- ADMIN DEBUG -->
<admin command="admin_debug" accessLevel="100" />
<!-- ADMIN DELETE -->
<admin command="admin_delete" accessLevel="100" />

View File

@ -68,7 +68,6 @@ import handlers.admincommandhandlers.AdminClan;
import handlers.admincommandhandlers.AdminClanHall;
import handlers.admincommandhandlers.AdminCreateItem;
import handlers.admincommandhandlers.AdminCursedWeapons;
import handlers.admincommandhandlers.AdminDebug;
import handlers.admincommandhandlers.AdminDelete;
import handlers.admincommandhandlers.AdminDisconnect;
import handlers.admincommandhandlers.AdminDoorControl;
@ -330,7 +329,6 @@ import handlers.usercommandhandlers.Unstuck;
import handlers.voicedcommandhandlers.Banking;
import handlers.voicedcommandhandlers.ChangePassword;
import handlers.voicedcommandhandlers.ChatAdmin;
import handlers.voicedcommandhandlers.Debug;
import handlers.voicedcommandhandlers.Lang;
import handlers.voicedcommandhandlers.Premium;
import handlers.voicedcommandhandlers.StatsVCmd;
@ -399,7 +397,6 @@ public class MasterHandler
AdminPcCondOverride.class,
AdminCreateItem.class,
AdminCursedWeapons.class,
AdminDebug.class,
AdminDelete.class,
AdminDisconnect.class,
AdminDoorControl.class,
@ -587,7 +584,6 @@ public class MasterHandler
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.CHAT_ADMIN ? ChatAdmin.class : null,
Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.DEBUG_VOICE_COMMAND ? Debug.class : null,
Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
},

View File

@ -1,85 +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 handlers.admincommandhandlers;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
public class AdminDebug implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_debug"
};
@Override
public final boolean useAdminCommand(String command, L2PcInstance activeChar)
{
final String[] commandSplit = command.split(" ");
if (ADMIN_COMMANDS[0].equalsIgnoreCase(commandSplit[0]))
{
L2Object target;
if (commandSplit.length > 1)
{
target = L2World.getInstance().getPlayer(commandSplit[1].trim());
if (target == null)
{
activeChar.sendPacket(SystemMessageId.THAT_PLAYER_IS_NOT_ONLINE);
return true;
}
}
else
{
target = activeChar.getTarget();
}
if (target instanceof L2Character)
{
setDebug(activeChar, (L2Character) target);
}
else
{
setDebug(activeChar, activeChar);
}
}
return true;
}
@Override
public final String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private final void setDebug(L2PcInstance activeChar, L2Character target)
{
if (target.isDebug())
{
target.setDebug(null);
activeChar.sendMessage("Stop debugging " + target.getName());
}
else
{
target.setDebug(activeChar);
activeChar.sendMessage("Start debugging " + target.getName());
}
}
}

View File

@ -59,18 +59,15 @@ public final class ResistSkill extends AbstractEffect
for (SkillHolder holder : _skills)
{
effected.addIgnoreSkillEffects(holder);
effected.sendDebugMessage("Applying invul against " + holder.getSkill());
}
}
@Override
public void onExit(BuffInfo info)
{
final L2Character effected = info.getEffected();
for (SkillHolder holder : _skills)
{
info.getEffected().removeIgnoreSkillEffects(holder);
effected.sendDebugMessage("Removing invul against " + holder.getSkill());
}
}
}

View File

@ -1,59 +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 handlers.voicedcommandhandlers;
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
public class Debug implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS =
{
"debug"
};
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
{
if (!AdminData.getInstance().hasAccess(command, activeChar.getAccessLevel()))
{
return false;
}
if (VOICED_COMMANDS[0].equalsIgnoreCase(command))
{
if (activeChar.isDebug())
{
activeChar.setDebug(null);
activeChar.sendMessage("Debugging disabled.");
}
else
{
activeChar.setDebug(activeChar);
activeChar.sendMessage("Debugging enabled.");
}
}
return true;
}
@Override
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}

View File

@ -274,12 +274,6 @@ public final class WalkingManager implements IGameXmlReader
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
@ -287,18 +281,15 @@ public final class WalkingManager implements IGameXmlReader
{
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(message);
npc.sendDebugMessage(message);
return;
}
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
if (node.runToLocation())
{
npc.setRunning();
@ -314,7 +305,6 @@ public final class WalkingManager implements IGameXmlReader
}
else
{
npc.sendDebugMessage("Failed to start moving along route '" + routeName + "', scheduled");
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
}
}
@ -332,13 +322,11 @@ public final class WalkingManager implements IGameXmlReader
// 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();
@ -351,10 +339,6 @@ public final class WalkingManager implements IGameXmlReader
walk.setBlocked(false);
walk.setStoppedByAttack(false);
}
else
{
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (wrong AI state - " + npc.getAI().getIntention() + ")");
}
}
}
}
@ -450,8 +434,6 @@ public final class WalkingManager implements IGameXmlReader
final L2NpcWalkerNode node = walk.getRoute().getNodeList().get(walk.getCurrentNodeId());
if (npc.isInsideRadius(node, 10, false, false))
{
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.
@ -464,11 +446,6 @@ public final class WalkingManager implements IGameXmlReader
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
}
if (npc.isDebug())
{
walk.setLastAction(System.currentTimeMillis());
}
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
}
}

View File

@ -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())
{

View File

@ -220,8 +220,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 Object _attackLock = new Object();
@ -353,48 +351,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(IClientOutgoingPacket 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
*/
@ -1712,8 +1668,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
@Override
public boolean deleteMe()
{
setDebug(null);
if (hasAI())
{
getAI().stopAITask();

View File

@ -728,10 +728,6 @@ public class L2Npc extends L2Character
{
html = html.replaceAll("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(new NpcHtmlMessage(getObjectId(), html));
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML : data/html/" + type + "/" + getId() + "-pk.htm");
}
player.sendPacket(ActionFailed.STATIC_PACKET);
return true;
}
@ -857,11 +853,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@ -879,11 +870,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -10758,7 +10758,6 @@ public final class L2PcInstance extends L2Playable
abortAttack();
abortCast();
stopMove(null);
setDebug(null);
}
catch (Exception e)
{

View File

@ -520,11 +520,6 @@ public class Hero
}
activeChar.sendPacket(DiaryReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herodiary.htm");
}
}
}
}
@ -617,11 +612,6 @@ public class Hero
FightReply.replace("%loos%", String.valueOf(_loss));
activeChar.sendPacket(FightReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herohistory.htm");
}
}
}
}

View File

@ -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;
/**
* @author UnAfraid
@ -183,34 +181,6 @@ public final class EnchantScroll extends AbstractEnchantItem
final double random = 100 * Rnd.nextDouble();
boolean success = (random < finalChance) || player.tryLuck();
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;
}
}

View File

@ -209,10 +209,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}
@ -240,10 +236,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}

View File

@ -159,7 +159,6 @@ public class Options
public void apply(L2PcInstance player)
{
player.sendDebugMessage("Activating option id: " + _id);
if (hasEffects())
{
final BuffInfo info = new BuffInfo(player, player, null, true, null, this);
@ -171,7 +170,6 @@ public class Options
{
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem());
}
player.sendDebugMessage("Appling instant effect: " + effect.getClass().getSimpleName());
}
else
{
@ -182,8 +180,6 @@ public class Options
{
info.addEffect(effect);
}
player.sendDebugMessage("Appling continious effect: " + effect.getClass().getSimpleName());
}
}
if (!info.getEffects().isEmpty())
@ -196,7 +192,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -204,7 +199,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -212,7 +206,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.addTriggerSkill(holder);
player.sendDebugMessage("Adding trigger skill: " + holder);
}
}
@ -222,14 +215,12 @@ public class Options
public void remove(L2PcInstance player)
{
player.sendDebugMessage("Deactivating option id: " + _id);
if (hasEffects())
{
for (BuffInfo info : player.getEffectList().getOptions())
{
if (info.getOption() == this)
{
player.sendDebugMessage("Removing effects: " + info.getEffects());
player.getEffectList().remove(info, false, true, true);
}
}
@ -239,7 +230,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
player.removeSkill(holder.getSkill(), false, false);
player.sendDebugMessage("Removing active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -247,7 +237,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
player.removeSkill(holder.getSkill(), false, true);
player.sendDebugMessage("Removing passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -255,7 +244,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.removeTriggerSkill(holder);
player.sendDebugMessage("Removing trigger skill: " + holder);
}
}

View File

@ -2772,11 +2772,6 @@ public class Quest extends AbstractScript implements IIdentifiable
player.sendPacket(npcReply);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + (filename.startsWith("data/") ? filename : "data/scripts/" + getPath().toLowerCase() + "/" + getName() + "/" + filename));
}
}
return content;

View File

@ -1159,7 +1159,6 @@ public final class Skill implements IIdentifiable
{
return null;
}
activeChar.sendDebugMessage("-> " + this + "\n TT: " + getTargetType() + "\n AS: " + getAffectScope() + "\n AO: " + getAffectObject());
final IAffectScopeHandler handler = AffectScopeHandler.getInstance().getHandler(getAffectScope());
if (handler != null)
{
@ -1338,7 +1337,6 @@ public final class Skill implements IIdentifiable
if (effected.isIgnoringSkillEffects(getId(), getLevel()))
{
effected.sendDebugMessage("Skill " + toString() + " has been ignored (ignoring skill effects)");
return;
}
@ -1376,7 +1374,6 @@ public final class Skill implements IIdentifiable
{
final BasicPropertyResist resist = effected.getBasicPropertyResist(getBasicProperty());
resist.increaseResistLevel();
effected.sendDebugMessage(toString() + " has increased your " + getBasicProperty() + " debuff resistance to " + resist.getResistLevel() + " level for " + resist.getRemainTime().toMillis() + " milliseconds.");
}
}

View File

@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.enums.BasicProperty;
import com.l2jmobius.gameserver.enums.DispelSlotType;
import com.l2jmobius.gameserver.enums.Position;
import com.l2jmobius.gameserver.enums.ShotType;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance;
@ -46,7 +45,6 @@ import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
import com.l2jmobius.gameserver.network.Debug;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@ -124,26 +122,6 @@ public final class Formulas
final double baseMod = ((77 * (((power + attacker.getPAtk()) * 0.666 * ssmod * cdMult) + (isPosition * (power + (attacker.getPAtk() * ssmod)) * randomMod) + (6 * cdPatk))) / defence);
final double damage = baseMod * weaponTraitMod * generalTraitMod * attributeMod * randomMod * pvpPveMod;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("skillPower", power);
set.set("ssboost", ssmod);
set.set("isPosition", isPosition);
set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod);
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", randomMod);
set.set("penaltyMod", pvpPveMod);
set.set("damage", (int) damage);
Debug.sendSkillDebug(attacker, target, skill, set);
}
return damage;
}
@ -706,18 +684,6 @@ public final class Formulas
final double rate = baseMod * elementMod * traitMod * buffDebuffMod;
final double finalRate = traitMod > 0 ? CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist : 0;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", baseMod);
set.set("elementMod", elementMod);
set.set("traitMod", traitMod);
set.set("buffDebuffMod", buffDebuffMod);
set.set("rate", rate);
set.set("finalRate", finalRate);
Debug.sendSkillDebug(attacker, target, skill, set);
}
if ((finalRate <= Rnd.get(100)) && (target != attacker))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
@ -786,19 +752,6 @@ public final class Formulas
// Check the Rate Limits.
final double finalRate = CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist;
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;
}
@ -824,17 +777,6 @@ public final class Formulas
final double resModifier = target.getStat().getValue(Stats.MAGIC_SUCCESS_RES, 1);
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);
}
@ -1102,15 +1044,6 @@ public final class Formulas
{
// Resist Modifier.
final int cancelMagicLvl = skill.getMagicLevel();
if (activeChar.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", rate);
set.set("magicLevel", cancelMagicLvl);
set.set("resMod", target.getStat().getValue(Stats.RESIST_DISPEL_BUFF, 1));
set.set("rate", rate);
Debug.sendSkillDebug(activeChar, target, skill, set);
}
// Prevent initialization.
final List<BuffInfo> buffs = target.getEffectList().getBuffs();

View File

@ -164,10 +164,6 @@ public final class RequestBypassToServer implements IClientIncomingPacket
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}
}
else
{
activeChar.sendDebugMessage("ObjectId of npc bypass is not digit: " + id);
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -76,10 +76,5 @@ public final class RequestLinkHtml implements IClientIncomingPacket
final NpcHtmlMessage msg = new NpcHtmlMessage(htmlObjectId);
msg.setFile(actor.getHtmlPrefix(), filename);
actor.sendPacket(msg);
if (actor.isGM() && actor.isDebug())
{
actor.sendMessage("HTML: " + filename);
}
}
}

View File

@ -95,9 +95,6 @@
<admin command="admin_cw_add" accessLevel="100" confirmDlg="true" />
<admin command="admin_cw_info_menu" accessLevel="100" />
<!-- ADMIN DEBUG -->
<admin command="admin_debug" accessLevel="100" />
<!-- ADMIN DELETE -->
<admin command="admin_delete" accessLevel="100" />

View File

@ -68,7 +68,6 @@ import handlers.admincommandhandlers.AdminClan;
import handlers.admincommandhandlers.AdminClanHall;
import handlers.admincommandhandlers.AdminCreateItem;
import handlers.admincommandhandlers.AdminCursedWeapons;
import handlers.admincommandhandlers.AdminDebug;
import handlers.admincommandhandlers.AdminDelete;
import handlers.admincommandhandlers.AdminDisconnect;
import handlers.admincommandhandlers.AdminDoorControl;
@ -331,7 +330,6 @@ import handlers.usercommandhandlers.Unstuck;
import handlers.voicedcommandhandlers.Banking;
import handlers.voicedcommandhandlers.ChangePassword;
import handlers.voicedcommandhandlers.ChatAdmin;
import handlers.voicedcommandhandlers.Debug;
import handlers.voicedcommandhandlers.Lang;
import handlers.voicedcommandhandlers.Premium;
import handlers.voicedcommandhandlers.StatsVCmd;
@ -400,7 +398,6 @@ public class MasterHandler
AdminPcCondOverride.class,
AdminCreateItem.class,
AdminCursedWeapons.class,
AdminDebug.class,
AdminDelete.class,
AdminDisconnect.class,
AdminDoorControl.class,
@ -589,7 +586,6 @@ public class MasterHandler
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.CHAT_ADMIN ? ChatAdmin.class : null,
Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.DEBUG_VOICE_COMMAND ? Debug.class : null,
Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
},

View File

@ -1,85 +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 handlers.admincommandhandlers;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
public class AdminDebug implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_debug"
};
@Override
public final boolean useAdminCommand(String command, L2PcInstance activeChar)
{
final String[] commandSplit = command.split(" ");
if (ADMIN_COMMANDS[0].equalsIgnoreCase(commandSplit[0]))
{
L2Object target;
if (commandSplit.length > 1)
{
target = L2World.getInstance().getPlayer(commandSplit[1].trim());
if (target == null)
{
activeChar.sendPacket(SystemMessageId.THAT_PLAYER_IS_NOT_ONLINE);
return true;
}
}
else
{
target = activeChar.getTarget();
}
if (target instanceof L2Character)
{
setDebug(activeChar, (L2Character) target);
}
else
{
setDebug(activeChar, activeChar);
}
}
return true;
}
@Override
public final String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private final void setDebug(L2PcInstance activeChar, L2Character target)
{
if (target.isDebug())
{
target.setDebug(null);
activeChar.sendMessage("Stop debugging " + target.getName());
}
else
{
target.setDebug(activeChar);
activeChar.sendMessage("Start debugging " + target.getName());
}
}
}

View File

@ -59,18 +59,15 @@ public final class ResistSkill extends AbstractEffect
for (SkillHolder holder : _skills)
{
effected.addIgnoreSkillEffects(holder);
effected.sendDebugMessage("Applying invul against " + holder.getSkill());
}
}
@Override
public void onExit(BuffInfo info)
{
final L2Character effected = info.getEffected();
for (SkillHolder holder : _skills)
{
info.getEffected().removeIgnoreSkillEffects(holder);
effected.sendDebugMessage("Removing invul against " + holder.getSkill());
}
}
}

View File

@ -1,59 +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 handlers.voicedcommandhandlers;
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
public class Debug implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS =
{
"debug"
};
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
{
if (!AdminData.getInstance().hasAccess(command, activeChar.getAccessLevel()))
{
return false;
}
if (VOICED_COMMANDS[0].equalsIgnoreCase(command))
{
if (activeChar.isDebug())
{
activeChar.setDebug(null);
activeChar.sendMessage("Debugging disabled.");
}
else
{
activeChar.setDebug(activeChar);
activeChar.sendMessage("Debugging enabled.");
}
}
return true;
}
@Override
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}

View File

@ -274,12 +274,6 @@ public final class WalkingManager implements IGameXmlReader
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
@ -287,18 +281,15 @@ public final class WalkingManager implements IGameXmlReader
{
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(message);
npc.sendDebugMessage(message);
return;
}
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
if (node.runToLocation())
{
npc.setRunning();
@ -314,7 +305,6 @@ public final class WalkingManager implements IGameXmlReader
}
else
{
npc.sendDebugMessage("Failed to start moving along route '" + routeName + "', scheduled");
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
}
}
@ -332,13 +322,11 @@ public final class WalkingManager implements IGameXmlReader
// 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();
@ -351,10 +339,6 @@ public final class WalkingManager implements IGameXmlReader
walk.setBlocked(false);
walk.setStoppedByAttack(false);
}
else
{
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (wrong AI state - " + npc.getAI().getIntention() + ")");
}
}
}
}
@ -450,8 +434,6 @@ public final class WalkingManager implements IGameXmlReader
final L2NpcWalkerNode node = walk.getRoute().getNodeList().get(walk.getCurrentNodeId());
if (npc.isInsideRadius(node, 10, false, false))
{
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.
@ -464,11 +446,6 @@ public final class WalkingManager implements IGameXmlReader
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
}
if (npc.isDebug())
{
walk.setLastAction(System.currentTimeMillis());
}
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
}
}

View File

@ -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())
{

View File

@ -220,8 +220,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 Object _attackLock = new Object();
@ -353,48 +351,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(IClientOutgoingPacket 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
*/
@ -1712,8 +1668,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
@Override
public boolean deleteMe()
{
setDebug(null);
if (hasAI())
{
getAI().stopAITask();

View File

@ -728,10 +728,6 @@ public class L2Npc extends L2Character
{
html = html.replaceAll("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(new NpcHtmlMessage(getObjectId(), html));
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML : data/html/" + type + "/" + getId() + "-pk.htm");
}
player.sendPacket(ActionFailed.STATIC_PACKET);
return true;
}
@ -857,11 +853,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@ -879,11 +870,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -10768,7 +10768,6 @@ public final class L2PcInstance extends L2Playable
abortAttack();
abortCast();
stopMove(null);
setDebug(null);
}
catch (Exception e)
{

View File

@ -520,11 +520,6 @@ public class Hero
}
activeChar.sendPacket(DiaryReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herodiary.htm");
}
}
}
}
@ -617,11 +612,6 @@ public class Hero
FightReply.replace("%loos%", String.valueOf(_loss));
activeChar.sendPacket(FightReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herohistory.htm");
}
}
}
}

View File

@ -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;
/**
* @author UnAfraid
@ -183,34 +181,6 @@ public final class EnchantScroll extends AbstractEnchantItem
final double random = 100 * Rnd.nextDouble();
boolean success = (random < finalChance) || player.tryLuck();
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;
}
}

View File

@ -209,10 +209,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}
@ -240,10 +236,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}

View File

@ -159,7 +159,6 @@ public class Options
public void apply(L2PcInstance player)
{
player.sendDebugMessage("Activating option id: " + _id);
if (hasEffects())
{
final BuffInfo info = new BuffInfo(player, player, null, true, null, this);
@ -171,7 +170,6 @@ public class Options
{
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem());
}
player.sendDebugMessage("Appling instant effect: " + effect.getClass().getSimpleName());
}
else
{
@ -182,8 +180,6 @@ public class Options
{
info.addEffect(effect);
}
player.sendDebugMessage("Appling continious effect: " + effect.getClass().getSimpleName());
}
}
if (!info.getEffects().isEmpty())
@ -196,7 +192,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -204,7 +199,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -212,7 +206,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.addTriggerSkill(holder);
player.sendDebugMessage("Adding trigger skill: " + holder);
}
}
@ -222,14 +215,12 @@ public class Options
public void remove(L2PcInstance player)
{
player.sendDebugMessage("Deactivating option id: " + _id);
if (hasEffects())
{
for (BuffInfo info : player.getEffectList().getOptions())
{
if (info.getOption() == this)
{
player.sendDebugMessage("Removing effects: " + info.getEffects());
player.getEffectList().remove(info, false, true, true);
}
}
@ -239,7 +230,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
player.removeSkill(holder.getSkill(), false, false);
player.sendDebugMessage("Removing active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -247,7 +237,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
player.removeSkill(holder.getSkill(), false, true);
player.sendDebugMessage("Removing passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -255,7 +244,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.removeTriggerSkill(holder);
player.sendDebugMessage("Removing trigger skill: " + holder);
}
}

View File

@ -2773,11 +2773,6 @@ public class Quest extends AbstractScript implements IIdentifiable
player.sendPacket(npcReply);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + (filename.startsWith("data/") ? filename : "data/scripts/" + getPath().toLowerCase() + "/" + getName() + "/" + filename));
}
}
return content;

View File

@ -1159,7 +1159,6 @@ public final class Skill implements IIdentifiable
{
return null;
}
activeChar.sendDebugMessage("-> " + this + "\n TT: " + getTargetType() + "\n AS: " + getAffectScope() + "\n AO: " + getAffectObject());
final IAffectScopeHandler handler = AffectScopeHandler.getInstance().getHandler(getAffectScope());
if (handler != null)
{
@ -1338,7 +1337,6 @@ public final class Skill implements IIdentifiable
if (effected.isIgnoringSkillEffects(getId(), getLevel()))
{
effected.sendDebugMessage("Skill " + toString() + " has been ignored (ignoring skill effects)");
return;
}
@ -1376,7 +1374,6 @@ public final class Skill implements IIdentifiable
{
final BasicPropertyResist resist = effected.getBasicPropertyResist(getBasicProperty());
resist.increaseResistLevel();
effected.sendDebugMessage(toString() + " has increased your " + getBasicProperty() + " debuff resistance to " + resist.getResistLevel() + " level for " + resist.getRemainTime().toMillis() + " milliseconds.");
}
}

View File

@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.enums.BasicProperty;
import com.l2jmobius.gameserver.enums.DispelSlotType;
import com.l2jmobius.gameserver.enums.Position;
import com.l2jmobius.gameserver.enums.ShotType;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance;
@ -46,7 +45,6 @@ import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
import com.l2jmobius.gameserver.network.Debug;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@ -124,26 +122,6 @@ public final class Formulas
final double baseMod = ((77 * (((power + attacker.getPAtk()) * 0.666 * ssmod * cdMult) + (isPosition * (power + (attacker.getPAtk() * ssmod)) * randomMod) + (6 * cdPatk))) / defence);
final double damage = baseMod * weaponTraitMod * generalTraitMod * attributeMod * randomMod * pvpPveMod;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("skillPower", power);
set.set("ssboost", ssmod);
set.set("isPosition", isPosition);
set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod);
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", randomMod);
set.set("penaltyMod", pvpPveMod);
set.set("damage", (int) damage);
Debug.sendSkillDebug(attacker, target, skill, set);
}
return damage;
}
@ -706,18 +684,6 @@ public final class Formulas
final double rate = baseMod * elementMod * traitMod * buffDebuffMod;
final double finalRate = traitMod > 0 ? CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist : 0;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", baseMod);
set.set("elementMod", elementMod);
set.set("traitMod", traitMod);
set.set("buffDebuffMod", buffDebuffMod);
set.set("rate", rate);
set.set("finalRate", finalRate);
Debug.sendSkillDebug(attacker, target, skill, set);
}
if ((finalRate <= Rnd.get(100)) && (target != attacker))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
@ -786,19 +752,6 @@ public final class Formulas
// Check the Rate Limits.
final double finalRate = CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist;
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;
}
@ -824,17 +777,6 @@ public final class Formulas
final double resModifier = target.getStat().getValue(Stats.MAGIC_SUCCESS_RES, 1);
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);
}
@ -1102,15 +1044,6 @@ public final class Formulas
{
// Resist Modifier.
final int cancelMagicLvl = skill.getMagicLevel();
if (activeChar.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", rate);
set.set("magicLevel", cancelMagicLvl);
set.set("resMod", target.getStat().getValue(Stats.RESIST_DISPEL_BUFF, 1));
set.set("rate", rate);
Debug.sendSkillDebug(activeChar, target, skill, set);
}
// Prevent initialization.
final List<BuffInfo> buffs = target.getEffectList().getBuffs();

View File

@ -164,10 +164,6 @@ public final class RequestBypassToServer implements IClientIncomingPacket
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}
}
else
{
activeChar.sendDebugMessage("ObjectId of npc bypass is not digit: " + id);
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -76,10 +76,5 @@ public final class RequestLinkHtml implements IClientIncomingPacket
final NpcHtmlMessage msg = new NpcHtmlMessage(htmlObjectId);
msg.setFile(actor.getHtmlPrefix(), filename);
actor.sendPacket(msg);
if (actor.isGM() && actor.isDebug())
{
actor.sendMessage("HTML: " + filename);
}
}
}

View File

@ -95,9 +95,6 @@
<admin command="admin_cw_add" accessLevel="100" confirmDlg="true" />
<admin command="admin_cw_info_menu" accessLevel="100" />
<!-- ADMIN DEBUG -->
<admin command="admin_debug" accessLevel="100" />
<!-- ADMIN DELETE -->
<admin command="admin_delete" accessLevel="100" />

View File

@ -68,7 +68,6 @@ import handlers.admincommandhandlers.AdminClan;
import handlers.admincommandhandlers.AdminClanHall;
import handlers.admincommandhandlers.AdminCreateItem;
import handlers.admincommandhandlers.AdminCursedWeapons;
import handlers.admincommandhandlers.AdminDebug;
import handlers.admincommandhandlers.AdminDelete;
import handlers.admincommandhandlers.AdminDisconnect;
import handlers.admincommandhandlers.AdminDoorControl;
@ -331,7 +330,6 @@ import handlers.usercommandhandlers.Unstuck;
import handlers.voicedcommandhandlers.Banking;
import handlers.voicedcommandhandlers.ChangePassword;
import handlers.voicedcommandhandlers.ChatAdmin;
import handlers.voicedcommandhandlers.Debug;
import handlers.voicedcommandhandlers.Lang;
import handlers.voicedcommandhandlers.Premium;
import handlers.voicedcommandhandlers.StatsVCmd;
@ -400,7 +398,6 @@ public class MasterHandler
AdminPcCondOverride.class,
AdminCreateItem.class,
AdminCursedWeapons.class,
AdminDebug.class,
AdminDelete.class,
AdminDisconnect.class,
AdminDoorControl.class,
@ -589,7 +586,6 @@ public class MasterHandler
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.CHAT_ADMIN ? ChatAdmin.class : null,
Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.DEBUG_VOICE_COMMAND ? Debug.class : null,
Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
},

View File

@ -1,85 +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 handlers.admincommandhandlers;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
public class AdminDebug implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_debug"
};
@Override
public final boolean useAdminCommand(String command, L2PcInstance activeChar)
{
final String[] commandSplit = command.split(" ");
if (ADMIN_COMMANDS[0].equalsIgnoreCase(commandSplit[0]))
{
L2Object target;
if (commandSplit.length > 1)
{
target = L2World.getInstance().getPlayer(commandSplit[1].trim());
if (target == null)
{
activeChar.sendPacket(SystemMessageId.THAT_PLAYER_IS_NOT_ONLINE);
return true;
}
}
else
{
target = activeChar.getTarget();
}
if (target instanceof L2Character)
{
setDebug(activeChar, (L2Character) target);
}
else
{
setDebug(activeChar, activeChar);
}
}
return true;
}
@Override
public final String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private final void setDebug(L2PcInstance activeChar, L2Character target)
{
if (target.isDebug())
{
target.setDebug(null);
activeChar.sendMessage("Stop debugging " + target.getName());
}
else
{
target.setDebug(activeChar);
activeChar.sendMessage("Start debugging " + target.getName());
}
}
}

View File

@ -59,18 +59,15 @@ public final class ResistSkill extends AbstractEffect
for (SkillHolder holder : _skills)
{
effected.addIgnoreSkillEffects(holder);
effected.sendDebugMessage("Applying invul against " + holder.getSkill());
}
}
@Override
public void onExit(BuffInfo info)
{
final L2Character effected = info.getEffected();
for (SkillHolder holder : _skills)
{
info.getEffected().removeIgnoreSkillEffects(holder);
effected.sendDebugMessage("Removing invul against " + holder.getSkill());
}
}
}

View File

@ -1,59 +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 handlers.voicedcommandhandlers;
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
public class Debug implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS =
{
"debug"
};
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
{
if (!AdminData.getInstance().hasAccess(command, activeChar.getAccessLevel()))
{
return false;
}
if (VOICED_COMMANDS[0].equalsIgnoreCase(command))
{
if (activeChar.isDebug())
{
activeChar.setDebug(null);
activeChar.sendMessage("Debugging disabled.");
}
else
{
activeChar.setDebug(activeChar);
activeChar.sendMessage("Debugging enabled.");
}
}
return true;
}
@Override
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}

View File

@ -274,12 +274,6 @@ public final class WalkingManager implements IGameXmlReader
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
@ -287,18 +281,15 @@ public final class WalkingManager implements IGameXmlReader
{
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(message);
npc.sendDebugMessage(message);
return;
}
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
if (node.runToLocation())
{
npc.setRunning();
@ -314,7 +305,6 @@ public final class WalkingManager implements IGameXmlReader
}
else
{
npc.sendDebugMessage("Failed to start moving along route '" + routeName + "', scheduled");
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
}
}
@ -332,13 +322,11 @@ public final class WalkingManager implements IGameXmlReader
// 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();
@ -351,10 +339,6 @@ public final class WalkingManager implements IGameXmlReader
walk.setBlocked(false);
walk.setStoppedByAttack(false);
}
else
{
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (wrong AI state - " + npc.getAI().getIntention() + ")");
}
}
}
}
@ -450,8 +434,6 @@ public final class WalkingManager implements IGameXmlReader
final L2NpcWalkerNode node = walk.getRoute().getNodeList().get(walk.getCurrentNodeId());
if (npc.isInsideRadius(node, 10, false, false))
{
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.
@ -464,11 +446,6 @@ public final class WalkingManager implements IGameXmlReader
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
}
if (npc.isDebug())
{
walk.setLastAction(System.currentTimeMillis());
}
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
}
}

View File

@ -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())
{

View File

@ -220,8 +220,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 Object _attackLock = new Object();
@ -353,48 +351,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(IClientOutgoingPacket 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
*/
@ -1712,8 +1668,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
@Override
public boolean deleteMe()
{
setDebug(null);
if (hasAI())
{
getAI().stopAITask();

View File

@ -728,10 +728,6 @@ public class L2Npc extends L2Character
{
html = html.replaceAll("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(new NpcHtmlMessage(getObjectId(), html));
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML : data/html/" + type + "/" + getId() + "-pk.htm");
}
player.sendPacket(ActionFailed.STATIC_PACKET);
return true;
}
@ -857,11 +853,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@ -879,11 +870,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -10761,7 +10761,6 @@ public final class L2PcInstance extends L2Playable
abortAttack();
abortCast();
stopMove(null);
setDebug(null);
}
catch (Exception e)
{

View File

@ -520,11 +520,6 @@ public class Hero
}
activeChar.sendPacket(DiaryReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herodiary.htm");
}
}
}
}
@ -617,11 +612,6 @@ public class Hero
FightReply.replace("%loos%", String.valueOf(_loss));
activeChar.sendPacket(FightReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herohistory.htm");
}
}
}
}

View File

@ -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;
/**
* @author UnAfraid
@ -183,34 +181,6 @@ public final class EnchantScroll extends AbstractEnchantItem
final double random = 100 * Rnd.nextDouble();
boolean success = (random < finalChance) || player.tryLuck();
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;
}
}

View File

@ -209,10 +209,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}
@ -240,10 +236,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}

View File

@ -159,7 +159,6 @@ public class Options
public void apply(L2PcInstance player)
{
player.sendDebugMessage("Activating option id: " + _id);
if (hasEffects())
{
final BuffInfo info = new BuffInfo(player, player, null, true, null, this);
@ -171,7 +170,6 @@ public class Options
{
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem());
}
player.sendDebugMessage("Appling instant effect: " + effect.getClass().getSimpleName());
}
else
{
@ -182,8 +180,6 @@ public class Options
{
info.addEffect(effect);
}
player.sendDebugMessage("Appling continious effect: " + effect.getClass().getSimpleName());
}
}
if (!info.getEffects().isEmpty())
@ -196,7 +192,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -204,7 +199,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -212,7 +206,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.addTriggerSkill(holder);
player.sendDebugMessage("Adding trigger skill: " + holder);
}
}
@ -222,14 +215,12 @@ public class Options
public void remove(L2PcInstance player)
{
player.sendDebugMessage("Deactivating option id: " + _id);
if (hasEffects())
{
for (BuffInfo info : player.getEffectList().getOptions())
{
if (info.getOption() == this)
{
player.sendDebugMessage("Removing effects: " + info.getEffects());
player.getEffectList().remove(info, false, true, true);
}
}
@ -239,7 +230,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
player.removeSkill(holder.getSkill(), false, false);
player.sendDebugMessage("Removing active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -247,7 +237,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
player.removeSkill(holder.getSkill(), false, true);
player.sendDebugMessage("Removing passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -255,7 +244,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.removeTriggerSkill(holder);
player.sendDebugMessage("Removing trigger skill: " + holder);
}
}

View File

@ -2773,11 +2773,6 @@ public class Quest extends AbstractScript implements IIdentifiable
player.sendPacket(npcReply);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + (filename.startsWith("data/") ? filename : "data/scripts/" + getPath().toLowerCase() + "/" + getName() + "/" + filename));
}
}
return content;

View File

@ -1159,7 +1159,6 @@ public final class Skill implements IIdentifiable
{
return null;
}
activeChar.sendDebugMessage("-> " + this + "\n TT: " + getTargetType() + "\n AS: " + getAffectScope() + "\n AO: " + getAffectObject());
final IAffectScopeHandler handler = AffectScopeHandler.getInstance().getHandler(getAffectScope());
if (handler != null)
{
@ -1338,7 +1337,6 @@ public final class Skill implements IIdentifiable
if (effected.isIgnoringSkillEffects(getId(), getLevel()))
{
effected.sendDebugMessage("Skill " + toString() + " has been ignored (ignoring skill effects)");
return;
}
@ -1376,7 +1374,6 @@ public final class Skill implements IIdentifiable
{
final BasicPropertyResist resist = effected.getBasicPropertyResist(getBasicProperty());
resist.increaseResistLevel();
effected.sendDebugMessage(toString() + " has increased your " + getBasicProperty() + " debuff resistance to " + resist.getResistLevel() + " level for " + resist.getRemainTime().toMillis() + " milliseconds.");
}
}

View File

@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.enums.BasicProperty;
import com.l2jmobius.gameserver.enums.DispelSlotType;
import com.l2jmobius.gameserver.enums.Position;
import com.l2jmobius.gameserver.enums.ShotType;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance;
@ -46,7 +45,6 @@ import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
import com.l2jmobius.gameserver.network.Debug;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@ -124,26 +122,6 @@ public final class Formulas
final double baseMod = ((77 * (((power + attacker.getPAtk()) * 0.666 * ssmod * cdMult) + (isPosition * (power + (attacker.getPAtk() * ssmod)) * randomMod) + (6 * cdPatk))) / defence);
final double damage = baseMod * weaponTraitMod * generalTraitMod * attributeMod * randomMod * pvpPveMod;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("skillPower", power);
set.set("ssboost", ssmod);
set.set("isPosition", isPosition);
set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod);
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", randomMod);
set.set("penaltyMod", pvpPveMod);
set.set("damage", (int) damage);
Debug.sendSkillDebug(attacker, target, skill, set);
}
return damage;
}
@ -706,18 +684,6 @@ public final class Formulas
final double rate = baseMod * elementMod * traitMod * buffDebuffMod;
final double finalRate = traitMod > 0 ? CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist : 0;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", baseMod);
set.set("elementMod", elementMod);
set.set("traitMod", traitMod);
set.set("buffDebuffMod", buffDebuffMod);
set.set("rate", rate);
set.set("finalRate", finalRate);
Debug.sendSkillDebug(attacker, target, skill, set);
}
if ((finalRate <= Rnd.get(100)) && (target != attacker))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
@ -786,19 +752,6 @@ public final class Formulas
// Check the Rate Limits.
final double finalRate = CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist;
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;
}
@ -824,17 +777,6 @@ public final class Formulas
final double resModifier = target.getStat().getValue(Stats.MAGIC_SUCCESS_RES, 1);
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);
}
@ -1102,15 +1044,6 @@ public final class Formulas
{
// Resist Modifier.
final int cancelMagicLvl = skill.getMagicLevel();
if (activeChar.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", rate);
set.set("magicLevel", cancelMagicLvl);
set.set("resMod", target.getStat().getValue(Stats.RESIST_DISPEL_BUFF, 1));
set.set("rate", rate);
Debug.sendSkillDebug(activeChar, target, skill, set);
}
// Prevent initialization.
final List<BuffInfo> buffs = target.getEffectList().getBuffs();

View File

@ -164,10 +164,6 @@ public final class RequestBypassToServer implements IClientIncomingPacket
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}
}
else
{
activeChar.sendDebugMessage("ObjectId of npc bypass is not digit: " + id);
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -76,10 +76,5 @@ public final class RequestLinkHtml implements IClientIncomingPacket
final NpcHtmlMessage msg = new NpcHtmlMessage(htmlObjectId);
msg.setFile(actor.getHtmlPrefix(), filename);
actor.sendPacket(msg);
if (actor.isGM() && actor.isDebug())
{
actor.sendMessage("HTML: " + filename);
}
}
}

View File

@ -95,9 +95,6 @@
<admin command="admin_cw_add" accessLevel="100" confirmDlg="true" />
<admin command="admin_cw_info_menu" accessLevel="100" />
<!-- ADMIN DEBUG -->
<admin command="admin_debug" accessLevel="100" />
<!-- ADMIN DELETE -->
<admin command="admin_delete" accessLevel="100" />

View File

@ -68,7 +68,6 @@ import handlers.admincommandhandlers.AdminClan;
import handlers.admincommandhandlers.AdminClanHall;
import handlers.admincommandhandlers.AdminCreateItem;
import handlers.admincommandhandlers.AdminCursedWeapons;
import handlers.admincommandhandlers.AdminDebug;
import handlers.admincommandhandlers.AdminDelete;
import handlers.admincommandhandlers.AdminDisconnect;
import handlers.admincommandhandlers.AdminDoorControl;
@ -331,7 +330,6 @@ import handlers.usercommandhandlers.Unstuck;
import handlers.voicedcommandhandlers.Banking;
import handlers.voicedcommandhandlers.ChangePassword;
import handlers.voicedcommandhandlers.ChatAdmin;
import handlers.voicedcommandhandlers.Debug;
import handlers.voicedcommandhandlers.Lang;
import handlers.voicedcommandhandlers.Premium;
import handlers.voicedcommandhandlers.StatsVCmd;
@ -400,7 +398,6 @@ public class MasterHandler
AdminPcCondOverride.class,
AdminCreateItem.class,
AdminCursedWeapons.class,
AdminDebug.class,
AdminDelete.class,
AdminDisconnect.class,
AdminDoorControl.class,
@ -589,7 +586,6 @@ public class MasterHandler
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.CHAT_ADMIN ? ChatAdmin.class : null,
Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.DEBUG_VOICE_COMMAND ? Debug.class : null,
Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
},

View File

@ -1,85 +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 handlers.admincommandhandlers;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
public class AdminDebug implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_debug"
};
@Override
public final boolean useAdminCommand(String command, L2PcInstance activeChar)
{
final String[] commandSplit = command.split(" ");
if (ADMIN_COMMANDS[0].equalsIgnoreCase(commandSplit[0]))
{
L2Object target;
if (commandSplit.length > 1)
{
target = L2World.getInstance().getPlayer(commandSplit[1].trim());
if (target == null)
{
activeChar.sendPacket(SystemMessageId.THAT_PLAYER_IS_NOT_ONLINE);
return true;
}
}
else
{
target = activeChar.getTarget();
}
if (target instanceof L2Character)
{
setDebug(activeChar, (L2Character) target);
}
else
{
setDebug(activeChar, activeChar);
}
}
return true;
}
@Override
public final String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private final void setDebug(L2PcInstance activeChar, L2Character target)
{
if (target.isDebug())
{
target.setDebug(null);
activeChar.sendMessage("Stop debugging " + target.getName());
}
else
{
target.setDebug(activeChar);
activeChar.sendMessage("Start debugging " + target.getName());
}
}
}

View File

@ -59,18 +59,15 @@ public final class ResistSkill extends AbstractEffect
for (SkillHolder holder : _skills)
{
effected.addIgnoreSkillEffects(holder);
effected.sendDebugMessage("Applying invul against " + holder.getSkill());
}
}
@Override
public void onExit(BuffInfo info)
{
final L2Character effected = info.getEffected();
for (SkillHolder holder : _skills)
{
info.getEffected().removeIgnoreSkillEffects(holder);
effected.sendDebugMessage("Removing invul against " + holder.getSkill());
}
}
}

View File

@ -1,59 +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 handlers.voicedcommandhandlers;
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
public class Debug implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS =
{
"debug"
};
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
{
if (!AdminData.getInstance().hasAccess(command, activeChar.getAccessLevel()))
{
return false;
}
if (VOICED_COMMANDS[0].equalsIgnoreCase(command))
{
if (activeChar.isDebug())
{
activeChar.setDebug(null);
activeChar.sendMessage("Debugging disabled.");
}
else
{
activeChar.setDebug(activeChar);
activeChar.sendMessage("Debugging enabled.");
}
}
return true;
}
@Override
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}

View File

@ -274,12 +274,6 @@ public final class WalkingManager implements IGameXmlReader
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
@ -287,18 +281,15 @@ public final class WalkingManager implements IGameXmlReader
{
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(message);
npc.sendDebugMessage(message);
return;
}
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
if (node.runToLocation())
{
npc.setRunning();
@ -314,7 +305,6 @@ public final class WalkingManager implements IGameXmlReader
}
else
{
npc.sendDebugMessage("Failed to start moving along route '" + routeName + "', scheduled");
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
}
}
@ -332,13 +322,11 @@ public final class WalkingManager implements IGameXmlReader
// 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();
@ -351,10 +339,6 @@ public final class WalkingManager implements IGameXmlReader
walk.setBlocked(false);
walk.setStoppedByAttack(false);
}
else
{
npc.sendDebugMessage("Failed to continue moving along route '" + routeName + "' (wrong AI state - " + npc.getAI().getIntention() + ")");
}
}
}
}
@ -450,8 +434,6 @@ public final class WalkingManager implements IGameXmlReader
final L2NpcWalkerNode node = walk.getRoute().getNodeList().get(walk.getCurrentNodeId());
if (npc.isInsideRadius(node, 10, false, false))
{
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.
@ -464,11 +446,6 @@ public final class WalkingManager implements IGameXmlReader
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
}
if (npc.isDebug())
{
walk.setLastAction(System.currentTimeMillis());
}
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
}
}

View File

@ -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())
{

View File

@ -220,8 +220,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 Object _attackLock = new Object();
@ -353,48 +351,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(IClientOutgoingPacket 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
*/
@ -1712,8 +1668,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
@Override
public boolean deleteMe()
{
setDebug(null);
if (hasAI())
{
getAI().stopAITask();

View File

@ -728,10 +728,6 @@ public class L2Npc extends L2Character
{
html = html.replaceAll("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(new NpcHtmlMessage(getObjectId(), html));
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML : data/html/" + type + "/" + getId() + "-pk.htm");
}
player.sendPacket(ActionFailed.STATIC_PACKET);
return true;
}
@ -857,11 +853,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@ -879,11 +870,6 @@ public class L2Npc extends L2Character
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + filename);
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -10701,7 +10701,6 @@ public final class L2PcInstance extends L2Playable
abortAttack();
abortCast();
stopMove(null);
setDebug(null);
}
catch (Exception e)
{

View File

@ -520,11 +520,6 @@ public class Hero
}
activeChar.sendPacket(DiaryReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herodiary.htm");
}
}
}
}
@ -617,11 +612,6 @@ public class Hero
FightReply.replace("%loos%", String.valueOf(_loss));
activeChar.sendPacket(FightReply);
if (activeChar.isGM() && activeChar.isDebug())
{
activeChar.sendMessage("HTML: data/html/olympiad/herohistory.htm");
}
}
}
}

View File

@ -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;
/**
* @author UnAfraid
@ -183,34 +181,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;
}
}

View File

@ -209,10 +209,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}
@ -240,10 +236,6 @@ public class OlympiadManager
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
player.sendPacket(message);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: data/html/mods/OlympiadIPRestriction.htm");
}
return false;
}

View File

@ -159,7 +159,6 @@ public class Options
public void apply(L2PcInstance player)
{
player.sendDebugMessage("Activating option id: " + _id);
if (hasEffects())
{
final BuffInfo info = new BuffInfo(player, player, null, true, null, this);
@ -171,7 +170,6 @@ public class Options
{
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem());
}
player.sendDebugMessage("Appling instant effect: " + effect.getClass().getSimpleName());
}
else
{
@ -182,8 +180,6 @@ public class Options
{
info.addEffect(effect);
}
player.sendDebugMessage("Appling continious effect: " + effect.getClass().getSimpleName());
}
}
if (!info.getEffects().isEmpty())
@ -196,7 +192,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -204,7 +199,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
addSkill(player, holder.getSkill());
player.sendDebugMessage("Adding passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -212,7 +206,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.addTriggerSkill(holder);
player.sendDebugMessage("Adding trigger skill: " + holder);
}
}
@ -222,14 +215,12 @@ public class Options
public void remove(L2PcInstance player)
{
player.sendDebugMessage("Deactivating option id: " + _id);
if (hasEffects())
{
for (BuffInfo info : player.getEffectList().getOptions())
{
if (info.getOption() == this)
{
player.sendDebugMessage("Removing effects: " + info.getEffects());
player.getEffectList().remove(info, false, true, true);
}
}
@ -239,7 +230,6 @@ public class Options
for (SkillHolder holder : getActiveSkills())
{
player.removeSkill(holder.getSkill(), false, false);
player.sendDebugMessage("Removing active skill: " + getActiveSkills());
}
}
if (hasPassiveSkills())
@ -247,7 +237,6 @@ public class Options
for (SkillHolder holder : getPassiveSkills())
{
player.removeSkill(holder.getSkill(), false, true);
player.sendDebugMessage("Removing passive skill: " + getPassiveSkills());
}
}
if (hasActivationSkills())
@ -255,7 +244,6 @@ public class Options
for (OptionsSkillHolder holder : _activationSkills)
{
player.removeTriggerSkill(holder);
player.sendDebugMessage("Removing trigger skill: " + holder);
}
}

View File

@ -2772,11 +2772,6 @@ public class Quest extends AbstractScript implements IIdentifiable
player.sendPacket(npcReply);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
if (player.isGM() && player.isDebug())
{
player.sendMessage("HTML: " + (filename.startsWith("data/") ? filename : "data/scripts/" + getPath().toLowerCase() + "/" + getName() + "/" + filename));
}
}
return content;

View File

@ -1159,7 +1159,6 @@ public final class Skill implements IIdentifiable
{
return null;
}
activeChar.sendDebugMessage("-> " + this + "\n TT: " + getTargetType() + "\n AS: " + getAffectScope() + "\n AO: " + getAffectObject());
final IAffectScopeHandler handler = AffectScopeHandler.getInstance().getHandler(getAffectScope());
if (handler != null)
{
@ -1338,7 +1337,6 @@ public final class Skill implements IIdentifiable
if (effected.isIgnoringSkillEffects(getId(), getLevel()))
{
effected.sendDebugMessage("Skill " + toString() + " has been ignored (ignoring skill effects)");
return;
}
@ -1376,7 +1374,6 @@ public final class Skill implements IIdentifiable
{
final BasicPropertyResist resist = effected.getBasicPropertyResist(getBasicProperty());
resist.increaseResistLevel();
effected.sendDebugMessage(toString() + " has increased your " + getBasicProperty() + " debuff resistance to " + resist.getResistLevel() + " level for " + resist.getRemainTime().toMillis() + " milliseconds.");
}
}

View File

@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.enums.BasicProperty;
import com.l2jmobius.gameserver.enums.DispelSlotType;
import com.l2jmobius.gameserver.enums.Position;
import com.l2jmobius.gameserver.enums.ShotType;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2SiegeFlagInstance;
@ -46,7 +45,6 @@ import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
import com.l2jmobius.gameserver.network.Debug;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@ -124,26 +122,6 @@ public final class Formulas
final double baseMod = ((77 * (((power + attacker.getPAtk()) * 0.666 * ssmod * cdMult) + (isPosition * (power + (attacker.getPAtk() * ssmod)) * randomMod) + (6 * cdPatk))) / defence);
final double damage = baseMod * weaponTraitMod * generalTraitMod * attributeMod * randomMod * pvpPveMod;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("skillPower", power);
set.set("ssboost", ssmod);
set.set("isPosition", isPosition);
set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod);
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", randomMod);
set.set("penaltyMod", pvpPveMod);
set.set("damage", (int) damage);
Debug.sendSkillDebug(attacker, target, skill, set);
}
return damage;
}
@ -706,18 +684,6 @@ public final class Formulas
final double rate = baseMod * elementMod * traitMod * buffDebuffMod;
final double finalRate = traitMod > 0 ? CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist : 0;
if (attacker.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", baseMod);
set.set("elementMod", elementMod);
set.set("traitMod", traitMod);
set.set("buffDebuffMod", buffDebuffMod);
set.set("rate", rate);
set.set("finalRate", finalRate);
Debug.sendSkillDebug(attacker, target, skill, set);
}
if ((finalRate <= Rnd.get(100)) && (target != attacker))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
@ -786,19 +752,6 @@ public final class Formulas
// Check the Rate Limits.
final double finalRate = CommonUtil.constrain(rate, skill.getMinChance(), skill.getMaxChance()) * basicPropertyResist;
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;
}
@ -824,17 +777,6 @@ public final class Formulas
final double resModifier = target.getStat().getValue(Stats.MAGIC_SUCCESS_RES, 1);
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);
}
@ -1102,15 +1044,6 @@ public final class Formulas
{
// Resist Modifier.
final int cancelMagicLvl = skill.getMagicLevel();
if (activeChar.isDebug())
{
final StatsSet set = new StatsSet();
set.set("baseMod", rate);
set.set("magicLevel", cancelMagicLvl);
set.set("resMod", target.getStat().getValue(Stats.RESIST_DISPEL_BUFF, 1));
set.set("rate", rate);
Debug.sendSkillDebug(activeChar, target, skill, set);
}
// Prevent initialization.
final List<BuffInfo> buffs = target.getEffectList().getBuffs();

View File

@ -164,10 +164,6 @@ public final class RequestBypassToServer implements IClientIncomingPacket
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}
}
else
{
activeChar.sendDebugMessage("ObjectId of npc bypass is not digit: " + id);
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}

View File

@ -76,10 +76,5 @@ public final class RequestLinkHtml implements IClientIncomingPacket
final NpcHtmlMessage msg = new NpcHtmlMessage(htmlObjectId);
msg.setFile(actor.getHtmlPrefix(), filename);
actor.sendPacket(msg);
if (actor.isGM() && actor.isDebug())
{
actor.sendMessage("HTML: " + filename);
}
}
}