Changeset 8630 for trunk/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminExpSp.java
- Timestamp:
- Jan 16, 2012 7:56:19 AM (4 months ago)
- Location:
- trunk/L2J_DataPack
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dist/game/data/scripts/handlers/admincommandhandlers/AdminExpSp.java (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/L2J_DataPack
- Property svn:mergeinfo changed
/branches/unstable/L2J_DataPack_BETA merged: 8407-8426,8428-8480,8482-8491,8493-8588,8590-8629
- Property svn:mergeinfo changed
-
trunk/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminExpSp.java
r7720 r8630 24 24 import com.l2jserver.gameserver.network.SystemMessageId; 25 25 import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; 26 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;27 28 26 29 27 /** … … 45 43 }; 46 44 45 @Override 47 46 public boolean useAdminCommand(String command, L2PcInstance activeChar) 48 47 { … … 77 76 } 78 77 78 @Override 79 79 public String[] getAdminCommandList() 80 80 { … … 90 90 else 91 91 { 92 activeChar.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.INCORRECT_TARGET));92 activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); 93 93 return; 94 94 } … … 113 113 else 114 114 { 115 activeChar.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.INCORRECT_TARGET));115 activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); 116 116 return false; 117 117 } … … 121 121 return false; 122 122 } 123 else 123 124 String exp = st.nextToken(); 125 String sp = st.nextToken(); 126 long expval = 0; 127 int spval = 0; 128 try 124 129 { 125 String exp = st.nextToken(); 126 String sp = st.nextToken(); 127 long expval = 0; 128 int spval = 0; 129 try 130 { 131 expval = Long.parseLong(exp); 132 spval = Integer.parseInt(sp); 133 } 134 catch (Exception e) 135 { 136 return false; 137 } 138 if (expval != 0 || spval != 0) 139 { 140 //Common character information 141 player.sendMessage("Admin is adding you " + expval + " xp and " + spval + " sp."); 142 player.addExpAndSp(expval, spval); 143 //Admin information 144 activeChar.sendMessage("Added " + expval + " xp and " + spval + " sp to " + player.getName() + "."); 145 if (Config.DEBUG) 146 _log.fine("GM: " + activeChar.getName() + "(" + activeChar.getObjectId() + ") added " + expval + " xp and " + spval + " sp to " + player.getObjectId() + "."); 147 } 130 expval = Long.parseLong(exp); 131 spval = Integer.parseInt(sp); 132 } 133 catch (Exception e) 134 { 135 return false; 136 } 137 if (expval != 0 || spval != 0) 138 { 139 //Common character information 140 player.sendMessage("Admin is adding you " + expval + " xp and " + spval + " sp."); 141 player.addExpAndSp(expval, spval); 142 //Admin information 143 activeChar.sendMessage("Added " + expval + " xp and " + spval + " sp to " + player.getName() + "."); 144 if (Config.DEBUG) 145 _log.fine("GM: " + activeChar.getName() + "(" + activeChar.getObjectId() + ") added " + expval + " xp and " + spval + " sp to " + player.getObjectId() + "."); 148 146 } 149 147 return true; … … 160 158 else 161 159 { 162 activeChar.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.INCORRECT_TARGET));160 activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); 163 161 return false; 164 162 } 165 163 StringTokenizer st = new StringTokenizer(ExpSp); 166 164 if (st.countTokens() != 2) 165 { 167 166 return false; 168 else 167 } 168 169 String exp = st.nextToken(); 170 String sp = st.nextToken(); 171 long expval = 0; 172 int spval = 0; 173 try 169 174 { 170 String exp = st.nextToken(); 171 String sp = st.nextToken(); 172 long expval = 0; 173 int spval = 0; 174 try 175 { 176 expval = Long.parseLong(exp); 177 spval = Integer.parseInt(sp); 178 } 179 catch (Exception e) 180 { 181 return false; 182 } 183 if (expval != 0 || spval != 0) 184 { 185 //Common character information 186 player.sendMessage("Admin is removing you " + expval + " xp and " + spval + " sp."); 187 player.removeExpAndSp(expval, spval); 188 //Admin information 189 activeChar.sendMessage("Removed " + expval + " xp and " + spval + " sp from " + player.getName() + "."); 190 if (Config.DEBUG) 191 _log.fine("GM: " + activeChar.getName() + "(" + activeChar.getObjectId() + ") removed " + expval + " xp and " + spval + " sp from " + player.getObjectId() + "."); 192 } 175 expval = Long.parseLong(exp); 176 spval = Integer.parseInt(sp); 177 } 178 catch (Exception e) 179 { 180 return false; 181 } 182 if (expval != 0 || spval != 0) 183 { 184 //Common character information 185 player.sendMessage("Admin is removing you " + expval + " xp and " + spval + " sp."); 186 player.removeExpAndSp(expval, spval); 187 //Admin information 188 activeChar.sendMessage("Removed " + expval + " xp and " + spval + " sp from " + player.getName() + "."); 189 if (Config.DEBUG) 190 _log.fine("GM: " + activeChar.getName() + "(" + activeChar.getObjectId() + ") removed " + expval + " xp and " + spval + " sp from " + player.getObjectId() + "."); 193 191 } 194 192 return true;
Note: See TracChangeset
for help on using the changeset viewer.
