+ AntiFeedManager.getInstance().setLastDeathTime(getObjectId());
+
if (quakeSystem == 1)
{
quakeSystem = 0;
@@ -4628,7 +4634,7 @@
)
{
if (target instanceof L2PcInstance)
- increasePvpKills();
+ increasePvpKills(target);
}
else // Target player doesn't have pvp flag set
{
@@ -4641,7 +4647,7 @@
{
// 'Both way war' -> 'PvP Kill'
if (target instanceof L2PcInstance)
- increasePvpKills();
+ increasePvpKills(target);
return;
}
}
@@ -4653,12 +4659,12 @@
if ( Config.KARMA_AWARD_PK_KILL )
{
if (target instanceof L2PcInstance)
- increasePvpKills();
+ increasePvpKills(target);
}
}
else if (targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma
{
- increasePkKillsAndKarma(targetPlayer.getLevel());
+ increasePkKillsAndKarma(target);
}
}
}
@@ -4667,8 +4673,12 @@
* Increase the pvp kills count and send the info to the player
*
*/
- public void increasePvpKills()
+ public void increasePvpKills(L2Character target)
{
+ if (target instanceof L2PcInstance
+ && AntiFeedManager.getInstance().check(this, target))
+ {
+
// Add karma to attacker and increase its PK counter
setPvpKills(getPvpKills() + 1);
@@ -4731,6 +4741,7 @@
// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
sendPacket(new UserInfo(this));
}
+ }
/**
* Get info on pk's from pk table
@@ -4831,7 +4842,7 @@
*
* @param targLVL : level of the killed player
*/
- public void increasePkKillsAndKarma(int targLVL)
+ public void increasePkKillsAndKarma(L2Character target)
{
int baseKarma = Config.KARMA_MIN_KARMA;
int newKarma = baseKarma;
@@ -4839,6 +4850,8 @@
int pkLVL = getLevel();
int pkPKCount = getPkKills();
+
+ int targLVL = target.getLevel();
int lvlDiffMulti = 0;
int pkCountMulti = 0;
@@ -4871,6 +4884,8 @@
// Add karma to attacker and increase its PK counter
setPkKills(getPkKills() + 1);
+ if (target instanceof L2PcInstance
+ && AntiFeedManager.getInstance().check(this, target))
setKarma(getKarma() + newKarma);
//Update the character's title color if they reached any of the 5 PK levels.
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 173)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -913,6 +913,10 @@
public static boolean AWAY_PEACE_ZONE;
public static boolean ANNOUNCE_CASTLE_LORDS;
public static int MAX_PLAYERS_FROM_ONE_PC;
+ public static boolean ANTIFEED_ENABLE;
+ public static boolean ANTIFEED_DUALBOX;
+ public static boolean ANTIFEED_DISCONNECTED_AS_DUALBOX;
+ public static int ANTIFEED_INTERVAL;
/** Overdose Mods - End */
else if (pName.equalsIgnoreCase("MultiBoxesPerPC")) MAX_PLAYERS_FROM_ONE_PC = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("AntiFeedEnable")) ANTIFEED_ENABLE = Boolean.parseBoolean(pValue);
+ else if (pName.equalsIgnoreCase("AntiFeedDualbox")) ANTIFEED_DUALBOX = Boolean.parseBoolean(pValue);
+ else if (pName.equalsIgnoreCase("AntiFeedDisconnectedAsDualbox")) ANTIFEED_DISCONNECTED_AS_DUALBOX = Boolean.parseBoolean(pValue);
+ else if (pName.equalsIgnoreCase("AntiFeedInterval")) ANTIFEED_INTERVAL = 1000*Integer.parseInt(pValue);
// PvP settings
else if (pName.equalsIgnoreCase("MinKarma")) KARMA_MIN_KARMA = Integer.parseInt(pValue);
Index: config/overdose_mods.properties
===================================================================
--- config/overdose_mods.properties (revision 173)
+++ config/overdose_mods.properties (working copy)
@@ -198,4 +198,27 @@
# MultiBox Protection -
# -------------------------------------------------------------
# Multibox protection based on client tracert comparison
-MultiBoxesPerPC = 2
\ No newline at end of file
+MultiBoxesPerPC = 2
+
+# -------------------------------------------------------------
+# AntiFeed -
+# -------------------------------------------------------------
+# This option will enable antifeed for pvp/pk/clanrep points.
+# Default: False
+AntiFeedEnable = False
+
+# If set to True, kills from dualbox will not increase pvp/pk points
+# and clan reputation will not be transferred.
+# Default: True
+AntiFeedDualbox = True
+
+# If set to True, server will count disconnected (unable to determine ip address)
+# as dualbox.
+# Default: True
+AntiFeedDisconnectedAsDualbox = True
+
+# If character died faster than timeout - pvp/pk points for killer will not increase
+# and clan reputation will not be transferred.
+# Setting to 0 will disable this feature.
+# Default: 120 seconds.
+AntiFeedInterval = 120
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/instancemanager/AntiFeedManager.java
===================================================================
--- java/net/sf/l2j/gameserver/instancemanager/AntiFeedManager.java (revision 0)
+++ java/net/sf/l2j/gameserver/instancemanager/AntiFeedManager.java (revision 0)
@@ -0,0 +1,104 @@
+/*
+ * 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 net.sf.l2j.gameserver.instancemanager;
+
+import java.util.Map;
+
+import javolution.util.FastMap;
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.model.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.L2GameClient;
+
+public class AntiFeedManager
+{
+ private Map<Integer,Long> _lastDeathTimes;
+
+ public static final AntiFeedManager getInstance()
+ {
+ return SingletonHolder._instance;
+ }
+
+ private AntiFeedManager()
+ {
+ _lastDeathTimes = new FastMap<Integer,Long>().setShared(true);
+ }
+
+ /**
+ * Set time of the last player's death to current
+ * @param objectId Player's objectId
+ */
+ public final void setLastDeathTime(int objectId)
+ {
+ _lastDeathTimes.put(objectId, System.currentTimeMillis());
+ }
+
+ /**
+ * Check if current kill should be counted as non-feeded.
+ * @param attacker Attacker character
+ * @param target Target character
+ * @return True if kill is non-feeded.
+ */
+ public final boolean check(L2Character attacker, L2Character target)
+ {
+ if (!Config.ANTIFEED_ENABLE)
+ return true;
+
+ if (target == null)
+ return false;
+
+ final L2PcInstance targetPlayer = null;
+ if (targetPlayer == null)
+ return false;
+
+ if (Config.ANTIFEED_INTERVAL > 0
+ && _lastDeathTimes.containsKey(targetPlayer.getObjectId()))
+ return (System.currentTimeMillis() - _lastDeathTimes.get(targetPlayer.getObjectId())) > Config.ANTIFEED_INTERVAL;
+
+ if (Config.ANTIFEED_DUALBOX && attacker != null)
+ {
+ final L2PcInstance attackerPlayer = null;
+ if (attackerPlayer == null)
+ return false;
+
+ final L2GameClient targetClient = targetPlayer.getClient();
+ final L2GameClient attackerClient = attackerPlayer.getClient();
+ if (targetClient == null
+ || attackerClient == null
+ || targetClient.isDetached()
+ || attackerClient.isDetached())
+ // unable to check ip address
+ return !Config.ANTIFEED_DISCONNECTED_AS_DUALBOX;
+
+ return !targetClient.getConnection().getInetAddress().equals(attackerClient.getConnection().getInetAddress());
+ }
+
+ return true;
+ }
+
+ /**
+ * Clears all timestamps
+ */
+ public final void clear()
+ {
+ _lastDeathTimes.clear();
+ }
+
+ @SuppressWarnings("synthetic-access")
+ private static class SingletonHolder
+ {
+ protected static final AntiFeedManager _instance = new AntiFeedManager();
+ }
+}
\ No newline at end of file
After many tests in original data weapongroup i figure out after i erase all the
LineageWeaponsTex.Sacredumors_t00
LineageWeaponsTex.Sacredumors_t01
LineageWeapons.Sacredumors_m00_wp
and LineageWeaponsTex.Sacredumors_t00 LineageWeaponsTex.Sacredumors_t01
i left only LineageWeapons.Sacredumors_m00_dr
On ORIGINAL ID DATA i see only the orb animation make cycles etc etc
when i try to add only the LineageWeapons.Sacredumors_m00_dr on my custom weapon i cant see nothing Why this Happend whats going on?