Help for active faction system on gracia final

Find the proper support area, Saga-Version.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
User avatar
Lunawang
Posts: 41
Joined: Sat Mar 07, 2009 8:00 pm

Help for active faction system on gracia final

Post by Lunawang »

need help to convert diff patch to final

Code: Select all

Index: java/config/Character.properties===================================================================--- java/config/Character.properties    (revision 2733)+++ java/config/Character.properties    (working copy)@@ -36,7 +36,7 @@ # will not de-level even if their Experience is below their  # level after death. # Retail: true-Delevel = True+Delevel = False  # This is a weight limit multiplier, set the default to 1 if you  # want this option disabled.Index: java/config/l2jmods.properties===================================================================--- java/config/l2jmods.properties  (revision 2733)+++ java/config/l2jmods.properties  (working copy)@@ -103,7 +103,7 @@ # Team vs. Team Event Engine (by FBIagent)                     - #--------------------------------------------------------------- # enable TvTEvent-TvTEventEnabled = false+TvTEventEnabled = True # Time Between TvT events (in minutes, 300 = 5 hours) TvTEventInterval = 9:00,15:00,21:00,3:00 #  Registration timer (in minutes) from start of event.@@ -123,10 +123,10 @@ TvTEventRespawnTeleportDelay = 10 TvTEventStartLeaveTeleportDelay = 10 # First Team Details (name, start and death x,y,z tp point)-TvTEventTeam1Name = Team1+TvTEventTeam1Name = Red TvTEventTeam1Coordinates = 148695,46725,-3414 # Second Team Details (name, start and death x,y,z tp point)-TvTEventTeam2Name = Team2+TvTEventTeam2Name = Blue TvTEventTeam2Coordinates = 149999,46728,-3414 # Reward for winning team  # itemId,amount;itemId,amount;itemId,amount;...@@ -161,4 +161,59 @@ #---------------------------------- EnableWarehouseSortingClan = False EnableWarehouseSortingPrivate = False-EnableWarehouseSortingFreight = False\ No newline at end of file+EnableWarehouseSortingFreight = False++#---------------------------------------------------------------+# Faction Good vs Evil                     +#---------------------------------------------------------------+# Enable faction Good vs Evil+# GvE Engine its a Faction engine called Good Vs Evil+# GvE cant work with the Fun engines TvT and Vip.+# When Gve Engine is Activated the server is not in normal mode and+# if you try somethink like use a normal faction Example (Duel between factions) offcourse will not work.+# Note : When you Enable this YOU MUST KNOW WHAT YOU DOING.+#---------------------------------------------------------------+#True Enable GvE , False disables GvE.+EnableFaction = True+# Config if Good and Evil have Base. It's there where they respawn after : Restart - Use all type of Scroll of Escape - Respawn After Death ?+# Default = False - Talking Island for Good and Orc Village for Evil+EnableFactionBase = True+#Good Alternative Team Name.+NameTeamGood = Angels+#Evil Alternative Team Name.+NameTeamEvil = Demons+#Name color for Good.+ColorNameGood = 00FF00+#Name color for Evil.+ColorNameEvil = FF0000+#Players will win automatic adena for pvp reward if they kill an enemy Faction.+PlayerGetAdenaByPvP = True+#How many adena get by PvP+AmmountAdenaGetByPvP = 1+# Active visuel effect of SoulShots(only)?  - Default = True+# Desactive visuel effect can reduce lag on Mass PvP Server+ActiveAnimSS = True++#---------------------------------------------------------------+# L2J NPC Buffer by House                                      -+#---------------------------------------------------------------+# Enable / Disable Feature+# Default vale: False+#Buffer id = 90001+NPCBufferEnabled = True+# Max schemes that a player can store. Please, do not use too big values+# Default value: 4 (one per subclass...)+NPCBufferMaxSchemesPerChar = 4+# Max skills that a player can store in each scheme. Please, do not use too big values.+# This value should match to max buffs a player can carry+# Default value: 24 (max buffs are 20+4 in retail)+NPCBufferMaxSkllsperScheme = 24+# This enables/disables storing character schemes at server shutdown to database+# Default = True+NPCBufferStoreSchemes = True+# This is to bypasss SQL Adena amount reference so that you can set the same cost for all+# or even setting them for free.+# Free = 0+# Disabled = -1 (if you want to read adena from SQL) +# Default value: -1+NPCBufferStaticCostPerBuff = -1\ No newline at end of fileIndex: java/net/sf/l2j/Config.java===================================================================--- java/net/sf/l2j/Config.java (revision 2733)+++ java/net/sf/l2j/Config.java (working copy)@@ -563,7 +563,25 @@     public static boolean  L2JMOD_ENABLE_WAREHOUSESORTING_CLAN;     public static boolean  L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE;     public static boolean  L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT;+        +    /** L2JMOD Faction Good vs Evil  */+    public static boolean L2JMOD_GVE_ENABLE_FACTION;+    public static boolean L2JMOD_GVE_ENABLE_FACTION_BASE;+    public static String L2JMOD_GVE_NAME_TEAM_GOOD;+    public static String L2JMOD_GVE_NAME_TEAM_EVIL;+    public static int L2JMOD_GVE_COLOR_NAME_GOOD;+    public static int L2JMOD_GVE_COLOR_NAME_EVIL;+    public static boolean L2JMOD_GVE_GET_ADENA_BY_PVP;+    public static int L2JMOD_GVE_AMMOUNT_ADENA_BY_PVP;+    public static boolean L2JMOD_GVE_ACTIVE_ANIM_SS;     +    /** L2JMOD Scheme Buffer  */+    public static boolean  NPCBUFFER_FEATURE_ENABLED;+    public static int      NPCBUFFER_MAX_SCHEMES;+    public static int      NPCBUFFER_MAX_SKILLS;+    public static boolean  NPCBUFFER_STORE_SCHEMES;+    public static int      NPCBUFFER_STATIC_BUFF_COST;+         /** ************************************************** **/    /** L2JMods Settings -End                              **/    /** ************************************************** **/@@ -1781,7 +1799,25 @@                    L2JMOD_ENABLE_WAREHOUSESORTING_CLAN     = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False"));                    L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE  = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False"));                    L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT  = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingFreight", "False"));+                   +                   /** L2JMOD Faction Good vs Evil  */+                   L2JMOD_GVE_ENABLE_FACTION               = Boolean.valueOf(L2JModSettings.getProperty("EnableFaction", "False"));+                   L2JMOD_GVE_ENABLE_FACTION_BASE          = Boolean.valueOf(L2JModSettings.getProperty("EnableFactionBase", "False"));+                   L2JMOD_GVE_NAME_TEAM_GOOD               = L2JModSettings.getProperty("NameTeamGood", "Angels");+                   L2JMOD_GVE_NAME_TEAM_EVIL               = L2JModSettings.getProperty("NameTeamEvil", "Demons");+                   L2JMOD_GVE_COLOR_NAME_GOOD              = Integer.decode("0x" + L2JModSettings.getProperty("ColorNameGood", "00FF00"));+                   L2JMOD_GVE_COLOR_NAME_EVIL              = Integer.decode("0x" + L2JModSettings.getProperty("ColorNameEvil", "FF0000"));+                   L2JMOD_GVE_GET_ADENA_BY_PVP             = Boolean.parseBoolean(L2JModSettings.getProperty("PlayerGetAdenaByPvP", "False"));+                   L2JMOD_GVE_AMMOUNT_ADENA_BY_PVP         = Integer.parseInt(L2JModSettings.getProperty("AmmountAdenaGetByPvP", "1"));+                   L2JMOD_GVE_ACTIVE_ANIM_SS               = Boolean.parseBoolean(L2JModSettings.getProperty("ActiveAnimeSS", "False"));    +                   /** L2J NPC Buffer by House  */+                   NPCBUFFER_FEATURE_ENABLED               = Boolean.valueOf(L2JModSettings.getProperty("NPCBufferEnabled", "False"));     +                   NPCBUFFER_MAX_SCHEMES                   = Integer.parseInt(L2JModSettings.getProperty("NPCBufferMaxSchemesPerChar", "4"));+                   NPCBUFFER_MAX_SKILLS                    = Integer.parseInt(L2JModSettings.getProperty("NPCBufferMaxSkllsperScheme", "24"));+                   NPCBUFFER_STORE_SCHEMES                 = Boolean.valueOf(L2JModSettings.getProperty("NPCBufferStoreSchemes", "True"));+                   NPCBUFFER_STATIC_BUFF_COST              = Integer.parseInt(L2JModSettings.getProperty("NPCBufferStaticCostPerBuff", "-1"));+                                       if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)                    {                        TVT_EVENT_ENABLED = false;@@ -2322,6 +2358,13 @@         else if (pName.equalsIgnoreCase("EnableWarehouseSortingPrivate")) L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("EnableWarehouseSortingFreight")) L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.parseBoolean(pValue); +        //L2JMOD Faction Good vs Evil+        else if (pName.equalsIgnoreCase("EnableFaction")) L2JMOD_GVE_ENABLE_FACTION = Boolean.valueOf(pValue);+        else if (pName.equalsIgnoreCase("EnableFactionBase")) L2JMOD_GVE_ENABLE_FACTION_BASE = Boolean.valueOf(pValue);+        else if (pName.equalsIgnoreCase("PlayerGetAdenaByPvP")) L2JMOD_GVE_GET_ADENA_BY_PVP = Boolean.valueOf(pValue);+        else if (pName.equalsIgnoreCase("AmmountAdenaGetByPvP")) L2JMOD_GVE_AMMOUNT_ADENA_BY_PVP = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("ActiveAnimSS")) L2JMOD_GVE_ACTIVE_ANIM_SS = Boolean.valueOf(pValue);+                 // PvP settings         else if (pName.equalsIgnoreCase("MinKarma")) KARMA_MIN_KARMA = Integer.parseInt(pValue);         else if (pName.equalsIgnoreCase("MaxKarma")) KARMA_MAX_KARMA = Integer.parseInt(pValue);Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java   (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java   (working copy)@@ -19,6 +19,7 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;@@ -65,7 +66,24 @@            activeChar.sendPacket(sm);            sm = null;            return;-       }+           // L2JMODS Faction Good vs Evil+           }else if (friend.isevil() && activeChar.isgood()+           && Config.L2JMOD_GVE_ENABLE_FACTION)+           {+           // Target is wrong.+           sm = new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT);+           activeChar.sendPacket(sm);+           sm = null;+           return;+           } else if (friend.isgood() && activeChar.isevil()+           && Config.L2JMOD_GVE_ENABLE_FACTION)+           {+           // Target is wrong.+           sm = new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT);+           activeChar.sendPacket(sm);+           sm = null;+           return;+           }         else if (friend == activeChar)         {            //You cannot add yourself to your own friend list.Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java  (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java  (working copy)@@ -63,7 +63,20 @@            activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME));            return;         }-+                +        // L2JMODS Faction Good vs Evil+        if (targetPlayer.isevil() && activeChar.isgood())+        {+        activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));+        return;+        }+                +        if (targetPlayer.isgood() && activeChar.isevil())+        {+        activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));+        return;+        }+                 if (Config.LOG_CHAT)        {            LogRecord record = new LogRecord(Level.INFO, _message);Index: java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java  (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java  (working copy)@@ -75,6 +75,20 @@             player.sendMessage("You or your target cant request trade in Olympiad mode");             return;         }+                +        // L2JMODS Faction Good vs Evil+        L2PcInstance player2 = (L2PcInstance) target;+        if (player2.isevil() && player.isgood() && Config.L2JMOD_GVE_ENABLE_FACTION)+        {+        player.sendMessage("You Cant Trade with Different Faction");+        return;+        }+                +        if (player2.isgood() && player.isevil() && Config.L2JMOD_GVE_ENABLE_FACTION)+        {+        player.sendMessage("You Cant Trade with Different Faction");+        return;+        }          // Alt game - Karma punishment         if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0 || partner.getKarma() > 0))Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelAnswerStart.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelAnswerStart.java    (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelAnswerStart.java    (working copy)@@ -14,6 +14,7 @@  */ package net.sf.l2j.gameserver.network.clientpackets; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.instancemanager.DuelManager; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId;@@ -67,6 +68,13 @@                return;            } +           // L2JMODS Faction Good vs Evil+           if ((Config.L2JMOD_GVE_ENABLE_FACTION && player.isevil()) || player.isgood())+           {+           player.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_UNABLE_TO_REQUEST_A_DUEL_AT_THIS_TIME));+           return;+           }+                       if (_partyDuel == 1)            {                msg1 = new SystemMessage(SystemMessageId.YOU_HAVE_ACCEPTED_S1S_CHALLENGE_TO_A_PARTY_DUEL_THE_DUEL_WILL_BEGIN_IN_A_FEW_MOMENTS);Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java    (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java    (working copy)@@ -84,6 +84,17 @@         TradeList storeList = storePlayer.getSellList();        if (storeList == null) return;+       +       // L2JMODS Faction Good vs Evil+       if (Config.L2JMOD_GVE_ENABLE_FACTION)+       {+       if ((storePlayer.isevil() && player.isgood()) || (storePlayer.isgood() && player.isevil()))+       {+       player.sendMessage("You cant Buy from Different Faction");+       sendPacket(ActionFailed.STATIC_PACKET);+       return;+       }+       }          if (!player.getAccessLevel().allowTransaction())         {Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java  (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java  (working copy)@@ -81,6 +81,19 @@            requestor.sendPacket(sm);            return;        }+       +       // Good and Evil cant join same party+       if (target.isevil() && requestor.isgood())+       {+       requestor.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));+       return;+       }+       +       if (target.isgood() && requestor.isevil())+       {+       requestor.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));+       return;+       }         if (target == requestor)         {Index: java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java  (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java  (working copy)@@ -100,7 +100,7 @@         if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE && player.getKarma() > 0) return;          // Freight price from config or normal price per item slot (30)-       int fee = _count * 30;+       int fee = _count * 0;        int currentAdena = player.getAdena();         int slots = 0; Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java  (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java  (working copy)@@ -69,6 +69,14 @@            activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_UNABLE_TO_REQUEST_A_DUEL_AT_THIS_TIME));            return;         }+        +        // L2JMODS Faction Good vs Evil+        if ((Config.L2JMOD_GVE_ENABLE_FACTION && activeChar.isevil()) || activeChar.isgood())+        {+        activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_UNABLE_TO_REQUEST_A_DUEL_AT_THIS_TIME));+        return;+        }+                 else if (!targetChar.canDuel())         {            activeChar.sendPacket(targetChar.getNoDuelReason());Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java    (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java    (working copy)@@ -19,7 +19,6 @@ import java.sql.ResultSet; import java.util.logging.Level; import java.util.logging.Logger;- import net.sf.l2j.Base64; import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory;@@ -46,6 +45,7 @@ import net.sf.l2j.gameserver.model.L2Effect; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;+import net.sf.l2j.gameserver.model.base.Experience; import net.sf.l2j.gameserver.model.entity.ClanHall; import net.sf.l2j.gameserver.model.entity.Couple; import net.sf.l2j.gameserver.model.entity.Hero;@@ -75,6 +75,8 @@ import net.sf.l2j.gameserver.network.serverpackets.UserInfo; import net.sf.l2j.gameserver.templates.skills.L2EffectType; import net.sf.l2j.gameserver.util.FloodProtector;+import net.sf.l2j.gameserver.datatables.CharSchemesTable;+ /**  * Enter World Packet Handler<p>  * <p>@@ -189,9 +191,30 @@         }                  setPledgeClass(activeChar);--        activeChar.sendPacket(new UserInfo(activeChar));         +        if(activeChar.getLevel() < 80)+        {+           byte lvl = ((byte)86);+           if (lvl >= 1 && lvl <= Experience.MAX_LEVEL)+           {+               long pXp = activeChar.getExp();+               long tXp = Experience.LEVEL[lvl];+               +               if (pXp > tXp)+               {+                   activeChar.removeExpAndSp(pXp - tXp, 0);+               }+               else if (pXp < tXp)+               {+                   activeChar.addExpAndSp(tXp - pXp, 0);+               }+           }+           activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());+            activeChar.setCurrentCp(activeChar.getMaxCp());+        }+    +       activeChar.sendPacket(new UserInfo(activeChar));+                 // Send Macro List         activeChar.getMacroses().sendUpdate();         @@ -295,7 +318,42 @@          SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);         Announcements.getInstance().showAnnouncements(activeChar);-+        +                // L2JMODS Faction Good vs Evil+                // Welcome for evil+                if (activeChar.isevil() && Config.L2JMOD_GVE_ENABLE_FACTION)+                {+                    activeChar.getAppearance().setNameColor(Config.L2JMOD_GVE_COLOR_NAME_EVIL);+                    activeChar.sendMessage("Welcome " + activeChar.getName()+                        + " u are fighiting for " + Config.L2JMOD_GVE_NAME_TEAM_EVIL+                        + "  Faction");     +                }+                // If Enable Faction Base = true teleport evil to his village principal+                if (activeChar.isevil() && Config.L2JMOD_GVE_ENABLE_FACTION_BASE)+                {+                    activeChar.teleToLocation(-45683, -113588 , -240, true);+                    activeChar.sendMessage("You have been teleported Back to your Faction Base");+                }+                // Welcome for good+                if (activeChar.isgood() && Config.L2JMOD_GVE_ENABLE_FACTION)+                {+                    activeChar.getAppearance().setNameColor(Config.L2JMOD_GVE_COLOR_NAME_GOOD);+                    activeChar.sendMessage("Welcome " + activeChar.getName()+                        + " u are fighiting for " + Config.L2JMOD_GVE_NAME_TEAM_GOOD+                        + " Faction");      +                }+                // If Enable Faction Base = true teleport good to his village principal+                if (activeChar.isgood() && Config.L2JMOD_GVE_ENABLE_FACTION)+                {+                    activeChar.teleToLocation(-83506, 243791, -3730, true);+                    activeChar.sendMessage("You have been teleported Back to your Faction Base"); +        }+        +        if (activeChar.getLevel() <= 86)+        {+           activeChar.setNoble(true);+        }+                 if (Config.SERVER_NEWS)         {             String serverNews = HtmCache.getInstance().getHtm("data/html/servnews.htm");@@ -368,6 +426,9 @@         RegionBBSManager.getInstance().changeCommunityBoard();                  TvTEvent.onLogin(activeChar);+        +        // NPCBuffer+        if (Config.NPCBUFFER_FEATURE_ENABLED) CharSchemesTable.getInstance().onPlayerLogin(activeChar.getObjectId());     }      /**Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java   (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java   (working copy)@@ -117,6 +117,17 @@            storePlayer.broadcastUserInfo();            return;        }+        +        // L2JMODS Faction Good vs Evil+        if (Config.L2JMOD_GVE_ENABLE_FACTION)+        {+        if ((storePlayer.isevil() && player.isgood()) || (storePlayer.isgood() && player.isevil()))+        {+        player.sendMessage("You cant sell on Different Faction");+        sendPacket(ActionFailed.STATIC_PACKET);+        return;+        }+        }          if (!storeList.privateStoreSell(player, _items, _price))         {Index: java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java    (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java    (working copy)@@ -14,6 +14,7 @@  */ package net.sf.l2j.gameserver.network.clientpackets; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId;@@ -52,6 +53,20 @@             return;         } +     // L2JMODS Faction Good vs Evil+        L2PcInstance player2 = player.getActiveRequester();+        if (player2.isevil() && player.isgood()+        && Config.L2JMOD_GVE_ENABLE_FACTION)+        {+        player.sendMessage("You Cant Trade with Different Faction");+        return;+        }+        if (player2.isgood() && player.isevil()+        && Config.L2JMOD_GVE_ENABLE_FACTION)+        {+        player.sendMessage("You Cant Trade with Different Faction");+        return;+        }          L2PcInstance partner = player.getActiveRequester();         if (partner == null)Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestAnswerJoinParty.java===================================================================--- java/net/sf/l2j/gameserver/network/clientpackets/RequestAnswerJoinParty.java    (revision 2733)+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestAnswerJoinParty.java    (working copy)@@ -49,6 +49,18 @@         if(player != null)         {            L2PcInstance requestor = player.getActiveRequester();+           +           // L2JMODS Faction Good vs Evil+                   if (player.isevil() && requestor.isgood())+                   {+                       return;+                   }+                   +                   if (player.isgood() && requestor.isevil())+                   {+                       return;+           }+                   if (requestor == null)            return; Index: java/net/sf/l2j/gameserver/Shutdown.java===================================================================--- java/net/sf/l2j/gameserver/Shutdown.java    (revision 2733)+++ java/net/sf/l2j/gameserver/Shutdown.java    (working copy)@@ -33,6 +33,7 @@ import net.sf.l2j.gameserver.network.serverpackets.ServerClose; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; import net.sf.l2j.gameserver.util.Broadcast;+import net.sf.l2j.gameserver.datatables.CharSchemesTable;  /**  *@@ -521,6 +522,9 @@        // Save all global (non-player specific) Quest data that needs to persist after reboot        QuestManager.getInstance().save();        +       // NPCBuffer: save player schemes data+       if (Config.NPCBUFFER_FEATURE_ENABLED && Config.NPCBUFFER_STORE_SCHEMES) CharSchemesTable.getInstance().onServerShutdown();+               //Save items on ground before closing        if (Config.SAVE_DROPPED_ITEM)        {Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (revision 2733)+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (working copy)@@ -237,8 +237,8 @@     // Character Character SQL String Definitions:     private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,last_recom_date) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";-   private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=? WHERE charId=?";-    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level FROM characters WHERE charId=?";+   private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,good=?,evil=? WHERE charId=?";+    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,good,evil FROM characters WHERE charId=?";      // Character Subclass SQL String Definitions:     private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE charId=? ORDER BY class_index ASC";@@ -465,7 +465,11 @@     private boolean _noble = false;    private boolean _hero = false;-+   +   /** Faction Good vs Evil */+   private boolean _isgood = false;+   private boolean _isevil = false;+       /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */    private L2FolkInstance _lastFolkNpc = null; @@ -2127,6 +2131,7 @@    public void setPvpKills(int pvpKills)    {        _pvpKills = pvpKills;+           }        /**@@ -5147,6 +5152,24 @@         // If in Arena, do nothing        if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))            return;+       +       // L2JMODS Faction GvE - adena reward+               if (Config.L2JMOD_GVE_GET_ADENA_BY_PVP && Config.L2JMOD_GVE_ENABLE_FACTION)+               {+                   if ((isgood() && targetPlayer.isgood())+                       || (isevil() && targetPlayer.isevil()))+                   {+                   sendMessage("Cant get adena reward from same faction.");+                   sendPacket(ActionFailed.STATIC_PACKET);+                   return;+                   } else+                   {+                   int itemReward = Config.L2JMOD_GVE_AMMOUNT_ADENA_BY_PVP;+                   addItem("Loot", 57, itemReward, this, true);+                   sendMessage("You have win " + itemReward+                       + " adena(s) from pvp kill.");+                   }+               }          // Check if it's pvp        if (@@ -5228,6 +5251,11 @@      */     public void increasePkKillsAndKarma(int targLVL)     {+       if (Config.L2JMOD_GVE_ENABLE_FACTION)+           {+             return;+           }+                int baseKarma           = Config.KARMA_MIN_KARMA;         int newKarma            = baseKarma;         int karmaLimit          = Config.KARMA_MAX_KARMA;@@ -5298,6 +5326,10 @@     public void updatePvPStatus()    {+       if (!isgood() || !isevil())+           {+           return;+           }        if (isInsideZone(ZONE_PVP)) return;        setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME); @@ -5322,6 +5371,7 @@            if (getPvpFlag() == 0)                startPvPFlag();         }+    }     /**@@ -6530,6 +6580,9 @@                player.setOnlineTime(rset.getLong("onlinetime"));                player.setNewbie(rset.getInt("newbie"));                player.setNoble(rset.getInt("nobless")==1);+               +               player.setgood((rset.getInt("good")==1)? true : false);+               player.setevil((rset.getInt("evil")==1)? true : false);                 player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time"));                if (player.getClanJoinExpiryTime() < System.currentTimeMillis())@@ -6987,7 +7040,9 @@            statement.setLong(47, getClanCreateExpiryTime());            statement.setString(48, getName());            statement.setLong(49, getDeathPenaltyBuffLevel());-            statement.setInt(50, getObjectId());+           statement.setInt(50, isgood() ? 1 : 0);+           statement.setInt(51, isevil() ? 1 : 0);+           statement.setInt(52, getObjectId());             statement.execute();            statement.close();@@ -7789,12 +7844,24 @@     * <li>Check if the attacker is L2MonsterInstance</li>     * <li>If the attacker is a L2PcInstance, check if it is not in the same party </li>     * <li>Check if the L2PcInstance has Karma </li>-    * <li>If the attacker is a L2PcInstance, check if it is not in the same siege clan (Attacker, Defender) </li><BR><BR>+    * <li>If the attacker is a L2PcInstaknce, check if it is not in the same siege clan (Attacker, Defender) </li><BR><BR>     *     */    @Override    public boolean isAutoAttackable(L2Character attacker)    {+       //L2JMODS Faction Good vs Evil+       if ((attacker instanceof L2PcInstance)+       && ((L2PcInstance) attacker).isgood())+       {+       return true;+       }+       if ((attacker instanceof L2PcInstance)+       && ((L2PcInstance) attacker).isevil())+       {+       return true;+       }+               // Check if the attacker isn't the L2PcInstance Pet        if (attacker == this || attacker == getPet())            return false;@@ -8459,6 +8526,11 @@     */    public boolean checkPvpSkill(L2Object target, L2Skill skill)    {+       // L2JMODS Faction Good vs Evil+       if (isgood() || isevil())+       {+       return true;+       }        // check for PC->PC Pvp status        if (                target != null &&                                                       // target not null and@@ -9181,6 +9253,12 @@        return _blockList;    } ++      public void reloadPVPHeroAura()+      {+         sendPacket(new UserInfo(this));+      }+               public void setHero(boolean hero)    {        if (hero && _baseClass == _activeClass)@@ -9410,7 +9488,29 @@        }          sendPacket(sl);       }+ // L2JMODS Faction Good vs Evil+    public boolean isgood()+    {+    return _isgood;+    }+         +    public boolean isevil()+    {+    return _isevil;+    }+        +    // L2JMODS Faction Good vs Evil+    public void setgood(boolean value)+    {+    _isgood = value;+    }+        +    public void setevil(boolean value)+    {+    _isevil = value;+    }     +         /**      * 1. Add the specified class ID as a subclass (up to the maximum number of <b>three</b>)      * for this character.<BR>Index: java/net/sf/l2j/gameserver/model/L2World.java===================================================================--- java/net/sf/l2j/gameserver/model/L2World.java   (revision 2733)+++ java/net/sf/l2j/gameserver/model/L2World.java   (working copy)@@ -64,6 +64,8 @@      /** HashMap(String Player name, L2PcInstance) containing all the players in game */     private Map<String, L2PcInstance> _allPlayers;+    private Map<String, L2PcInstance> _allgoodPlayers;+    private Map<String, L2PcInstance> _allevilPlayers;      /** L2ObjectHashMap(L2Object) containing all visible objects */     private Map<Integer,L2Object> _allObjects;@@ -82,6 +84,8 @@     {         //_allGms     = new FastMap<String, L2PcInstance>();         _allPlayers   = new FastMap<String, L2PcInstance>().setShared(true);+        _allgoodPlayers   = new FastMap<String, L2PcInstance>().setShared(true);+        _allevilPlayers   = new FastMap<String, L2PcInstance>().setShared(true);         _petsInstance = new FastMap<Integer,L2PetInstance>().setShared(true);         _allObjects   = new FastMap<Integer,L2Object>().setShared(true); @@ -221,6 +225,15 @@         return _allPlayers;     } +    public Collection<L2PcInstance> getAllgoodPlayers()+    {+    return _allgoodPlayers.values();+    }+    public Collection<L2PcInstance> getAllevilPlayers()+    {+    return _allevilPlayers.values();+    }+         /**      * Return how many players are online.<BR><BR>      *@@ -230,6 +243,15 @@     {         return _allPlayers.size();     }+    +    public int getAllgoodPlayersCount()+    {+    return _allgoodPlayers.size();+    }+    public int getAllevilPlayersCount()+    {+    return _allevilPlayers.size();+    }      /**      * Return the player instance corresponding to the given name.<BR><BR>@@ -332,7 +354,18 @@                }                _allPlayers.put(player.getName().toLowerCase(), player);             }-        }+            // L2JMODS Faction Good vs Evil+            // If selected L2Object is a good or evil Faction Added as Known Object+            if (((L2PcInstance) object).isgood())+            {+            _allgoodPlayers.put(player.getName().toLowerCase(), player);+            } +            else if (((L2PcInstance) object).isevil())+            {+            _allevilPlayers.put(player.getName().toLowerCase(), player);+            }+            _allPlayers.put(player.getName().toLowerCase(), player);+            }                  if (!newRegion.isActive())             return;Index: java/net/sf/l2j/gameserver/model/L2Clan.java===================================================================--- java/net/sf/l2j/gameserver/model/L2Clan.java    (revision 2733)+++ java/net/sf/l2j/gameserver/model/L2Clan.java    (working copy)@@ -1743,6 +1743,19 @@            activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET));             return false;         }+       +       // L2JMODS Faction Good vs Evil+       if (activeChar.isgood() && target.isevil() && Config.L2JMOD_GVE_ENABLE_FACTION)+       {+       activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET));+       return false;+       }+       if (activeChar.isevil() && target.isgood() && Config.L2JMOD_GVE_ENABLE_FACTION)+       {+       activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET));+       return false;+       }+               if (activeChar.getObjectId() == target.getObjectId())        {            activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_INVITE_YOURSELF));Index: java/net/sf/l2j/gameserver/model/L2Character.java===================================================================--- java/net/sf/l2j/gameserver/model/L2Character.java   (revision 2733)+++ java/net/sf/l2j/gameserver/model/L2Character.java   (working copy)@@ -112,6 +112,7 @@ import net.sf.l2j.gameserver.util.Util; import net.sf.l2j.util.Point3D; import net.sf.l2j.util.Rnd;+ /**  * Mother class of all character objects of the world (PC, NPC...)<BR><BR>  *@@ -685,7 +686,25 @@                    sendPacket(ActionFailed.STATIC_PACKET);                    return;                }-           }+               +               // L2JMODS FACTION Good vs Evil+               if (((L2PcInstance) this).isgood()+               && ((L2PcInstance) target).isgood()+               && Config.L2JMOD_GVE_ENABLE_FACTION )+               {+               ((L2PcInstance) this).sendMessage("Cant attack a player from your faction");+               sendPacket(ActionFailed.STATIC_PACKET);+               return;+               }+               if (((L2PcInstance) this).isevil()+               && ((L2PcInstance) target).isevil()+               && Config.L2JMOD_GVE_ENABLE_FACTION )+               {+               ((L2PcInstance) this).sendMessage("Cant attack a player from your faction");+               sendPacket(ActionFailed.STATIC_PACKET);+               return;+               }+               }            // Checking if target has moved to peace zone            if (target.isInsidePeaceZone((L2PcInstance)this))            {@@ -1437,7 +1456,59 @@                    }                }            } -           else target = (L2Character) getTarget();+           else +               {+               target = (L2Character) getTarget();+               +               if ((target instanceof L2PcInstance)+               && (this instanceof L2PcInstance))+               {+               if (((L2PcInstance) this).isgood()+               && (((L2PcInstance) target).isgood() && Config.L2JMOD_GVE_ENABLE_FACTION))+               {+               ((L2PcInstance) this)+               .sendMessage("Cant attack a player from your faction");+               sendPacket(ActionFailed.STATIC_PACKET);+               return;+               } else if (((L2PcInstance) this).isgood()+               && ((((L2PcInstance) target).isgood()+               && Config.L2JMOD_GVE_ENABLE_FACTION && (skill+               .getSkillType() == L2SkillType.BUFF))+               || (skill.getSkillType() == L2SkillType.HOT)+               || (skill.getSkillType() == L2SkillType.HEAL)+               || (skill.getSkillType() == L2SkillType.COMBATPOINTHEAL)+               || (skill.getSkillType() == L2SkillType.HEAL_PERCENT)+               || (skill.getSkillType() == L2SkillType.MANAHEAL)+               || (skill.getSkillType() == L2SkillType.MANAHEAL_PERCENT)+               || (skill.getSkillType() == L2SkillType.BALANCE_LIFE) || (skill+               .getSkillType() == L2SkillType.CONT)))+               {+               return;+               }+               if (((L2PcInstance) this).isevil()+               && (((L2PcInstance) target).isevil() && Config.L2JMOD_GVE_ENABLE_FACTION))+               {+               ((L2PcInstance) this)+               .sendMessage("Cant attack a player from your faction");+               sendPacket(ActionFailed.STATIC_PACKET);+               return;+               } else if (((L2PcInstance) this).isevil()+               && ((((L2PcInstance) target).isevil()+               && Config.L2JMOD_GVE_ENABLE_FACTION && (skill+               .getSkillType() == L2SkillType.BUFF))+               || (skill.getSkillType() == L2SkillType.HOT)+               || (skill.getSkillType() == L2SkillType.HEAL)+               || (skill.getSkillType() == L2SkillType.COMBATPOINTHEAL)+               || (skill.getSkillType() == L2SkillType.HEAL_PERCENT)+               || (skill.getSkillType() == L2SkillType.MANAHEAL)+               || (skill.getSkillType() == L2SkillType.MANAHEAL_PERCENT)+               || (skill.getSkillType() == L2SkillType.BALANCE_LIFE) || (skill+               .getSkillType() == L2SkillType.CONT)))+               {+               return;+               }+               }+               }         }         if (target == null)@@ -2021,6 +2092,19 @@        if (!isTeleporting())        {            setIsPendingRevive(false);+           // L2JMODS Faction Good vs Evil+           if ((this instanceof L2PcInstance)+           && (((L2PcInstance) this).isgood() && Config.L2JMOD_GVE_ENABLE_FACTION ))+           {+           teleToLocation(-83506, 243791, -3730);+           } else+           {+           if ((this instanceof L2PcInstance)+           && (((L2PcInstance) this).isevil() && Config.L2JMOD_GVE_ENABLE_FACTION ))+           {+           teleToLocation(-45683, -113588 , -240);+           }+           }            setIsDead(false);            boolean restorefull = false;            Index: java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfEscape.java===================================================================--- java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfEscape.java (revision 2733)+++ java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfEscape.java (working copy)@@ -16,6 +16,7 @@  import java.util.logging.Level; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.GameTimeController; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.ai.CtrlIntention;@@ -196,6 +197,14 @@            _activeChar.setIsIn7sDungeon(false);            _activeChar.setInstanceId(0);            +           // L2JMODS Faction GvE (enable_faction_base may be true) - Check to see if player is good or evil and redirect to his village principal+           if (_activeChar.isgood() && Config.L2JMOD_GVE_ENABLE_FACTION_BASE)+           {_activeChar.teleToLocation(-83506, 243791, -3730, true); // good Base+           }+           if (_activeChar.isevil() && Config.L2JMOD_GVE_ENABLE_FACTION_BASE)+           {_activeChar.teleToLocation(-45683, -113588 , -240, true); // evil Base+           }+                       try            {                switch (_itemId)Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java===================================================================--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java   (revision 2733)+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java   (working copy)@@ -129,6 +129,19 @@            return false;        }        +           if (activeChar.isgood() && activeChar.isevil())+           {+               activeChar.sendMessage("You cant married if you are not in the same Faction.");+           return false;+           }+                   +           if (activeChar.isevil() && activeChar.isgood())+           {+               activeChar.sendMessage("You cant married if you are not in the same Faction.");+           return false;+           }+            +               // check if player is already engaged        if (activeChar.getPartnerId() != 0)        {Index: java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java===================================================================--- java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java  (revision 2733)+++ java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java  (working copy)@@ -66,6 +66,17 @@            return false;        }        +       // L2JMODS Faction GvE - Check to see if the player is in faction.+       if (Config.L2JMOD_GVE_ENABLE_FACTION)+       {+       if (activeChar.isevil() || activeChar.isgood())+       {+       activeChar+       .sendMessage("You may not use an escape command in Faction mode.");+       return false;+       }+       }+               // Check to see if player is in jail        if (activeChar.isInJail())        {Index: java/net/sf/l2j/gameserver/handler/skillhandlers/SummonFriend.java===================================================================--- java/net/sf/l2j/gameserver/handler/skillhandlers/SummonFriend.java  (revision 2733)+++ java/net/sf/l2j/gameserver/handler/skillhandlers/SummonFriend.java  (working copy)@@ -28,6 +28,7 @@ import net.sf.l2j.gameserver.model.entity.Instance; import net.sf.l2j.gameserver.model.entity.TvTEvent; import net.sf.l2j.gameserver.network.SystemMessageId;+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.ConfirmDlg; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; import net.sf.l2j.gameserver.templates.skills.L2SkillType;@@ -127,6 +128,19 @@            summonerChar.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING));            return false;                   }+       +       // L2JMODS Faction GvE+       if (targetChar.isevil())+       {+           summonerChar.sendMessage("You may not use an Summon Friend skill in a Faction mode.");+           summonerChar.sendPacket(ActionFailed.STATIC_PACKET);+           return false;+       }+       if (targetChar.isgood())+       {+           summonerChar.sendMessage("You may not use an Summon Friend skill in a Faction mode.");+           summonerChar.sendPacket(ActionFailed.STATIC_PACKET);+       }         if (targetChar.isInsideZone(L2Character.ZONE_NOSUMMONFRIEND))        {Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java===================================================================--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (revision 2733)+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (working copy)@@ -33,6 +33,7 @@ import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;+import net.sf.l2j.gameserver.datatables.BufferSkillsTable;  /**  * This class handles following admin commands:@@ -254,6 +255,11 @@                    NpcWalkerRoutesTable.getInstance().load();                    activeChar.sendMessage("All NPC walker routes have been reloaded");                }+               else if(type.startsWith("npcbuffer"))+               {+                   BufferSkillsTable.reload();+                   activeChar.sendMessage("Buffer skills table has been reloaded");+               }                else if (type.startsWith("access"))                {                    AccessLevels.getInstance().reloadAccessLevels();Index: java/net/sf/l2j/gameserver/GameServer.java===================================================================--- java/net/sf/l2j/gameserver/GameServer.java  (revision 2733)+++ java/net/sf/l2j/gameserver/GameServer.java  (working copy)@@ -111,6 +111,8 @@ import net.sf.l2j.gameserver.util.DynamicExtension; import net.sf.l2j.status.Status; import net.sf.l2j.util.DeadLockDetector;+import net.sf.l2j.gameserver.datatables.BufferSkillsTable;+import net.sf.l2j.gameserver.datatables.CharSchemesTable;  import org.mmocore.network.SelectorConfig; import org.mmocore.network.SelectorThread;@@ -449,6 +451,12 @@                TvTManager.getInstance();        KnownListUpdateTaskManager.getInstance();+       /** NPC Buffer by House */+       if (Config.NPCBUFFER_FEATURE_ENABLED)+       {+       BufferSkillsTable.getInstance();+       CharSchemesTable.getInstance();+       }        if (Config.DEADLOCK_DETECTOR)        {            _deadDetectThread = new DeadLockDetector(); 
Image
Locked