Index: java/config/GMAccess.properties =================================================================== --- java/config/GMAccess.properties (revisione 1615) +++ java/config/GMAccess.properties (copia locale) @@ -30,7 +30,17 @@ GMTalkBlock = 100 GMTest = 100 -#Disable Transaction +# Disable Transaction # False = Transaction enable for GM -# Max,Min = Transaction disable for this range -GMDisableTransaction = False \ No newline at end of file +# Min,Max = Transaction disable for this range +GMDisableTransaction = False + +# Disable GM Loot +# True = Loot enable for GM +# Min,Max = Loot disable for this range +GMAllowLoot = True + +# Disable GM Exp Sp +# True = Exp Sp enable for GM +# Min,Max = Exp Sp disable for this range +GMAllowExpSp = True Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revisione 1615) +++ java/net/sf/l2j/Config.java (copia locale) @@ -211,6 +211,12 @@ public static boolean GM_DISABLE_TRANSACTION; public static int GM_TRANSACTION_MIN; public static int GM_TRANSACTION_MAX; + public static boolean GM_ALLOW_LOOT; + public static int GM_ALLOW_LOOT_MIN; + public static int GM_ALLOW_LOOT_MAX; + public static boolean GM_ALLOW_EXP_SP; + public static int GM_ALLOW_EXP_SP_MIN; + public static int GM_ALLOW_EXP_SP_MAX; /** Rate control */ @@ -995,6 +1001,33 @@ GM_DISABLE_TRANSACTION = false; } + String gmLoot = gmSettings.getProperty("GMAllowLoot", "True"); + + if (!gmLoot.equalsIgnoreCase("true")) + { + String[] params = gmLoot.split(","); + GM_ALLOW_LOOT = false; + GM_ALLOW_LOOT_MIN = Integer.parseInt(params[0]); + GM_ALLOW_LOOT_MAX = Integer.parseInt(params[1]); + } + else + { + GM_ALLOW_LOOT = true; + } + + String gmExpSp = gmSettings.getProperty("GMAllowExpSp", "True"); + + if (!gmExpSp.equalsIgnoreCase("true")) + { + String[] params = gmExpSp.split(","); + GM_ALLOW_EXP_SP = false; + GM_ALLOW_EXP_SP_MIN = Integer.parseInt(params[0]); + GM_ALLOW_EXP_SP_MAX = Integer.parseInt(params[1]); + } + else + { + GM_ALLOW_LOOT = true; + } } catch (Exception e) { Index: java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java =================================================================== --- java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java (revisione 1615) +++ java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java (copia locale) @@ -39,16 +39,16 @@ public RequestEnchantItem(ByteBuffer buf, ClientThread client) { super(buf, client); - _objectId = 0; - try { + _objectId = 0; + try { _objectId = readD(); - } catch (Exception e) {} + } catch (Exception e) {} } void runImpl() { L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null || _objectId == 0) return; + if (activeChar == null || _objectId == 0) return; L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem(); @@ -80,36 +80,36 @@ crystalId = 1461; if (scroll.getItemId() == 729 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ enchantItem = true; } else if (scroll.getItemId() == 730 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ enchantItem = true; } - else if (scroll.getItemId() == 731 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } - else if (scroll.getItemId() == 732 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6569 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6570 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } break; case L2Item.CRYSTAL_B: crystalId = 1460; if (scroll.getItemId() == 947 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ enchantItem = true; } else if (scroll.getItemId() == 948 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ enchantItem = true; } - else if (scroll.getItemId() == 949 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } - else if (scroll.getItemId() == 950 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6571 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6572 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } break; case L2Item.CRYSTAL_C: crystalId = 1459; if (scroll.getItemId() == 951 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ enchantItem = true; } else if (scroll.getItemId() == 952 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ enchantItem = true; } - else if (scroll.getItemId() == 953 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } - else if (scroll.getItemId() == 954 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6573 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6574 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } break; case L2Item.CRYSTAL_D: crystalId = 1458; if (scroll.getItemId() == 955 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ enchantItem = true; } else if (scroll.getItemId() == 956 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ enchantItem = true; } - else if (scroll.getItemId() == 957 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } - else if (scroll.getItemId() == 958 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6575 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6576 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } break; case L2Item.CRYSTAL_S: crystalId = 1462; if (scroll.getItemId() == 959 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ enchantItem = true; } else if (scroll.getItemId() == 960 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ enchantItem = true; } - else if (scroll.getItemId() == 961 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } - else if (scroll.getItemId() == 962 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6577 && item.getItem().getType2() == L2Item.TYPE2_WEAPON){ blessedScroll = true; enchantItem = true; } + else if (scroll.getItemId() == 6578 && (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR || item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)){ blessedScroll = true; enchantItem = true; } break; } @@ -120,7 +120,7 @@ return; } - int chance = blessedScroll ? 75 : Config.ENCHANT_CHANCE;; + int chance = Config.ENCHANT_CHANCE;; if (item.getEnchantLevel() < 3 || (item.getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR && item.getEnchantLevel() < 4)) chance = 100; @@ -149,72 +149,80 @@ } else { - if (item.getEnchantLevel() == 0) - { - SystemMessage sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_EVAPORATED); - sm.addItemName(item.getItemId()); - activeChar.sendPacket(sm); - } - else - { - SystemMessage sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_S2_EVAPORATED); + if (!blessedScroll){ + if (item.getEnchantLevel() == 0) + { + SystemMessage sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_EVAPORATED); + sm.addItemName(item.getItemId()); + activeChar.sendPacket(sm); + } + else + { + SystemMessage sm = new SystemMessage(SystemMessage.ENCHANTMENT_FAILED_S1_S2_EVAPORATED); + sm.addNumber(item.getEnchantLevel()); + sm.addItemName(item.getItemId()); + activeChar.sendPacket(sm); + } + + SystemMessage sm = new SystemMessage(1064); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); - } - - SystemMessage sm = new SystemMessage(1064); - sm.addNumber(item.getEnchantLevel()); - sm.addItemName(item.getItemId()); - activeChar.sendPacket(sm); - - L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot()); - if (item.isEquipped()) - { + + L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot()); + if (item.isEquipped()) + { + InventoryUpdate iu = new InventoryUpdate(); + for (int i = 0; i < unequiped.length; i++) + { + iu.addModifiedItem(unequiped[i]); + } + activeChar.sendPacket(iu); + + activeChar.broadcastUserInfo(); + } + + L2ItemInstance destroyItem = activeChar.getInventory().destroyItem("Enchant", item, activeChar, null); + InventoryUpdate iu = new InventoryUpdate(); - for (int i = 0; i < unequiped.length; i++) - { - iu.addModifiedItem(unequiped[i]); - } - activeChar.sendPacket(iu); + if (destroyItem.getCount() == 0) + { + iu.addRemovedItem(destroyItem); + } + else + { + iu.addModifiedItem(destroyItem); + } + activeChar.sendPacket(iu); + + // Add 10% to crystal count for each enchant level (starting at 67% for enchant lvl 3) + int count = item.getItem().getCrystalCount() * (37 + 10*item.getEnchantLevel()) / 100; + if (count < 1) count = 1; + + L2ItemInstance crystals = activeChar.getInventory().addItem("Enchant", crystalId, count, activeChar, destroyItem); + SystemMessage sm2 = new SystemMessage(SystemMessage.EARNED_S2_S1_s); + sm2.addItemName(crystals.getItemId()); + sm2.addNumber(count); + activeChar.sendPacket(sm2); - activeChar.broadcastUserInfo(); - } + ItemList il = new ItemList(activeChar, true); + sendPacket(il); - L2ItemInstance destroyItem = activeChar.getInventory().destroyItem("Enchant", item, activeChar, null); + StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); + su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); + activeChar.sendPacket(su); - InventoryUpdate iu = new InventoryUpdate(); - if (destroyItem.getCount() == 0) - { - iu.addRemovedItem(destroyItem); + activeChar.broadcastUserInfo(); + + L2World world = L2World.getInstance(); + world.removeObject(destroyItem); } else { - iu.addModifiedItem(destroyItem); + activeChar.sendMessage("Enchant failed. Enchant level resetted to 0."); + item.setEnchantLevel(0); + item.updateDatabase(); } - activeChar.sendPacket(iu); - - // Add 10% to crystal count for each enchant level (starting at 67% for enchant lvl 3) - int count = item.getItem().getCrystalCount() * (37 + 10*item.getEnchantLevel()) / 100; - if (count < 1) count = 1; - - L2ItemInstance crystals = activeChar.getInventory().addItem("Enchant", crystalId, count, activeChar, destroyItem); - SystemMessage sm2 = new SystemMessage(SystemMessage.EARNED_S2_S1_s); - sm2.addItemName(crystals.getItemId()); - sm2.addNumber(count); - activeChar.sendPacket(sm2); - - ItemList il = new ItemList(activeChar, true); - sendPacket(il); - - StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); - su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); - activeChar.sendPacket(su); - - activeChar.broadcastUserInfo(); - - L2World world = L2World.getInstance(); - world.removeObject(destroyItem); } StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); @@ -232,4 +240,4 @@ { return _C__58_REQUESTENCHANTITEM; } -} \ No newline at end of file +} Index: java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revisione 1615) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (copia locale) @@ -116,6 +116,8 @@ public boolean isEventMob = false; + private int _isSpoiledBy = 0; + /** Task lauching the function onRandomAnimation() */ public class RandomAnimationTask implements Runnable { @@ -387,6 +389,9 @@ { _IsSpoil = isSpoil; } + + public final int getIsSpoiledBy() { return _isSpoiledBy; } + public final void setIsSpoiledBy(int value) { _isSpoiledBy = value; } /** * Return the busy status of this L2NpcInstance.

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revisione 1615) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (copia locale) @@ -1903,7 +1903,13 @@ { return _inventory.getAdena(); } - + + private boolean isLootAllowed() + { + if (isGM() && getAccessLevel() >= Config.GM_ALLOW_LOOT_MIN && getAccessLevel() <= Config.GM_ALLOW_LOOT_MAX) return false; + return true; + } + /** * Add adena to Inventory of the L2PcInstance and send a Server->Client InventoryUpdate packet to the L2PcInstance. * @param process : String Identifier of process triggering this action @@ -1920,12 +1926,15 @@ sendPacket(sm); } - _inventory.addAdena(process, count, this, reference); - - // Send update packet - InventoryUpdate iu = new InventoryUpdate(); - iu.addItem(_inventory.getAdenaInstance()); - sendPacket(iu); + if (isLootAllowed()) + { + _inventory.addAdena(process, count, this, reference); + + // Send update packet + InventoryUpdate iu = new InventoryUpdate(); + iu.addItem(_inventory.getAdenaInstance()); + sendPacket(iu); + } } /** @@ -1988,18 +1997,21 @@ } } - // Add the item to inventory - L2ItemInstance newitem = _inventory.addItem(process, item, this, reference); - - // Send inventory update packet - InventoryUpdate playerIU = new InventoryUpdate(); - playerIU.addItem(newitem); - sendPacket(playerIU); - - // Update current load as well - StatusUpdate su = new StatusUpdate(getObjectId()); - su.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad()); - sendPacket(su); + if (isLootAllowed()) + { + // Add the item to inventory + L2ItemInstance newitem = _inventory.addItem(process, item, this, reference); + + // Send inventory update packet + InventoryUpdate playerIU = new InventoryUpdate(); + playerIU.addItem(newitem); + sendPacket(playerIU); + + // Update current load as well + StatusUpdate su = new StatusUpdate(getObjectId()); + su.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad()); + sendPacket(su); + } } /** @@ -2030,18 +2042,21 @@ } } - // Add the item to inventory - L2ItemInstance item = _inventory.addItem(process, itemId, count, this, reference); - - // Send inventory update packet - InventoryUpdate playerIU = new InventoryUpdate(); - playerIU.addItem(item); - sendPacket(playerIU); - - // Update current load as well - StatusUpdate su = new StatusUpdate(getObjectId()); - su.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad()); - sendPacket(su); + if (isLootAllowed()) + { + // Add the item to inventory + L2ItemInstance item = _inventory.addItem(process, itemId, count, this, reference); + + // Send inventory update packet + InventoryUpdate playerIU = new InventoryUpdate(); + playerIU.addItem(item); + sendPacket(playerIU); + + // Update current load as well + StatusUpdate su = new StatusUpdate(getObjectId()); + su.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad()); + sendPacket(su); + } } /** @@ -5172,6 +5187,15 @@ sendPacket(new ActionFailed()); return; } + + int spoilerId = ((L2Attackable)target).getIsSpoiledBy(); + if (getObjectId() != spoilerId || !isInSpoilerParty(spoilerId)) + { + sendMessage("Cannot use sweeper. Target already spoiled by another person."); + sendPacket(new ActionFailed()); + return; + } + } // Check if the skill is Drain Soul (Soul Crystals) and if the target is a MOB @@ -5309,6 +5333,13 @@ // Set Intention to AI_INTENTION_CAST super.useMagic(skill); } + + public boolean isInSpoilerParty(int SpoilerId) + { + L2PcInstance spoiler = (L2PcInstance)L2World.getInstance().findObject(SpoilerId); + if (isInParty()) return getParty().getPartyMembers().contains(spoiler); + return true; + } /** * Check if the requested casting is a Pc->Pc skill cast and if it's a valid pvp condition Index: java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (revisione 1615) +++ java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (copia locale) @@ -1,5 +1,6 @@ package net.sf.l2j.gameserver.model.actor.stat; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.instancemanager.ZoneManager; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.base.Experience; @@ -44,6 +45,13 @@ return true; } + private boolean isExpSpAllowed() + { + L2PcInstance activeChar = getActiveChar(); + if (activeChar.isGM() && activeChar.getAccessLevel() >= Config.GM_ALLOW_EXP_SP_MIN && activeChar.getAccessLevel() <= Config.GM_ALLOW_EXP_SP_MAX) return false; + return true; + } + /** * Add Experience and SP rewards to the L2PcInstance, remove its Karma (if necessary) and Launch increase level task.

* @@ -60,7 +68,8 @@ */ public boolean addExpAndSp(int addToExp, int addToSp) { - if (!super.addExpAndSp(addToExp, addToSp)) return false; + if (isExpSpAllowed()) + if (!super.addExpAndSp(addToExp, addToSp)) return false; // Send a Server->Client System Message to the L2PcInstance SystemMessage sm = new SystemMessage(SystemMessage.YOU_EARNED_S1_EXP_AND_S2_SP); Index: java/net/sf/l2j/gameserver/handler/itemhandlers/EnchantScrolls.java =================================================================== --- java/net/sf/l2j/gameserver/handler/itemhandlers/EnchantScrolls.java (revisione 1615) +++ java/net/sf/l2j/gameserver/handler/itemhandlers/EnchantScrolls.java (copia locale) @@ -10,11 +10,11 @@ public class EnchantScrolls implements IItemHandler { private static int[] _itemIds = { - 729, 730, 731, 732, // a grade - 947, 948, 949, 950, // b grade - 951, 952, 953, 954, // c grade - 955, 956, 957, 958, // d grade - 959, 960, 961, 962 // s grade + 729, 730, 6569, 6570, // a grade + 947, 948, 6571, 6572, // b grade + 951, 952, 6573, 6574, // c grade + 955, 956, 6575, 6576, // d grade + 959, 960, 6577, 6578 // s grade }; public void useItem(L2PlayableInstance playable, L2ItemInstance item) Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Sweep.java =================================================================== --- java/net/sf/l2j/gameserver/handler/skillhandlers/Sweep.java (revisione 1615) +++ java/net/sf/l2j/gameserver/handler/skillhandlers/Sweep.java (copia locale) @@ -21,13 +21,11 @@ import net.sf.l2j.gameserver.handler.ISkillHandler; import net.sf.l2j.gameserver.model.L2Attackable; import net.sf.l2j.gameserver.model.L2Character; -import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.L2Skill.SkillType; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.InventoryUpdate; -import net.sf.l2j.gameserver.serverpackets.SystemMessage; /** * @author _drunk_ @@ -55,7 +53,7 @@ { if (!(targets[index] instanceof L2Attackable)) continue; L2Attackable target = (L2Attackable)targets[index]; - + if (target.isSweepActive()) { L2Attackable.RewardItem[] items = target.takeSweep(); @@ -66,15 +64,10 @@ player.getParty().distributeItem(player, ritem, true); else { - L2ItemInstance item = player.getInventory().addItem("Sweep", ritem.getItemId(), ritem.getCount(), player, target); - iu.addItem(item); + player.addItem("Sweep", ritem.getItemId(), ritem.getCount(), player, true); send = true; - - SystemMessage smsg = new SystemMessage(SystemMessage.YOU_PICKED_UP_S1_S2); // you picked up $s1$s2 - smsg.addNumber(ritem.getCount()); - smsg.addItemName(item.getItemId()); - player.sendPacket(smsg); } + target.setIsSpoiledBy(0); } } target.endDecayTask(); Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Spoil.java =================================================================== --- java/net/sf/l2j/gameserver/handler/skillhandlers/Spoil.java (revisione 1615) +++ java/net/sf/l2j/gameserver/handler/skillhandlers/Spoil.java (copia locale) @@ -133,7 +133,11 @@ // now do randomization int randomSuccessRate = rand.nextInt(99); - if ( randomSuccessRate < rateOfSpoil ) spoil = true; + if ( randomSuccessRate < rateOfSpoil ) + { + spoil = true; + target.setIsSpoiledBy(activeChar.getObjectId()); + } } if (spoil) { Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminExpSp.java =================================================================== --- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminExpSp.java (revisione 1615) +++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminExpSp.java (copia locale) @@ -171,7 +171,8 @@ sm.addString("Admin is adding you "+expval+" xp and "+spval+" sp."); player.sendPacket(sm); - player.addExpAndSp(expval,spval); + player.getStat().addExp(expval); + player.getStat().addSp(spval); //Admin information SystemMessage smA = new SystemMessage(614);