Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2J_Server
- Index: dist/game/config/custom.properties
- ===================================================================
- --- dist/game/config/custom.properties (revision 5526)
- +++ dist/game/config/custom.properties (working copy)
- @@ -461,4 +297,306 @@
- # ---------------------------------------------------------------------------
- # Enables .changepassword voiced command which allows the players to change their account's password ingame.
- # Default: False
- -AllowChangePassword = False
- +AllowChangePassword = False
- +
- +# ---------------------------------------------------------------------------
- +# Custom User Panel (by NeverMore)
- +# ---------------------------------------------------------------------------
- +# Using this feature every single player will have the opportunity to press .user into the game !
- +# .user command have many actions and features like (Enable/Disable pm , trade , custom effect etc etc )
- +# ---------------------------------------------------------------------------
- +# Allow .user command
- +AllowUserCommand = True
- +# Allow .user command
- +AllowExpRefusal = True
- +# Allow trade off/on action
- +AllowTradeCommand = True
- +# Allow pm off/on action
- +AllowPmCommand = True
- +# Allow .effecton/off command ( using this command ,player will get a special aura )
- +AllowSpecialEffect = True
- \ No newline at end of file
- Index: java/com/l2jserver/gameserver/model/L2Party.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/L2Party.java (revision 5526)
- +++ java/com/l2jserver/gameserver/model/L2Party.java (working copy)
- @@ -805,7 +805,7 @@
- {
- for (L2Character member : rewardedMembers)
- {
- - if (member.isDead())
- + if (member.isDead() || ((L2PcInstance) member)._isexpsprefusal)
- {
- continue;
- }
- Index: java/com/l2jserver/Config.java
- ===================================================================
- --- java/com/l2jserver/Config.java (revision 5526)
- +++ java/com/l2jserver/Config.java (working copy)
- @@ -765,8 +737,154 @@
- public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
- public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
- public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
- + public static boolean ENABLE_TRADE_REFUSAL;
- + public static boolean ENABLE_PM_REFUSAL;
- + public static boolean SHOW_USER;
- + public static boolean ENABLE_SPECIAL_EFFECT;
- + public static boolean ENABLE_EXP_REFUSAL;
- +
- // --------------------------------------------------
- // NPC Settings
- // --------------------------------------------------
- public static boolean ANNOUNCE_MAMMON_SPAWN;
- @@ -2425,7 +2535,306 @@
- }
- }
- L2JMOD_ALLOW_CHANGE_PASSWORD = Boolean.parseBoolean(L2JModSettings.getProperty("AllowChangePassword", "False"));
- + ENABLE_PM_REFUSAL = Boolean.parseBoolean(L2JModSettings.getProperty("AllowPmCommand","False"));
- + ENABLE_TRADE_REFUSAL = Boolean.parseBoolean(L2JModSettings.getProperty("AllowTradeCommand","False"));
- + SHOW_USER = Boolean.parseBoolean(L2JModSettings.getProperty("AllowUserCommand","False"));
- + ENABLE_SPECIAL_EFFECT = Boolean.parseBoolean(L2JModSettings.getProperty("AllowSpecialEffect","False"));
- + ENABLE_EXP_REFUSAL = Boolean.parseBoolean(L2JModSettings.getProperty("AllowExpRefusal", "true"));
- +
- if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
- {
- TVT_EVENT_ENABLED = false;
- Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java
- ===================================================================
- --- java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java (revision 5526)
- +++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java (working copy)
- @@ -65,6 +65,26 @@
- return;
- }
- + if (L2PcInstance._isoneffect == true)
- + {
- + L2PcInstance._isoneffect = false;
- + }
- +
- + if (L2PcInstance._istraderefusal == true)
- + {
- + L2PcInstance._istraderefusal = false;
- + }
- +
- + if (L2PcInstance._ispmrefusal == true)
- + {
- + L2PcInstance._ispmrefusal = false;
- + }
- +
- + if (L2PcInstance._isexpsprefusal == true)
- + {
- + L2PcInstance._isexpsprefusal = false;
- + }
- +
- if (player.isLocked())
- {
- _log.warning("Player " + player.getName() + " tried to restart during class change.");
- Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5526)
- +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -297,6 +300,28 @@
- */
- public final class L2PcInstance extends L2Playable
- {
- +
- + // User panel
- + public static boolean _isoneffect = false;
- + public static boolean _ispmrefusal = false;
- + public static boolean _istraderefusal = false;
- + public static boolean _isexpsprefusal = false;
- // Character Skill SQL String Definitions:
- private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?";
- private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)";
- Index: java/com/l2jserver/gameserver/network/clientpackets/Logout.java
- ===================================================================
- --- java/com/l2jserver/gameserver/network/clientpackets/Logout.java (revision 5526)
- +++ java/com/l2jserver/gameserver/network/clientpackets/Logout.java (working copy)
- @@ -53,6 +53,26 @@
- if (player == null)
- return;
- + if (L2PcInstance._isoneffect == true)
- + {
- + L2PcInstance._isoneffect = false;
- + }
- +
- + if (L2PcInstance._istraderefusal == true)
- + {
- + L2PcInstance._istraderefusal = false;
- + }
- +
- + if (L2PcInstance._ispmrefusal == true)
- + {
- + L2PcInstance._ispmrefusal = false;
- + }
- +
- + if (L2PcInstance._isexpsprefusal == true)
- + {
- + L2PcInstance._isexpsprefusal = false;
- + }
- +
- if(player.getActiveEnchantItem() != null || player.getActiveEnchantAttrItem() != null)
- {
- player.sendPacket(ActionFailed.STATIC_PACKET);
- Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/L2Attackable.java (revision 5526)
- +++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java (working copy)
- @@ -718,6 +718,15 @@
- exp *= Config.L2JMOD_CHAMPION_REWARDS;
- sp *= Config.L2JMOD_CHAMPION_REWARDS;
- }
- +
- + if (attacker instanceof L2PcInstance)
- + {
- + if (((L2PcInstance) attacker)._isexpsprefusal == true)
- + {
- + exp = 0;
- + sp = 0;
- + }
- + }
- // Check for an over-hit enabled strike
- if (attacker instanceof L2PcInstance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement