Better WorldObject toString method usage.
This commit is contained in:
@ -78,7 +78,7 @@ public class FavoriteBBSManager extends BaseBBSManager
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning(FavoriteBBSManager.class.getSimpleName() + ": Couldn't load favorite links for player " + player.getName());
|
||||
LOGGER.warning(FavoriteBBSManager.class.getSimpleName() + ": Couldn't load favorite links for " + player);
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("bbs_add_fav"))
|
||||
@ -105,7 +105,7 @@ public class FavoriteBBSManager extends BaseBBSManager
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning(FavoriteBBSManager.class.getSimpleName() + ": Couldn't add favorite link " + command + " for player " + player.getName());
|
||||
LOGGER.warning(FavoriteBBSManager.class.getSimpleName() + ": Couldn't add favorite link " + command + " for " + player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,7 +129,7 @@ public class FavoriteBBSManager extends BaseBBSManager
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning(FavoriteBBSManager.class.getSimpleName() + ": Couldn't delete favorite link ID " + favId + " for player " + player.getName());
|
||||
LOGGER.warning(FavoriteBBSManager.class.getSimpleName() + ": Couldn't delete favorite link ID " + favId + " for " + player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ public class AugmentationData
|
||||
|
||||
// Second: decide which grade the augmentation result is going to have:
|
||||
// 0:yellow, 1:blue, 2:purple, 3:red
|
||||
// The chances used here are most likely custom, whats known is: u can also get a red result from a normal grade lifeStone however I will make it so that a higher grade lifeStone will more likely result in a higher grade augmentation...
|
||||
// The chances used here are most likely custom, whats known is: you can also get a red result from a normal grade lifeStone however I will make it so that a higher grade lifeStone will more likely result in a higher grade augmentation...
|
||||
// and the augmentation result will at least have the grade of the life stone
|
||||
// Second: Calculate the subblock offset for the choosen color, and the level of the lifeStone
|
||||
// Whats is known: you cant have yellow with skill(or baseStatModifier) noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow
|
||||
|
@ -108,7 +108,7 @@ public class SoulCrystals implements IItemHandler
|
||||
return;
|
||||
}
|
||||
|
||||
// u can use soul crystal only when target hp goes below 50%
|
||||
// you can use soul crystal only when target hp goes below 50%
|
||||
if (((Monster) target).getCurrentHp() > (((Monster) target).getMaxHp() / 2.0))
|
||||
{
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
|
@ -568,7 +568,7 @@ public class DimensionalRiftManager
|
||||
showHtmlFile(player, "data/html/seven_signs/rift/Cheater.htm", npc);
|
||||
if (!player.isGM())
|
||||
{
|
||||
LOGGER.warning("Player " + player.getName() + "(" + player.getObjectId() + ") was cheating in dimension rift area!");
|
||||
LOGGER.warning(player + " was cheating in dimension rift area!");
|
||||
Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " tried to cheat in dimensional rift.", Config.DEFAULT_PUNISH);
|
||||
}
|
||||
}
|
||||
|
@ -50,9 +50,9 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* @author sandman TODO: Gatekeepers shouting some text when doors get opened..so far unknown in leaked C4 is this text: 1000502 [brushes hinders competitor's monster.] which is really ugly translation TODO: Victim should attack one npc, when u save this NPC debuff zones will not be activated and
|
||||
* @author sandman TODO: Gatekeepers shouting some text when doors get opened..so far unknown in leaked C4 is this text: 1000502 [brushes hinders competitor's monster.] which is really ugly translation TODO: Victim should attack one npc, when you save this NPC debuff zones will not be activated and
|
||||
* NPC will polymorph into some kind of Tammed Beast xD and shout: 1000503 [many thanks rescue.] which is again really ugly translation. When Victim kill this NPC, debuff zones will get activated with current core its impossible to make attack npc * npc i will try to search where is this
|
||||
* prevented but still is unknown which npc u need to save to survive in next room without debuffs
|
||||
* prevented but still is unknown which npc you need to save to survive in next room without debuffs
|
||||
*/
|
||||
public class FourSepulchersManager extends GrandBossManager
|
||||
{
|
||||
@ -953,7 +953,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
{
|
||||
if (!player.isGM())
|
||||
{
|
||||
LOGGER.warning("Player " + player.getName() + "(" + player.getObjectId() + ") tried to cheat in four sepulchers.");
|
||||
LOGGER.warning(player + " tried to cheat in four sepulchers.");
|
||||
Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " tried to enter four sepulchers with invalid npc id.", Config.DEFAULT_PUNISH);
|
||||
}
|
||||
return;
|
||||
|
@ -115,7 +115,7 @@ public class RebirthManager
|
||||
// Check to see if Rebirth is enabled to avoid hacks
|
||||
if (!Config.REBIRTH_ENABLE)
|
||||
{
|
||||
LOGGER.warning("[WARNING] Player " + player.getName() + " is trying to use rebirth system when it's disabled.");
|
||||
LOGGER.warning("[WARNING] " + player + " is trying to use rebirth system when it's disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -871,7 +871,7 @@ public class TradeList
|
||||
if (!found)
|
||||
{
|
||||
final String msg = "Requested Item is not available to buy... You are perfoming illegal operation, it has been segnalated";
|
||||
LOGGER.warning("ATTENTION: Player " + player.getName() + " has performed buy illegal operation..");
|
||||
LOGGER.warning("ATTENTION: " + player + " has performed buy illegal operation..");
|
||||
player.sendMessage(msg);
|
||||
return false;
|
||||
}
|
||||
@ -1149,7 +1149,7 @@ public class TradeList
|
||||
if (!found)
|
||||
{
|
||||
final String msg = "Requested Item is not available to sell... You are perfoming illegal operation, it has been segnalated";
|
||||
LOGGER.warning("ATTENTION: Player " + player.getName() + " has performed sell illegal operation..");
|
||||
LOGGER.warning("ATTENTION: " + player + " has performed sell illegal operation..");
|
||||
player.sendMessage(msg);
|
||||
return false;
|
||||
}
|
||||
|
@ -668,6 +668,12 @@ public abstract class WorldObject
|
||||
return calculateDistanceSq3D(object.getX(), object.getY(), object.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return (obj instanceof WorldObject) && (((WorldObject) obj).getObjectId() == getObjectId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@ -245,7 +245,7 @@ public class Attackable extends Npc
|
||||
private final Map<Creature, AggroInfo> _aggroList = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Use this to Remove Object from this Map This Should be Synchronized While Interacting over This Map - ie u cant Interacting and removing object at once
|
||||
* Use this to Remove Object from this Map This Should be Synchronized While Interacting over This Map - ie you cant Interacting and removing object at once
|
||||
* @return
|
||||
*/
|
||||
public Map<Creature, AggroInfo> getAggroList()
|
||||
|
@ -8045,12 +8045,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
return weaponItem.getRandomDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Creature " + getObjectId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the attack end time.
|
||||
* @return the attack end time
|
||||
|
@ -2842,7 +2842,7 @@ public class Npc extends Creature
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getTemplate().getName();
|
||||
return getClass().getSimpleName() + ":" + getName() + "(" + getNpcId() + ")[" + getObjectId() + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4171,26 +4171,26 @@ public class Player extends Playable
|
||||
{
|
||||
if (World.getInstance().findObject(objectId) == null)
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ": player " + this + " tried to " + action + " item not available in World.");
|
||||
LOGGER.warning(this + " tried to " + action + " item not available in World.");
|
||||
return null;
|
||||
}
|
||||
|
||||
final Item item = getInventory().getItemByObjectId(objectId);
|
||||
if ((item == null) || (item.getOwnerId() != getObjectId()))
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ": player " + this + " tried to " + action + " item he is not owner of.");
|
||||
LOGGER.warning(this + " tried to " + action + " item he is not owner of.");
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((count < 0) || ((count > 1) && !item.isStackable()))
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ": player " + this + " tried to " + action + " item with invalid count: " + count);
|
||||
LOGGER.warning(this + " tried to " + action + " item with invalid count: " + count);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (count > item.getCount())
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ": player " + this + " tried to " + action + " more items than he owns.");
|
||||
LOGGER.warning(this + " tried to " + action + " more items than he owns.");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -7687,7 +7687,7 @@ public class Player extends Playable
|
||||
// Subclass in use but doesn't exist in DB - a possible restart-while-modifysubclass cheat has been attempted.
|
||||
// Switching to use base class
|
||||
player.setClassId(player.getBaseClass());
|
||||
LOGGER.warning("Player " + player.getName() + " reverted to base class. Possibly has tried a relogin exploit while subclassing.");
|
||||
LOGGER.warning(player + " reverted to base class. Possibly has tried a relogin exploit while subclassing.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -10174,12 +10174,6 @@ public class Player extends Playable
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "player " + getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the modifier corresponding to the Enchant Effect of the Active Weapon (Min : 127).
|
||||
* @return the enchant effect
|
||||
@ -12925,13 +12919,13 @@ public class Player extends Playable
|
||||
final Item item = getInventory().getItemByItemId(itemId);
|
||||
if ((item == null) || (item.getOwnerId() != getObjectId()))
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ": player " + this + " tried to " + action + " item he is not owner of");
|
||||
LOGGER.warning(this + " tried to " + action + " item he is not owner of");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((getActiveEnchantItem() != null) && (getActiveEnchantItem().getItemId() == itemId))
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ":player " + this + " tried to " + action + " an enchant scroll he was using");
|
||||
LOGGER.warning(this + " tried to " + action + " an enchant scroll he was using");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -12961,7 +12955,7 @@ public class Player extends Playable
|
||||
final Item item = getInventory().getItemByObjectId(objectId);
|
||||
if ((item == null) || (item.getOwnerId() != getObjectId()))
|
||||
{
|
||||
LOGGER.warning(getObjectId() + ": player " + this + " tried to " + action + " item he is not owner of");
|
||||
LOGGER.warning(this + " tried to " + action + " item he is not owner of");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -823,6 +823,12 @@ public abstract class Summon extends Playable
|
||||
return (_owner != null) && _owner.isOnEvent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return super.toString() + "(" + getNpcId() + ") Owner: " + _owner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Player getActingPlayer()
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ public class CastleWarehouse extends Folk
|
||||
{
|
||||
if ((player.getActiveEnchantItem() != null) || (player.getActiveTradeList() != null))
|
||||
{
|
||||
LOGGER.info("Player " + player.getName() + " trying to use enchant exploit, ban this player!");
|
||||
LOGGER.info(player + " trying to use enchant exploit, ban this player!");
|
||||
player.closeNetConnection();
|
||||
return;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ public class ClanHallSiegeInfo extends Npc
|
||||
final Clan playerClan = player.getClan();
|
||||
if ((playerClan == null) || !playerClan.getLeaderName().equalsIgnoreCase(player.getName()) || (playerClan.getLevel() < 4))
|
||||
{
|
||||
LOGGER.warning("Attention!!! player " + player.getName() + " use packet hack, try unregister clan.");
|
||||
LOGGER.warning("Attention!!! " + player + " used packet hack, try unregister clan.");
|
||||
return;
|
||||
}
|
||||
if (!BanditStrongholdSiege.getInstance().isRegistrationPeriod())
|
||||
@ -246,7 +246,7 @@ public class ClanHallSiegeInfo extends Npc
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warning("Attention!!! player " + player.getName() + " use packet hack, try unregister clan.");
|
||||
LOGGER.warning("Attention!!! " + player + " used packet hack, try unregister clan.");
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("PlayerList"))
|
||||
|
@ -677,7 +677,7 @@ public class Door extends Creature
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "door " + _doorId;
|
||||
return getClass().getSimpleName() + "[" + _doorId + "](" + getObjectId() + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -337,7 +337,7 @@ public class VillageMaster extends Folk
|
||||
// Subclass exploit fix during add subclass
|
||||
if (!player.getClient().getFloodProtectors().canChangeSubclass())
|
||||
{
|
||||
LOGGER.warning("Player " + player.getName() + " has performed a subclass change too fast");
|
||||
LOGGER.warning(player + " has performed a subclass change too fast");
|
||||
player.setLocked(false);
|
||||
return;
|
||||
}
|
||||
@ -438,7 +438,7 @@ public class VillageMaster extends Folk
|
||||
// Subclass exploit fix during change subclass
|
||||
if (!player.getClient().getFloodProtectors().canChangeSubclass())
|
||||
{
|
||||
LOGGER.warning("Player " + player.getName() + " has performed a subclass change too fast");
|
||||
LOGGER.warning(player + " has performed a subclass change too fast");
|
||||
player.setLocked(false);
|
||||
return;
|
||||
}
|
||||
@ -499,7 +499,7 @@ public class VillageMaster extends Folk
|
||||
// Subclass exploit fix during delete subclass
|
||||
if (!player.getClient().getFloodProtectors().canChangeSubclass())
|
||||
{
|
||||
LOGGER.warning("Player " + player.getName() + " has performed a subclass change too fast");
|
||||
LOGGER.warning(player + " has performed a subclass change too fast");
|
||||
player.setLocked(false);
|
||||
return;
|
||||
}
|
||||
|
@ -1243,7 +1243,7 @@ public class Item extends WorldObject
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "" + _item;
|
||||
return _item + "[" + getObjectId() + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -320,7 +320,7 @@ class OlympiadGame
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on player " + player.getName() + " removals, an error has been occurred: " + e);
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on " + player + " removals, an error has been occurred: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -457,7 +457,7 @@ class OlympiadGame
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on player " + player.getName() + " additions, an error has been occurred: " + e);
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on " + player + " additions, an error has been occurred: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -484,7 +484,7 @@ class OlympiadGame
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on player " + player.getName() + " sendMessage, an error has been occurred: " + e);
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on " + player + " sendMessage, an error has been occurred: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -559,7 +559,7 @@ class OlympiadGame
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on player " + player.getName() + " PlayersStatusBack, an error has been occurred: " + e);
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on " + player + " PlayersStatusBack, an error has been occurred: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -904,7 +904,7 @@ class OlympiadGame
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on player " + player.getName() + " makeCompetitionStart, an error has been occurred: " + e);
|
||||
LOGGER.warning("Olympiad System: Game - " + _stadiumID + " on " + player + " makeCompetitionStart, an error has been occurred: " + e);
|
||||
_aborted = true;
|
||||
}
|
||||
}
|
||||
@ -1039,7 +1039,7 @@ class OlympiadGameTask implements Runnable
|
||||
{
|
||||
if ((player != null) && player.inObserverMode())
|
||||
{
|
||||
LOGGER.info("[OLYMPIAD DEBUG] Player " + player.getName() + "is in Observer mode!");
|
||||
LOGGER.info("[OLYMPIAD DEBUG] " + player + "is in Observer mode!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -1077,7 +1077,7 @@ class OlympiadGameTask implements Runnable
|
||||
player.sendPacket(new ExOlympiadMode(2, player));
|
||||
player.broadcastUserInfo();
|
||||
|
||||
LOGGER.info("[OLYMPIAD DEBUG] Player " + player.getName() + "was on observer mode! Status restored!");
|
||||
LOGGER.info("[OLYMPIAD DEBUG] " + player + "was on observer mode! Status restored!");
|
||||
}
|
||||
|
||||
protected boolean checkBattleStatus()
|
||||
|
@ -246,7 +246,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
// Message with screen
|
||||
player.sendPacket(new ExShowScreenMessage(" You have an over enchanted item, you will be kicked from server! ", 6000));
|
||||
// Punishment e LOGGER in audit
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has Overenchanted item! Kicked! ", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, player + " has overenchanted item! Kicked! ", Config.DEFAULT_PUNISH);
|
||||
// Logger in console
|
||||
PacketLogger.info("#### ATTENTION ####");
|
||||
PacketLogger.info(i + " item has been removed from " + player);
|
||||
|
@ -63,7 +63,7 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
player.sendPacket(SystemMessageId.A_HACKING_TOOL_HAS_BEEN_DISCOVERED_PLEASE_TRY_PLAYING_AGAIN_AFTER_CLOSING_UNNECESSARY_PROGRAMS);
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " trying to use L2Walker!", IllegalPlayerAction.PUNISH_KICK);
|
||||
Util.handleIllegalPlayerAction(player, player + " trying to use L2Walker!", IllegalPlayerAction.PUNISH_KICK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,8 @@ public class RequestAquireSkill implements IClientIncomingPacket
|
||||
|
||||
if ((counts == 0) && !Config.ALT_GAME_SKILL_LEARN)
|
||||
{
|
||||
player.sendMessage("You are trying to learn skill that u can't..");
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
player.sendMessage("You are trying to learn skill that you can't...");
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -167,8 +167,8 @@ public class RequestAquireSkill implements IClientIncomingPacket
|
||||
|
||||
if (counts == 0)
|
||||
{
|
||||
player.sendMessage("You are trying to learn skill that u can't..");
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
player.sendMessage("You are trying to learn skill that you can't..");
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -219,8 +219,8 @@ public class RequestAquireSkill implements IClientIncomingPacket
|
||||
|
||||
if (counts == 0)
|
||||
{
|
||||
player.sendMessage("You are trying to learn skill that u can't..");
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
player.sendMessage("You are trying to learn skill that you can't..");
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
if (item.isWear())
|
||||
{
|
||||
player.setActiveEnchantItem(null);
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK);
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -591,7 +591,7 @@ public class RequestEnchantItem implements IClientIncomingPacket
|
||||
if (scroll == null)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2);
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to enchant with a scroll he doesnt have", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to enchant with a scroll he doesnt have", Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -120,8 +120,8 @@ public class RequestExEnchantSkill implements IClientIncomingPacket
|
||||
|
||||
if ((counts == 0) && !Config.ALT_GAME_SKILL_LEARN)
|
||||
{
|
||||
player.sendMessage("You are trying to learn skill that u can't..");
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
player.sendMessage("You are trying to learn skill that you can't...");
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to learn skill that he can't!!!", IllegalPlayerAction.PUNISH_KICK);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class RequestGetItemFromPet implements IClientIncomingPacket
|
||||
final Pet pet = (Pet) player.getPet();
|
||||
if (player.getActiveEnchantItem() != null)
|
||||
{
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " Tried To Use Enchant Exploit , And Got Banned!", IllegalPlayerAction.PUNISH_KICKBAN);
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to use enchant exploit and got banned!", IllegalPlayerAction.PUNISH_KICKBAN);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class RequestGiveItemToPet implements IClientIncomingPacket
|
||||
|
||||
if (player.getActiveEnchantItem() != null)
|
||||
{
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " Tried To Use Enchant Exploit And Got Banned!", IllegalPlayerAction.PUNISH_KICKBAN);
|
||||
Util.handleIllegalPlayerAction(player, player + " tried to use enchant exploit and got banned!", IllegalPlayerAction.PUNISH_KICKBAN);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class RequestPrivateStoreBuy implements IClientIncomingPacket
|
||||
{
|
||||
if ((ir.getCount() > Integer.MAX_VALUE) || (ir.getCount() < 0))
|
||||
{
|
||||
final String msgErr = "[RequestPrivateStoreBuy] player " + player.getName() + " tried an overflow exploit, ban this player!";
|
||||
final String msgErr = "[RequestPrivateStoreBuy] " + player + " tried an overflow exploit, ban this player!";
|
||||
Util.handleIllegalPlayerAction(player, msgErr, Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
@ -127,14 +127,14 @@ public class RequestPrivateStoreBuy implements IClientIncomingPacket
|
||||
final TradeItem sellersItem = storeList.getItem(ir.getObjectId());
|
||||
if (sellersItem == null)
|
||||
{
|
||||
final String msgErr = "[RequestPrivateStoreBuy] player " + player.getName() + " tried to buy an item not sold in a private store (buy), ban this player!";
|
||||
final String msgErr = "[RequestPrivateStoreBuy] " + player + " tried to buy an item not sold in a private store (buy), ban this player!";
|
||||
Util.handleIllegalPlayerAction(player, msgErr, Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ir.getPrice() != sellersItem.getPrice())
|
||||
{
|
||||
final String msgErr = "[RequestPrivateStoreBuy] player " + player.getName() + " tried to change the seller's price in a private store (buy), ban this player!";
|
||||
final String msgErr = "[RequestPrivateStoreBuy] " + player + " tried to change the seller's price in a private store (buy), ban this player!";
|
||||
Util.handleIllegalPlayerAction(player, msgErr, Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
@ -157,7 +157,7 @@ public class RequestPrivateStoreBuy implements IClientIncomingPacket
|
||||
// FIXME: this check should be (and most probably is) done in the TradeList mechanics
|
||||
if ((priceTotal < 0) || (priceTotal > Integer.MAX_VALUE))
|
||||
{
|
||||
final String msgErr = "[RequestPrivateStoreBuy] player " + player.getName() + " tried an overflow exploit, ban this player!";
|
||||
final String msgErr = "[RequestPrivateStoreBuy] " + player + " tried an overflow exploit, ban this player!";
|
||||
Util.handleIllegalPlayerAction(player, msgErr, Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
@ -180,7 +180,7 @@ public class RequestPrivateStoreBuy implements IClientIncomingPacket
|
||||
|
||||
if ((storePlayer.getPrivateStoreType() == Player.STORE_PRIVATE_PACKAGE_SELL) && (storeList.getItemCount() > _count))
|
||||
{
|
||||
final String msgErr = "[RequestPrivateStoreBuy] player " + player.getName() + " tried to buy less items then sold by package-sell, ban this player for bot-usage!";
|
||||
final String msgErr = "[RequestPrivateStoreBuy] " + player + " tried to buy less items then sold by package-sell, ban this player for bot-usage!";
|
||||
Util.handleIllegalPlayerAction(player, msgErr, Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ public class RequestPrivateStoreManageBuy implements IClientIncomingPacket
|
||||
// Fix for privatestore exploit during login
|
||||
if (!player.isSpawned() || player.isLocked())
|
||||
{
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " try exploit at login with privatestore!", Config.DEFAULT_PUNISH);
|
||||
PacketLogger.warning("Player " + player.getName() + " try exploit at login with privatestore!");
|
||||
Util.handleIllegalPlayerAction(player, player + " try exploit at login with privatestore!", Config.DEFAULT_PUNISH);
|
||||
PacketLogger.warning(player + " try exploit at login with privatestore!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,8 @@ public class RequestPrivateStoreManageSell implements IClientIncomingPacket
|
||||
// Fix for privatestore exploit during login
|
||||
if (!player.isSpawned() || player.isLocked())
|
||||
{
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " try exploit at login with privatestore!", Config.DEFAULT_PUNISH);
|
||||
PacketLogger.warning("Player " + player.getName() + " try exploit at login with privatestore!");
|
||||
Util.handleIllegalPlayerAction(player, player + " try exploit at login with privatestore!", Config.DEFAULT_PUNISH);
|
||||
PacketLogger.warning(player + " try exploit at login with privatestore!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -157,8 +157,8 @@ public class RequestPrivateStoreSell implements IClientIncomingPacket
|
||||
if (!storeList.PrivateStoreSell(player, _items, _price))
|
||||
{
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " provided invalid list or request! ", Config.DEFAULT_PUNISH);
|
||||
PacketLogger.warning("PrivateStore sell has failed due to invalid list or request. Player: " + player.getName() + ", Private store of: " + storePlayer.getName());
|
||||
Util.handleIllegalPlayerAction(player, player + " provided invalid list or request! ", Config.DEFAULT_PUNISH);
|
||||
PacketLogger.warning("PrivateStore sell has failed due to invalid list or request. " + player + ", Private store of " + storePlayer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class RequestRestart implements IClientIncomingPacket
|
||||
// Check if player are changing class
|
||||
if (player.isLocked())
|
||||
{
|
||||
PacketLogger.warning("Player " + player.getName() + " tried to restart during class change.");
|
||||
PacketLogger.warning(player + " tried to restart during class change.");
|
||||
player.sendPacket(RestartResponse.valueOf(false));
|
||||
return;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ public class Say2 implements IClientIncomingPacket
|
||||
|
||||
if (Config.L2WALKER_PROTECTION && (chatType == ChatType.WHISPER) && checkBot(_text))
|
||||
{
|
||||
Util.handleIllegalPlayerAction(player, "Client Emulator Detect: Player " + player.getName() + " using l2walker.", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, "Client Emulator Detect: " + player + " using L2Walker.", Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
_text = _text.replaceAll("\\\\n", "");
|
||||
|
@ -117,7 +117,7 @@ public class SetPrivateStoreListSell implements IClientIncomingPacket
|
||||
final int price = _items[(i * 3) + 2];
|
||||
if (price <= 0)
|
||||
{
|
||||
final String msgErr = "[SetPrivateStoreListSell] player " + player.getName() + " tried an overflow exploit (use PHX), ban this player!";
|
||||
final String msgErr = "[SetPrivateStoreListSell] " + player + " tried an overflow exploit (use PHX), ban this player!";
|
||||
Util.handleIllegalPlayerAction(player, msgErr, Config.DEFAULT_PUNISH);
|
||||
_count = 0;
|
||||
return;
|
||||
|
@ -54,7 +54,7 @@ public class TradeDone implements IClientIncomingPacket
|
||||
final TradeList trade = player.getActiveTradeList();
|
||||
if (trade == null)
|
||||
{
|
||||
// LOGGER.warning("player.getTradeList == null in " + getType() + " for player " + player.getName());
|
||||
// LOGGER.warning("player.getTradeList == null in " + getType() + " for " + player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ public class UseItem implements IClientIncomingPacket
|
||||
if ((Config.MAX_ITEM_ENCHANT_KICK > 0) && !player.isGM() && (item.getEnchantLevel() > Config.MAX_ITEM_ENCHANT_KICK))
|
||||
{
|
||||
player.sendMessage("You have been kicked for using an item overenchanted!");
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has item Overenchanted! Kicked ", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, player + " has item Overenchanted! Kicked ", Config.DEFAULT_PUNISH);
|
||||
// player.closeNetConnection();
|
||||
return;
|
||||
}
|
||||
@ -312,7 +312,7 @@ public class UseItem implements IClientIncomingPacket
|
||||
{
|
||||
// player.setAccountAccesslevel(-1); //ban
|
||||
player.sendMessage("You have been banned for using an item wich is over enchanted!"); // message
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has item Overenchanted! ", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, player + " has item Overenchanted! ", Config.DEFAULT_PUNISH);
|
||||
// player.closeNetConnection(); //kick
|
||||
return;
|
||||
}
|
||||
@ -330,7 +330,7 @@ public class UseItem implements IClientIncomingPacket
|
||||
{
|
||||
// player.setAccountAccesslevel(-1); //ban
|
||||
player.sendMessage("You have been banned for using an item wich is over enchanted!"); // message
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has item Overenchanted! ", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, player + " has item Overenchanted! ", Config.DEFAULT_PUNISH);
|
||||
// player.closeNetConnection(); //kick
|
||||
return;
|
||||
}
|
||||
@ -346,7 +346,7 @@ public class UseItem implements IClientIncomingPacket
|
||||
{
|
||||
// player.setAccountAccesslevel(-1); //ban
|
||||
player.sendMessage("You have been banned for using an item wich is over enchanted!"); // message
|
||||
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has item Overenchanted! ", Config.DEFAULT_PUNISH);
|
||||
Util.handleIllegalPlayerAction(player, player + " has item Overenchanted! ", Config.DEFAULT_PUNISH);
|
||||
// player.closeNetConnection(); //kick
|
||||
return;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class SellListProcure implements IClientOutgoingPacket
|
||||
packet.writeD(entry.getValue()); // count
|
||||
packet.writeH(item.getItem().getType2());
|
||||
packet.writeH(0); // unknown
|
||||
packet.writeD(0); // price, u shouldnt get any adena for crops, only raw materials
|
||||
packet.writeD(0); // price, you shouldnt get any adena for crops, only raw materials
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user