Advertisement
tensador125

L2JOrion Hide Name GM - Anti Target GM - Protect Name In Chat GM - Tag User Premium in Chat

Apr 16th, 2023 (edited)
1,050
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 71.32 KB | Gaming | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P OrionTest
  3. diff --git cfiles/game/config/main/L2jOrion.ini cfiles/game/config/main/L2jOrion.ini
  4. index eddb8e7..d7dcb40 100644
  5. --- cfiles/game/config/main/L2jOrion.ini
  6. +++ cfiles/game/config/main/L2jOrion.ini
  7. @@ -335,5 +335,25 @@
  8.  # It shows Castle's Lord clan crest in town nearby npc name
  9. ShowNpcCrest = False
  10.  
  11. +
  12. +# Protect Target Gm
  13. +# True = Enable False = Disable    
  14. +ProtectTargetAdmEnable = True
  15. +
  16. +
  17. +#=============================================================
  18. +#   Hide Name - Premium Tag Name
  19. +#=============================================================
  20. +
  21. +#ADMIN AccessLevel == 1 Name For Chats
  22. +GmNameProtect = ADMINISTRATOR
  23. +
  24. +#SUPPORT AccessLevel > 1 Name For Chats
  25. +GmSupportNameProtect = SUPPORT-GM
  26. +
  27. +#Funcion Para Agregar al nombre si es premium
  28. +PremiumAddName = {Premium}-
  29. +
  30. +
  31. TextureSkinPackageName = MAYKE_MENDES_SKIN
  32. TextureSkinSuffixName = _f
  33. \ No newline at end of file
  34. diff --git src/l2jorion/Config.java src/l2jorion/Config.java
  35. index a713d3e..f39b61a 100644
  36. --- src/l2jorion/Config.java
  37. +++ src/l2jorion/Config.java
  38. @@ -2358,6 +2358,12 @@
  39.     public static String PM_TEXT2;
  40.     public static boolean NEW_PLAYER_EFFECT;
  41.    
  42. +   public static String GM_NAME_PROTECT;
  43. +   public static String GM_SUPPORT_NAME_PROTECT;
  44. +   public static String PREMIUM_NAME_ADD;
  45. +  
  46. +   public static boolean PROTECT_TARGET_ADM_ENABLE;
  47. +  
  48.     public static String TEXTURE_SKIN_PACKAGE;
  49.    
  50.     public static String ACQUIRED_SKIN_SUFFIX;
  51. @@ -2389,6 +2395,13 @@
  52.             ACQUIRED_SKIN_SUFFIX = L2jOrionSettings.getProperty("TextureSkinSuffixName", "_f");
  53.            
  54.             FREE_TELEPORT_UNTIL = Integer.parseInt(L2jOrionSettings.getProperty("FreeTeleportUntil", "1"));
  55. +          
  56. +           GM_NAME_PROTECT = L2jOrionSettings.getProperty("GmNameProtect", "ADMINISTRATOR");
  57. +           GM_SUPPORT_NAME_PROTECT = L2jOrionSettings.getProperty("GmSupportNameProtect", "SUPPORT-STAFF");
  58. +           PREMIUM_NAME_ADD = L2jOrionSettings.getProperty("PremiumAddName", "{VIP}-");
  59. +          
  60. +           PROTECT_TARGET_ADM_ENABLE = Boolean.valueOf(L2jOrionSettings.getProperty("ProtectTargetAdmEnable", "False"));
  61. +          
  62.             REMOVAL_AUGMENTATION_FREE = Boolean.parseBoolean(L2jOrionSettings.getProperty("RemovalAugmentationFree", "False"));
  63.             ALLOW_FREIGHT_AUGMENTED = Boolean.parseBoolean(L2jOrionSettings.getProperty("AllowFreightAugmentedItem", "False"));
  64.             ANNOUNCE_BOSS_UNDER_ATTACK = Boolean.parseBoolean(L2jOrionSettings.getProperty("AnnounceBossUnderAttack", "False"));
  65. diff --git src/l2jorion/game/handler/AdminCommandHandler.java src/l2jorion/game/handler/AdminCommandHandler.java
  66. index 340c4e5..c83c797 100644
  67. --- src/l2jorion/game/handler/AdminCommandHandler.java
  68. +++ src/l2jorion/game/handler/AdminCommandHandler.java
  69. @@ -54,6 +54,7 @@
  70. import l2jorion.game.handler.admin.AdminGmChat;
  71. import l2jorion.game.handler.admin.AdminHeal;
  72. import l2jorion.game.handler.admin.AdminHelpPage;
  73. +import l2jorion.game.handler.admin.AdminHideName;
  74. import l2jorion.game.handler.admin.AdminInvul;
  75. import l2jorion.game.handler.admin.AdminKick;
  76. import l2jorion.game.handler.admin.AdminKill;
  77. @@ -182,6 +183,7 @@
  78.         registerAdminCommandHandler(new AdminTownWar());
  79.         registerAdminCommandHandler(new AdminTvTEngine());
  80.         registerAdminCommandHandler(new AdminDonator());
  81. +       registerAdminCommandHandler(new AdminHideName());
  82.         registerAdminCommandHandler(new AdminNoble());
  83.         registerAdminCommandHandler(new AdminBuffs());
  84.         registerAdminCommandHandler(new AdminCharSupervision());
  85. diff --git src/l2jorion/game/handler/admin/AdminHideName.java src/l2jorion/game/handler/admin/AdminHideName.java
  86. new file mode 100644
  87. index 0000000..3f47453
  88. --- /dev/null
  89. +++ src/l2jorion/game/handler/admin/AdminHideName.java
  90. @@ -0,0 +1,83 @@
  91. +package l2jorion.game.handler.admin;
  92. +
  93. +import l2jorion.game.handler.IAdminCommandHandler;
  94. +import l2jorion.game.model.L2World;
  95. +import l2jorion.game.model.actor.instance.L2PcInstance;
  96. +
  97. +public class AdminHideName implements IAdminCommandHandler
  98. +{
  99. +  
  100. +   private static final String[] ADMIN_COMMANDS =
  101. +   {
  102. +       "admin_hidename",
  103. +       "admin_invisname",
  104. +       "admin_visiblename",
  105. +       "admin_invisiblename",
  106. +       "admin_visname"
  107. +  
  108. +   };
  109. +  
  110. +   @Override
  111. +   public boolean useAdminCommand(String command, L2PcInstance activeChar)
  112. +   {
  113. +      
  114. +       if (command.equals("admin_hidename"))
  115. +       {
  116. +          
  117. +           activeChar.setHideNameEnabled(true);
  118. +           activeChar.decayMe();
  119. +          
  120. +           L2World.getInstance().addPlayerToWorld(activeChar);
  121. +           activeChar.broadcastUserInfo();
  122. +           activeChar.spawnMe();
  123. +          
  124. +       }
  125. +       else if (command.equals("admin_invisname"))
  126. +       {
  127. +          
  128. +           activeChar.setHideNameEnabled(true);
  129. +           activeChar.decayMe();
  130. +          
  131. +           L2World.getInstance().addPlayerToWorld(activeChar);
  132. +           activeChar.broadcastUserInfo();
  133. +           activeChar.spawnMe();
  134. +          
  135. +       }
  136. +       else if (command.equals("admin_invisiblename"))
  137. +       {
  138. +          
  139. +           activeChar.setHideNameEnabled(true);
  140. +           activeChar.decayMe();
  141. +          
  142. +           L2World.getInstance().addPlayerToWorld(activeChar);
  143. +           activeChar.broadcastUserInfo();
  144. +           activeChar.spawnMe();
  145. +          
  146. +       }
  147. +       else if (command.equals("admin_visname"))
  148. +       {
  149. +          
  150. +           activeChar.setHideNameEnabled(false);
  151. +           L2World.getInstance().addPlayerToWorld(activeChar);
  152. +           activeChar.broadcastUserInfo();
  153. +          
  154. +       }
  155. +       else if (command.equals("admin_visiblename"))
  156. +       {
  157. +          
  158. +           activeChar.setHideNameEnabled(false);
  159. +           L2World.getInstance().addPlayerToWorld(activeChar);
  160. +           activeChar.broadcastUserInfo();
  161. +          
  162. +       }
  163. +      
  164. +       return true;
  165. +      
  166. +   }
  167. +  
  168. +   @Override
  169. +   public String[] getAdminCommandList()
  170. +   {
  171. +       return ADMIN_COMMANDS;
  172. +   }
  173. +}
  174. \ No newline at end of file
  175. diff --git src/l2jorion/game/model/actor/instance/L2PcInstance.java src/l2jorion/game/model/actor/instance/L2PcInstance.java
  176. index eb7f14f..a52b38a 100644
  177. --- src/l2jorion/game/model/actor/instance/L2PcInstance.java
  178. +++ src/l2jorion/game/model/actor/instance/L2PcInstance.java
  179. @@ -5531,6 +5531,16 @@
  180.     @Override
  181.     public void onAction(L2PcInstance player)
  182.     {
  183. +      
  184. +       if (Config.PROTECT_TARGET_ADM_ENABLE)
  185. +       {
  186. +           if (isGM() && player.isGM() == false)
  187. +           {
  188. +               player.sendPacket(ActionFailed.STATIC_PACKET);
  189. +               return;
  190. +           }
  191. +       }
  192. +      
  193.         if (((TvT.is_started() || TvT.is_teleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.is_started() || CTF.is_teleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.is_started() || DM.is_teleport()) && !Config.DM_ALLOW_INTERFERENCE))
  194.         {
  195.             if ((_inEventTvT && !player._inEventTvT) || (!_inEventTvT && player._inEventTvT))
  196. @@ -5691,6 +5701,15 @@
  197.     {
  198.         L2Weapon currentWeapon = player.getActiveWeaponItem();
  199.        
  200. +       if (Config.PROTECT_TARGET_ADM_ENABLE)
  201. +       {
  202. +           if (isGM() && player.isGM() == false)
  203. +           {
  204. +               player.sendPacket(ActionFailed.STATIC_PACKET);
  205. +               return;
  206. +           }
  207. +       }
  208. +      
  209.         if (player.isGM())
  210.         {
  211.             if (this != player.getTarget())
  212. @@ -21322,6 +21341,18 @@
  213.         return _fakeArmorItemId;
  214.     }
  215.    
  216. +   private boolean _hidename = false;
  217. +  
  218. +   public boolean isHideNameEnabled()
  219. +   {
  220. +       return _hidename;
  221. +   }
  222. +  
  223. +   public void setHideNameEnabled(boolean val)
  224. +   {
  225. +       _hidename = val;
  226. +   }
  227. +  
  228.     private boolean inArenaEvent = false;
  229.    
  230.     public void setInArenaEvent(boolean val)
  231. diff --git src/l2jorion/game/network/clientpackets/Say2.java src/l2jorion/game/network/clientpackets/Say2.java
  232. index e45a1b4..d3cdabb 100644
  233. --- src/l2jorion/game/network/clientpackets/Say2.java
  234. +++ src/l2jorion/game/network/clientpackets/Say2.java
  235. @@ -48,6 +48,7 @@
  236.  
  237. public final class Say2 extends L2GameClientPacket
  238. {
  239. +  
  240.     protected static final Logger LOG = Logger.getLogger(Say2.class.getName());
  241.     private static Logger _logChat = Logger.getLogger("chat");
  242.    
  243. @@ -137,6 +138,7 @@
  244.     @Override
  245.     protected void runImpl()
  246.     {
  247. +      
  248.         if (Config.DEBUG)
  249.         {
  250.             LOG.info("Say2: Msg Type = '" + _type + "' Text = '" + _text + "'.");
  251. @@ -259,8 +261,6 @@
  252.             return;
  253.         }
  254.        
  255. -       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  256. -      
  257.         switch (_type)
  258.         {
  259.             case TELL:
  260. @@ -305,9 +305,33 @@
  261.                         activeChar.sendPacket(new SystemMessage(SystemMessageId.THE_PERSON_IS_IN_MESSAGE_REFUSAL_MODE));
  262.                         return;
  263.                     }
  264. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  265. +                   {
  266. +                       receiver.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, Config.GM_SUPPORT_NAME_PROTECT, (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  267. +                       activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, "->" + receiver.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  268. +                      
  269. +                   }
  270.                    
  271. -                   receiver.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, activeChar.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  272. -                   activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, "->" + receiver.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  273. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  274. +                   {
  275. +                       receiver.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, Config.GM_NAME_PROTECT, (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  276. +                       activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, "->" + receiver.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  277. +                      
  278. +                   }
  279. +                  
  280. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  281. +                   {
  282. +                       receiver.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, activeChar.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  283. +                       activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, "->" + receiver.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  284. +                      
  285. +                   }
  286. +                  
  287. +                   if (!activeChar.isGM())
  288. +                   {
  289. +                       receiver.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, activeChar.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  290. +                       activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, "->" + receiver.getName(), (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + _text));
  291. +                      
  292. +                   }
  293.                    
  294.                 }
  295.                 else if (BlockList.isBlocked(receiver, activeChar))
  296. @@ -327,138 +351,718 @@
  297.                
  298.                 if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on"))
  299.                 {
  300. -                   int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  301. -                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  302. +                  
  303. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  304.                     {
  305. -                       if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  306. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  307. +                       int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  308. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  309.                         {
  310. -                           if (!BlockList.isBlocked(player, activeChar))
  311. +                           if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  312.                             {
  313. -                               player.sendPacket(cs);
  314. +                               if (!BlockList.isBlocked(player, activeChar))
  315. +                               {
  316. +                                   player.sendPacket(cs);
  317. +                               }
  318.                             }
  319. +                          
  320.                         }
  321.                     }
  322. -               }
  323. -               else if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("GLOBAL"))
  324. -               {
  325. -                   // Flood protect Say
  326. -                   if (!getClient().getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
  327. -                   {
  328. -                       activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_GLOBAL_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  329. -                       return;
  330. -                   }
  331.                    
  332. -                   if (Config.GLOBAL_CHAT_WITH_PVP)
  333. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  334.                     {
  335. -                       if ((activeChar.getPvpKills() < Config.GLOBAL_PVP_AMOUNT) && !activeChar.isGM())
  336. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  337. +                       int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  338. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  339.                         {
  340. -                           activeChar.sendMessage("You must have at least " + Config.GLOBAL_PVP_AMOUNT + " pvp kills in order to speak in global chat");
  341. +                           if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  342. +                           {
  343. +                               if (!BlockList.isBlocked(player, activeChar))
  344. +                               {
  345. +                                   player.sendPacket(cs);
  346. +                               }
  347. +                           }
  348. +                          
  349. +                       }
  350. +                   }
  351. +                  
  352. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  353. +                   {
  354. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  355. +                       int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  356. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  357. +                       {
  358. +                           if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  359. +                           {
  360. +                               if (!BlockList.isBlocked(player, activeChar))
  361. +                               {
  362. +                                   player.sendPacket(cs);
  363. +                               }
  364. +                           }
  365. +                          
  366. +                       }
  367. +                   }
  368. +                  
  369. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  370. +                   {
  371. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  372. +                       int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  373. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  374. +                       {
  375. +                           if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  376. +                           {
  377. +                               if (!BlockList.isBlocked(player, activeChar))
  378. +                               {
  379. +                                   player.sendPacket(cs);
  380. +                               }
  381. +                           }
  382. +                          
  383. +                       }
  384. +                   }
  385. +                  
  386. +               }
  387. +              
  388. +               else if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("GLOBAL"))
  389. +               {
  390. +                  
  391. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  392. +                   {
  393. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  394. +                       // Flood protect Say
  395. +                       if (!getClient().getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
  396. +                       {
  397. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_GLOBAL_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  398.                             return;
  399.                         }
  400. -                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  401. +                      
  402. +                       if (Config.GLOBAL_CHAT_WITH_PVP)
  403.                         {
  404. -                           if (!BlockList.isBlocked(player, activeChar))
  405. +                           if ((activeChar.getPvpKills() < Config.GLOBAL_PVP_AMOUNT) && !activeChar.isGM())
  406.                             {
  407. -                               player.sendPacket(cs);
  408. +                               activeChar.sendMessage("You must have at least " + Config.GLOBAL_PVP_AMOUNT + " pvp kills in order to speak in global chat");
  409. +                               return;
  410. +                           }
  411. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  412. +                           {
  413. +                               if (!BlockList.isBlocked(player, activeChar))
  414. +                               {
  415. +                                   player.sendPacket(cs);
  416. +                               }
  417. +                           }
  418. +                       }
  419. +                       else
  420. +                       {
  421. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  422. +                           {
  423. +                               if (!BlockList.isBlocked(player, activeChar))
  424. +                               {
  425. +                                   player.sendPacket(cs);
  426. +                               }
  427.                             }
  428.                         }
  429.                     }
  430. -                   else
  431. +                  
  432. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  433.                     {
  434. -                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  435. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  436. +                       // Flood protect Say
  437. +                       if (!getClient().getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
  438.                         {
  439. -                           if (!BlockList.isBlocked(player, activeChar))
  440. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_GLOBAL_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  441. +                           return;
  442. +                       }
  443. +                      
  444. +                       if (Config.GLOBAL_CHAT_WITH_PVP)
  445. +                       {
  446. +                           if ((activeChar.getPvpKills() < Config.GLOBAL_PVP_AMOUNT) && !activeChar.isGM())
  447.                             {
  448. -                               player.sendPacket(cs);
  449. +                               activeChar.sendMessage("You must have at least " + Config.GLOBAL_PVP_AMOUNT + " pvp kills in order to speak in global chat");
  450. +                               return;
  451. +                           }
  452. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  453. +                           {
  454. +                               if (!BlockList.isBlocked(player, activeChar))
  455. +                               {
  456. +                                   player.sendPacket(cs);
  457. +                               }
  458. +                           }
  459. +                       }
  460. +                       else
  461. +                       {
  462. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  463. +                           {
  464. +                               if (!BlockList.isBlocked(player, activeChar))
  465. +                               {
  466. +                                   player.sendPacket(cs);
  467. +                               }
  468.                             }
  469.                         }
  470.                     }
  471. +                  
  472. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  473. +                   {
  474. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  475. +                       // Flood protect Say
  476. +                       if (!getClient().getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
  477. +                       {
  478. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_GLOBAL_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  479. +                           return;
  480. +                       }
  481. +                      
  482. +                       if (Config.GLOBAL_CHAT_WITH_PVP)
  483. +                       {
  484. +                           if ((activeChar.getPvpKills() < Config.GLOBAL_PVP_AMOUNT) && !activeChar.isGM())
  485. +                           {
  486. +                               activeChar.sendMessage("You must have at least " + Config.GLOBAL_PVP_AMOUNT + " pvp kills in order to speak in global chat");
  487. +                               return;
  488. +                           }
  489. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  490. +                           {
  491. +                               if (!BlockList.isBlocked(player, activeChar))
  492. +                               {
  493. +                                   player.sendPacket(cs);
  494. +                               }
  495. +                           }
  496. +                       }
  497. +                       else
  498. +                       {
  499. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  500. +                           {
  501. +                               if (!BlockList.isBlocked(player, activeChar))
  502. +                               {
  503. +                                   player.sendPacket(cs);
  504. +                               }
  505. +                           }
  506. +                       }
  507. +                   }
  508. +                  
  509. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  510. +                   {
  511. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  512. +                       // Flood protect Say
  513. +                       if (!getClient().getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
  514. +                       {
  515. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_GLOBAL_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  516. +                           return;
  517. +                       }
  518. +                      
  519. +                       if (Config.GLOBAL_CHAT_WITH_PVP)
  520. +                       {
  521. +                           if ((activeChar.getPvpKills() < Config.GLOBAL_PVP_AMOUNT) && !activeChar.isGM())
  522. +                           {
  523. +                               activeChar.sendMessage("You must have at least " + Config.GLOBAL_PVP_AMOUNT + " pvp kills in order to speak in global chat");
  524. +                               return;
  525. +                           }
  526. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  527. +                           {
  528. +                               if (!BlockList.isBlocked(player, activeChar))
  529. +                               {
  530. +                                   player.sendPacket(cs);
  531. +                               }
  532. +                           }
  533. +                       }
  534. +                       else
  535. +                       {
  536. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  537. +                           {
  538. +                               if (!BlockList.isBlocked(player, activeChar))
  539. +                               {
  540. +                                   player.sendPacket(cs);
  541. +                               }
  542. +                           }
  543. +                       }
  544. +                   }
  545. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  546. +                   {
  547. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  548. +                       // Flood protect Say
  549. +                       if (!getClient().getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
  550. +                       {
  551. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_GLOBAL_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  552. +                           return;
  553. +                       }
  554. +                      
  555. +                       if (Config.GLOBAL_CHAT_WITH_PVP)
  556. +                       {
  557. +                           if ((activeChar.getPvpKills() < Config.GLOBAL_PVP_AMOUNT) && !activeChar.isGM())
  558. +                           {
  559. +                               activeChar.sendMessage("You must have at least " + Config.GLOBAL_PVP_AMOUNT + " pvp kills in order to speak in global chat");
  560. +                               return;
  561. +                           }
  562. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  563. +                           {
  564. +                               if (!BlockList.isBlocked(player, activeChar))
  565. +                               {
  566. +                                   player.sendPacket(cs);
  567. +                               }
  568. +                           }
  569. +                       }
  570. +                       else
  571. +                       {
  572. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  573. +                           {
  574. +                               if (!BlockList.isBlocked(player, activeChar))
  575. +                               {
  576. +                                   player.sendPacket(cs);
  577. +                               }
  578. +                           }
  579. +                       }
  580. +                   }
  581. +                  
  582.                 }
  583.                 break;
  584.             case TRADE:
  585. +              
  586.                 if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("ON"))
  587.                 {
  588. -                   if (!getClient().getFloodProtectors().getTradeChat().tryPerformAction("trade chat"))
  589. -                   {
  590. -                       activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_TRADE_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  591. -                       return;
  592. -                   }
  593.                    
  594. -                   if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  595. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  596.                     {
  597. -                       activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  598. -                       return;
  599. -                   }
  600. -                  
  601. -                   if (Config.TRADE_CHAT_WITH_PVP)
  602. -                   {
  603. -                       if ((activeChar.getPvpKills() <= Config.TRADE_PVP_AMOUNT) && !activeChar.isGM())
  604. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  605. +                       if (!getClient().getFloodProtectors().getTradeChat().tryPerformAction("trade chat"))
  606.                         {
  607. -                           activeChar.sendMessage("You must have at least " + Config.TRADE_PVP_AMOUNT + "  pvp kills in order to speak in trade chat");
  608. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_TRADE_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  609.                             return;
  610.                         }
  611. -                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  612. +                      
  613. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  614.                         {
  615. -                           if (!BlockList.isBlocked(player, activeChar))
  616. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  617. +                           return;
  618. +                       }
  619. +                      
  620. +                       if (Config.TRADE_CHAT_WITH_PVP)
  621. +                       {
  622. +                           if ((activeChar.getPvpKills() <= Config.TRADE_PVP_AMOUNT) && !activeChar.isGM())
  623.                             {
  624. -                               player.sendPacket(cs);
  625. +                               activeChar.sendMessage("You must have at least " + Config.TRADE_PVP_AMOUNT + "  pvp kills in order to speak in trade chat");
  626. +                               return;
  627. +                           }
  628. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  629. +                           {
  630. +                               if (!BlockList.isBlocked(player, activeChar))
  631. +                               {
  632. +                                   player.sendPacket(cs);
  633. +                               }
  634. +                           }
  635. +                       }
  636. +                       else
  637. +                       {
  638. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  639. +                           {
  640. +                               if (!BlockList.isBlocked(player, activeChar))
  641. +                               {
  642. +                                   player.sendPacket(cs);
  643. +                               }
  644.                             }
  645.                         }
  646.                     }
  647. -                   else
  648. +                  
  649. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  650.                     {
  651. -                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  652. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  653. +                       if (!getClient().getFloodProtectors().getTradeChat().tryPerformAction("trade chat"))
  654.                         {
  655. -                           if (!BlockList.isBlocked(player, activeChar))
  656. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_TRADE_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  657. +                           return;
  658. +                       }
  659. +                      
  660. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  661. +                       {
  662. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  663. +                           return;
  664. +                       }
  665. +                      
  666. +                       if (Config.TRADE_CHAT_WITH_PVP)
  667. +                       {
  668. +                           if ((activeChar.getPvpKills() <= Config.TRADE_PVP_AMOUNT) && !activeChar.isGM())
  669.                             {
  670. -                               player.sendPacket(cs);
  671. +                               activeChar.sendMessage("You must have at least " + Config.TRADE_PVP_AMOUNT + "  pvp kills in order to speak in trade chat");
  672. +                               return;
  673. +                           }
  674. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  675. +                           {
  676. +                               if (!BlockList.isBlocked(player, activeChar))
  677. +                               {
  678. +                                   player.sendPacket(cs);
  679. +                               }
  680. +                           }
  681. +                       }
  682. +                       else
  683. +                       {
  684. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  685. +                           {
  686. +                               if (!BlockList.isBlocked(player, activeChar))
  687. +                               {
  688. +                                   player.sendPacket(cs);
  689. +                               }
  690.                             }
  691.                         }
  692.                     }
  693. +                  
  694. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  695. +                   {
  696. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  697. +                       if (!getClient().getFloodProtectors().getTradeChat().tryPerformAction("trade chat"))
  698. +                       {
  699. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_TRADE_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  700. +                           return;
  701. +                       }
  702. +                      
  703. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  704. +                       {
  705. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  706. +                           return;
  707. +                       }
  708. +                      
  709. +                       if (Config.TRADE_CHAT_WITH_PVP)
  710. +                       {
  711. +                           if ((activeChar.getPvpKills() <= Config.TRADE_PVP_AMOUNT) && !activeChar.isGM())
  712. +                           {
  713. +                               activeChar.sendMessage("You must have at least " + Config.TRADE_PVP_AMOUNT + "  pvp kills in order to speak in trade chat");
  714. +                               return;
  715. +                           }
  716. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  717. +                           {
  718. +                               if (!BlockList.isBlocked(player, activeChar))
  719. +                               {
  720. +                                   player.sendPacket(cs);
  721. +                               }
  722. +                           }
  723. +                       }
  724. +                       else
  725. +                       {
  726. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  727. +                           {
  728. +                               if (!BlockList.isBlocked(player, activeChar))
  729. +                               {
  730. +                                   player.sendPacket(cs);
  731. +                               }
  732. +                           }
  733. +                       }
  734. +                   }
  735. +                  
  736. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  737. +                   {
  738. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  739. +                       if (!getClient().getFloodProtectors().getTradeChat().tryPerformAction("trade chat"))
  740. +                       {
  741. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_TRADE_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  742. +                           return;
  743. +                       }
  744. +                      
  745. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  746. +                       {
  747. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  748. +                           return;
  749. +                       }
  750. +                      
  751. +                       if (Config.TRADE_CHAT_WITH_PVP)
  752. +                       {
  753. +                           if ((activeChar.getPvpKills() <= Config.TRADE_PVP_AMOUNT) && !activeChar.isGM())
  754. +                           {
  755. +                               activeChar.sendMessage("You must have at least " + Config.TRADE_PVP_AMOUNT + "  pvp kills in order to speak in trade chat");
  756. +                               return;
  757. +                           }
  758. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  759. +                           {
  760. +                               if (!BlockList.isBlocked(player, activeChar))
  761. +                               {
  762. +                                   player.sendPacket(cs);
  763. +                               }
  764. +                           }
  765. +                       }
  766. +                       else
  767. +                       {
  768. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  769. +                           {
  770. +                               if (!BlockList.isBlocked(player, activeChar))
  771. +                               {
  772. +                                   player.sendPacket(cs);
  773. +                               }
  774. +                           }
  775. +                       }
  776. +                   }
  777. +                  
  778. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  779. +                   {
  780. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  781. +                       if (!getClient().getFloodProtectors().getTradeChat().tryPerformAction("trade chat"))
  782. +                       {
  783. +                           activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_TRADE_CHAT.FLOOD_PROTECTION_INTERVAL / 10 + " sec");
  784. +                           return;
  785. +                       }
  786. +                      
  787. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  788. +                       {
  789. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  790. +                           return;
  791. +                       }
  792. +                      
  793. +                       if (Config.TRADE_CHAT_WITH_PVP)
  794. +                       {
  795. +                           if ((activeChar.getPvpKills() <= Config.TRADE_PVP_AMOUNT) && !activeChar.isGM())
  796. +                           {
  797. +                               activeChar.sendMessage("You must have at least " + Config.TRADE_PVP_AMOUNT + "  pvp kills in order to speak in trade chat");
  798. +                               return;
  799. +                           }
  800. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  801. +                           {
  802. +                               if (!BlockList.isBlocked(player, activeChar))
  803. +                               {
  804. +                                   player.sendPacket(cs);
  805. +                               }
  806. +                           }
  807. +                       }
  808. +                       else
  809. +                       {
  810. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  811. +                           {
  812. +                               if (!BlockList.isBlocked(player, activeChar))
  813. +                               {
  814. +                                   player.sendPacket(cs);
  815. +                               }
  816. +                           }
  817. +                       }
  818. +                   }
  819. +                  
  820.                 }
  821.                 else if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("limited"))
  822.                 {
  823. -                   if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  824. -                   {
  825. -                       activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  826. -                       return;
  827. -                   }
  828.                    
  829. -                   if (Config.TRADE_CHAT_IS_NOBLE)
  830. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  831.                     {
  832. -                       if (!activeChar.isNoble() && !activeChar.isGM())
  833. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  834. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  835.                         {
  836. -                           activeChar.sendMessage("Only nobles players can use this chat");
  837. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  838.                             return;
  839.                         }
  840.                        
  841. -                       int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  842. -                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  843. +                       if (Config.TRADE_CHAT_IS_NOBLE)
  844.                         {
  845. -                           if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  846. +                           if (!activeChar.isNoble() && !activeChar.isGM())
  847.                             {
  848. -                               if (!BlockList.isBlocked(player, activeChar))
  849. +                               activeChar.sendMessage("Only nobles players can use this chat");
  850. +                               return;
  851. +                           }
  852. +                          
  853. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  854. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  855. +                           {
  856. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  857.                                 {
  858. -                                   player.sendPacket(cs);
  859. +                                   if (!BlockList.isBlocked(player, activeChar))
  860. +                                   {
  861. +                                       player.sendPacket(cs);
  862. +                                   }
  863.                                 }
  864.                             }
  865. +                          
  866.                         }
  867. -                      
  868. +                       else
  869. +                       {
  870. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  871. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  872. +                           {
  873. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  874. +                               {
  875. +                                   if (!BlockList.isBlocked(player, activeChar))
  876. +                                   {
  877. +                                       player.sendPacket(cs);
  878. +                                   }
  879. +                               }
  880. +                           }
  881. +                          
  882. +                       }
  883.                     }
  884. -                   else
  885. +                  
  886. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  887.                     {
  888. -                       int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  889. -                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  890. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  891. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  892.                         {
  893. -                           if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  894. -                           {
  895. -                               if (!BlockList.isBlocked(player, activeChar))
  896. -                               {
  897. -                                   player.sendPacket(cs);
  898. -                               }
  899. -                           }
  900. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  901. +                           return;
  902.                         }
  903.                        
  904. +                       if (Config.TRADE_CHAT_IS_NOBLE)
  905. +                       {
  906. +                           if (!activeChar.isNoble() && !activeChar.isGM())
  907. +                           {
  908. +                               activeChar.sendMessage("Only nobles players can use this chat");
  909. +                               return;
  910. +                           }
  911. +                          
  912. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  913. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  914. +                           {
  915. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  916. +                               {
  917. +                                   if (!BlockList.isBlocked(player, activeChar))
  918. +                                   {
  919. +                                       player.sendPacket(cs);
  920. +                                   }
  921. +                               }
  922. +                           }
  923. +                          
  924. +                       }
  925. +                       else
  926. +                       {
  927. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  928. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  929. +                           {
  930. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  931. +                               {
  932. +                                   if (!BlockList.isBlocked(player, activeChar))
  933. +                                   {
  934. +                                       player.sendPacket(cs);
  935. +                                   }
  936. +                               }
  937. +                           }
  938. +                          
  939. +                       }
  940. +                   }
  941. +                  
  942. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  943. +                   {
  944. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  945. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  946. +                       {
  947. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  948. +                           return;
  949. +                       }
  950. +                      
  951. +                       if (Config.TRADE_CHAT_IS_NOBLE)
  952. +                       {
  953. +                           if (!activeChar.isNoble() && !activeChar.isGM())
  954. +                           {
  955. +                               activeChar.sendMessage("Only nobles players can use this chat");
  956. +                               return;
  957. +                           }
  958. +                          
  959. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  960. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  961. +                           {
  962. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  963. +                               {
  964. +                                   if (!BlockList.isBlocked(player, activeChar))
  965. +                                   {
  966. +                                       player.sendPacket(cs);
  967. +                                   }
  968. +                               }
  969. +                           }
  970. +                          
  971. +                       }
  972. +                       else
  973. +                       {
  974. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  975. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  976. +                           {
  977. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  978. +                               {
  979. +                                   if (!BlockList.isBlocked(player, activeChar))
  980. +                                   {
  981. +                                       player.sendPacket(cs);
  982. +                                   }
  983. +                               }
  984. +                           }
  985. +                          
  986. +                       }
  987. +                   }
  988. +                  
  989. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  990. +                   {
  991. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  992. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  993. +                       {
  994. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  995. +                           return;
  996. +                       }
  997. +                      
  998. +                       if (Config.TRADE_CHAT_IS_NOBLE)
  999. +                       {
  1000. +                           if (!activeChar.isNoble() && !activeChar.isGM())
  1001. +                           {
  1002. +                               activeChar.sendMessage("Only nobles players can use this chat");
  1003. +                               return;
  1004. +                           }
  1005. +                          
  1006. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  1007. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1008. +                           {
  1009. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  1010. +                               {
  1011. +                                   if (!BlockList.isBlocked(player, activeChar))
  1012. +                                   {
  1013. +                                       player.sendPacket(cs);
  1014. +                                   }
  1015. +                               }
  1016. +                           }
  1017. +                          
  1018. +                       }
  1019. +                       else
  1020. +                       {
  1021. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  1022. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1023. +                           {
  1024. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  1025. +                               {
  1026. +                                   if (!BlockList.isBlocked(player, activeChar))
  1027. +                                   {
  1028. +                                       player.sendPacket(cs);
  1029. +                                   }
  1030. +                               }
  1031. +                           }
  1032. +                          
  1033. +                       }
  1034. +                   }
  1035. +                  
  1036. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1037. +                   {
  1038. +                       CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1039. +                       if (activeChar.getLevel() <= (Config.MIN_LEVEL_FOR_CHAT - 1))
  1040. +                       {
  1041. +                           activeChar.sendMessage("Your level is too low for TRADE chat. Min.: " + Config.MIN_LEVEL_FOR_CHAT);
  1042. +                           return;
  1043. +                       }
  1044. +                      
  1045. +                       if (Config.TRADE_CHAT_IS_NOBLE)
  1046. +                       {
  1047. +                           if (!activeChar.isNoble() && !activeChar.isGM())
  1048. +                           {
  1049. +                               activeChar.sendMessage("Only nobles players can use this chat");
  1050. +                               return;
  1051. +                           }
  1052. +                          
  1053. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  1054. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1055. +                           {
  1056. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  1057. +                               {
  1058. +                                   if (!BlockList.isBlocked(player, activeChar))
  1059. +                                   {
  1060. +                                       player.sendPacket(cs);
  1061. +                                   }
  1062. +                               }
  1063. +                           }
  1064. +                          
  1065. +                       }
  1066. +                       else
  1067. +                       {
  1068. +                           int region = MapRegionTable.getInstance().getMapRegionLocId(activeChar.getX(), activeChar.getY());
  1069. +                           for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1070. +                           {
  1071. +                               if (region == MapRegionTable.getInstance().getMapRegionLocId(player.getX(), player.getY()))
  1072. +                               {
  1073. +                                   if (!BlockList.isBlocked(player, activeChar))
  1074. +                                   {
  1075. +                                       player.sendPacket(cs);
  1076. +                                   }
  1077. +                               }
  1078. +                           }
  1079. +                          
  1080. +                       }
  1081.                     }
  1082.                    
  1083.                 }
  1084. @@ -469,16 +1073,75 @@
  1085.                     String text = _text;
  1086.                     String reformatedText = (text).substring(1);
  1087.                    
  1088. -                   CreatureSay pcs = new CreatureSay(activeChar.getObjectId(), SHOUT, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), reformatedText);
  1089. -                  
  1090. -                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1091. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1092.                     {
  1093. -                       if (!BlockList.isBlocked(player, activeChar))
  1094. +                       CreatureSay pcs = new CreatureSay(activeChar.getObjectId(), SHOUT, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, reformatedText);
  1095. +                      
  1096. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1097.                         {
  1098. -                           player.sendPacket(pcs);
  1099. +                           if (!BlockList.isBlocked(player, activeChar))
  1100. +                           {
  1101. +                               player.sendPacket(pcs);
  1102. +                           }
  1103.                         }
  1104. +                       break;
  1105.                     }
  1106. -                   break;
  1107. +                  
  1108. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1109. +                   {
  1110. +                       CreatureSay pcs = new CreatureSay(activeChar.getObjectId(), SHOUT, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, reformatedText);
  1111. +                      
  1112. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1113. +                       {
  1114. +                           if (!BlockList.isBlocked(player, activeChar))
  1115. +                           {
  1116. +                               player.sendPacket(pcs);
  1117. +                           }
  1118. +                       }
  1119. +                       break;
  1120. +                   }
  1121. +                  
  1122. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1123. +                   {
  1124. +                       CreatureSay pcs = new CreatureSay(activeChar.getObjectId(), SHOUT, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), reformatedText);
  1125. +                      
  1126. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1127. +                       {
  1128. +                           if (!BlockList.isBlocked(player, activeChar))
  1129. +                           {
  1130. +                               player.sendPacket(pcs);
  1131. +                           }
  1132. +                       }
  1133. +                       break;
  1134. +                   }
  1135. +                  
  1136. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1137. +                   {
  1138. +                       CreatureSay pcs = new CreatureSay(activeChar.getObjectId(), SHOUT, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), reformatedText);
  1139. +                      
  1140. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1141. +                       {
  1142. +                           if (!BlockList.isBlocked(player, activeChar))
  1143. +                           {
  1144. +                               player.sendPacket(pcs);
  1145. +                           }
  1146. +                       }
  1147. +                       break;
  1148. +                   }
  1149. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1150. +                   {
  1151. +                       CreatureSay pcs = new CreatureSay(activeChar.getObjectId(), SHOUT, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), reformatedText);
  1152. +                      
  1153. +                       for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1154. +                       {
  1155. +                           if (!BlockList.isBlocked(player, activeChar))
  1156. +                           {
  1157. +                               player.sendPacket(pcs);
  1158. +                           }
  1159. +                       }
  1160. +                       break;
  1161. +                   }
  1162. +                  
  1163.                 }
  1164.                
  1165.                 if (_text.startsWith("."))
  1166. @@ -507,35 +1170,188 @@
  1167.                     }
  1168.                 }
  1169.                
  1170. -               for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
  1171. +               if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1172.                 {
  1173. -                   if (player != null && activeChar.isInsideRadius(player, 1250, false, true))
  1174. +                   CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1175. +                   for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
  1176.                     {
  1177. -                       if (!BlockList.isBlocked(player, activeChar))
  1178. +                       if (player != null && activeChar.isInsideRadius(player, 1250, false, true))
  1179.                         {
  1180. -                           player.sendPacket(cs);
  1181. +                           if (!BlockList.isBlocked(player, activeChar))
  1182. +                           {
  1183. +                               player.sendPacket(cs);
  1184. +                           }
  1185.                         }
  1186.                     }
  1187. +                   activeChar.sendPacket(cs);
  1188.                 }
  1189. -               activeChar.sendPacket(cs);
  1190. +               if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1191. +               {
  1192. +                   CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1193. +                   for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
  1194. +                   {
  1195. +                       if (player != null && activeChar.isInsideRadius(player, 1250, false, true))
  1196. +                       {
  1197. +                           if (!BlockList.isBlocked(player, activeChar))
  1198. +                           {
  1199. +                               player.sendPacket(cs);
  1200. +                           }
  1201. +                       }
  1202. +                   }
  1203. +                   activeChar.sendPacket(cs);
  1204. +               }
  1205. +              
  1206. +               if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1207. +               {
  1208. +                   CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1209. +                   for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
  1210. +                   {
  1211. +                       if (player != null && activeChar.isInsideRadius(player, 1250, false, true))
  1212. +                       {
  1213. +                           if (!BlockList.isBlocked(player, activeChar))
  1214. +                           {
  1215. +                               player.sendPacket(cs);
  1216. +                           }
  1217. +                       }
  1218. +                   }
  1219. +                   activeChar.sendPacket(cs);
  1220. +               }
  1221. +              
  1222. +               if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1223. +               {
  1224. +                   CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1225. +                   for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
  1226. +                   {
  1227. +                       if (player != null && activeChar.isInsideRadius(player, 1250, false, true))
  1228. +                       {
  1229. +                           if (!BlockList.isBlocked(player, activeChar))
  1230. +                           {
  1231. +                               player.sendPacket(cs);
  1232. +                           }
  1233. +                       }
  1234. +                   }
  1235. +                   activeChar.sendPacket(cs);
  1236. +               }
  1237. +              
  1238. +               if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1239. +               {
  1240. +                   CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1241. +                   for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
  1242. +                   {
  1243. +                       if (player != null && activeChar.isInsideRadius(player, 1250, false, true))
  1244. +                       {
  1245. +                           if (!BlockList.isBlocked(player, activeChar))
  1246. +                           {
  1247. +                               player.sendPacket(cs);
  1248. +                           }
  1249. +                       }
  1250. +                   }
  1251. +                   activeChar.sendPacket(cs);
  1252. +               }
  1253.                
  1254.                 break;
  1255.             case CLAN:
  1256.                 if (activeChar.getClan() != null)
  1257.                 {
  1258. -                   activeChar.getClan().broadcastToOnlineMembers(cs);
  1259. +                  
  1260. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1261. +                   {
  1262. +                       CreatureSay clan = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1263. +                       activeChar.getClan().broadcastToOnlineMembers(clan);
  1264. +                   }
  1265. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1266. +                   {
  1267. +                       CreatureSay clan = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1268. +                       activeChar.getClan().broadcastToOnlineMembers(clan);
  1269. +                   }
  1270. +                  
  1271. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1272. +                   {
  1273. +                       CreatureSay clan = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1274. +                       activeChar.getClan().broadcastToOnlineMembers(clan);
  1275. +                   }
  1276. +                  
  1277. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1278. +                   {
  1279. +                       CreatureSay clan = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1280. +                       activeChar.getClan().broadcastToOnlineMembers(clan);
  1281. +                   }
  1282. +                  
  1283. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1284. +                   {
  1285. +                       CreatureSay clan = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1286. +                       activeChar.getClan().broadcastToOnlineMembers(clan);
  1287. +                   }
  1288. +                  
  1289.                 }
  1290.                 break;
  1291.             case ALLIANCE:
  1292.                 if (activeChar.getClan() != null)
  1293.                 {
  1294. -                   activeChar.getClan().broadcastToOnlineAllyMembers(cs);
  1295. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1296. +                   {
  1297. +                       CreatureSay ally = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1298. +                       activeChar.getClan().broadcastToOnlineAllyMembers(ally);
  1299. +                   }
  1300. +                  
  1301. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1302. +                   {
  1303. +                       CreatureSay ally = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1304. +                       activeChar.getClan().broadcastToOnlineAllyMembers(ally);
  1305. +                   }
  1306. +                  
  1307. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1308. +                   {
  1309. +                       CreatureSay ally = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1310. +                       activeChar.getClan().broadcastToOnlineAllyMembers(ally);
  1311. +                   }
  1312. +                  
  1313. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1314. +                   {
  1315. +                       CreatureSay ally = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1316. +                       activeChar.getClan().broadcastToOnlineAllyMembers(ally);
  1317. +                   }
  1318. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1319. +                   {
  1320. +                       CreatureSay ally = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1321. +                       activeChar.getClan().broadcastToOnlineAllyMembers(ally);
  1322. +                   }
  1323. +                  
  1324.                 }
  1325.                 break;
  1326.             case PARTY:
  1327.                 if (activeChar.isInParty())
  1328.                 {
  1329. -                   activeChar.getParty().broadcastToPartyMembers(cs);
  1330. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1331. +                   {
  1332. +                       CreatureSay party = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1333. +                       activeChar.getParty().broadcastToPartyMembers(party);
  1334. +                   }
  1335. +                  
  1336. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1337. +                   {
  1338. +                       CreatureSay party = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1339. +                       activeChar.getParty().broadcastToPartyMembers(party);
  1340. +                   }
  1341. +                  
  1342. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1343. +                   {
  1344. +                       CreatureSay party = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1345. +                       activeChar.getParty().broadcastToPartyMembers(party);
  1346. +                   }
  1347. +                  
  1348. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1349. +                   {
  1350. +                       CreatureSay party = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1351. +                       activeChar.getParty().broadcastToPartyMembers(party);
  1352. +                   }
  1353. +                  
  1354. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1355. +                   {
  1356. +                       CreatureSay party = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1357. +                       activeChar.getParty().broadcastToPartyMembers(party);
  1358. +                   }
  1359. +                  
  1360.                 }
  1361.                 break;
  1362.             case PETITION_PLAYER:
  1363. @@ -551,49 +1367,181 @@
  1364.             case PARTYMATCH_ROOM: // 14
  1365.                 if (activeChar.isInPartyMatchRoom())
  1366.                 {
  1367. -                   PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar);
  1368. -                   if (_room != null)
  1369. +                  
  1370. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1371.                     {
  1372. -                       for (L2PcInstance _member : _room.getPartyMembers())
  1373. +                       CreatureSay partyroom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1374. +                       PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar);
  1375. +                       if (_room != null)
  1376.                         {
  1377. -                           _member.sendPacket(cs);
  1378. +                           for (L2PcInstance _member : _room.getPartyMembers())
  1379. +                           {
  1380. +                               _member.sendPacket(partyroom);
  1381. +                           }
  1382.                         }
  1383.                     }
  1384. +                  
  1385. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1386. +                   {
  1387. +                       CreatureSay partyroom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1388. +                       PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar);
  1389. +                       if (_room != null)
  1390. +                       {
  1391. +                           for (L2PcInstance _member : _room.getPartyMembers())
  1392. +                           {
  1393. +                               _member.sendPacket(partyroom);
  1394. +                           }
  1395. +                       }
  1396. +                   }
  1397. +                  
  1398. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1399. +                   {
  1400. +                       CreatureSay partyroom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1401. +                       PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar);
  1402. +                       if (_room != null)
  1403. +                       {
  1404. +                           for (L2PcInstance _member : _room.getPartyMembers())
  1405. +                           {
  1406. +                               _member.sendPacket(partyroom);
  1407. +                           }
  1408. +                       }
  1409. +                   }
  1410. +                  
  1411. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1412. +                   {
  1413. +                       CreatureSay partyroom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1414. +                       PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar);
  1415. +                       if (_room != null)
  1416. +                       {
  1417. +                           for (L2PcInstance _member : _room.getPartyMembers())
  1418. +                           {
  1419. +                               _member.sendPacket(partyroom);
  1420. +                           }
  1421. +                       }
  1422. +                   }
  1423. +                  
  1424. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1425. +                   {
  1426. +                       CreatureSay partyroom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1427. +                       PartyMatchRoom _room = PartyMatchRoomList.getInstance().getPlayerRoom(activeChar);
  1428. +                       if (_room != null)
  1429. +                       {
  1430. +                           for (L2PcInstance _member : _room.getPartyMembers())
  1431. +                           {
  1432. +                               _member.sendPacket(partyroom);
  1433. +                           }
  1434. +                       }
  1435. +                   }
  1436. +                  
  1437.                 }
  1438.                 break;
  1439.             case PARTYROOM_COMMANDER: // 15
  1440.                 if (activeChar.isInParty())
  1441.                 {
  1442. -                   if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getChannelLeader().equals(activeChar))
  1443. +                  
  1444. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1445.                     {
  1446. -                       activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(cs, activeChar);
  1447. +                       CreatureSay partyroomcom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1448. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getChannelLeader().equals(activeChar))
  1449. +                       {
  1450. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomcom, activeChar);
  1451. +                       }
  1452.                     }
  1453. +                  
  1454. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1455. +                   {
  1456. +                       CreatureSay partyroomcom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1457. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getChannelLeader().equals(activeChar))
  1458. +                       {
  1459. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomcom, activeChar);
  1460. +                       }
  1461. +                   }
  1462. +                  
  1463. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1464. +                   {
  1465. +                       CreatureSay partyroomcom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1466. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getChannelLeader().equals(activeChar))
  1467. +                       {
  1468. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomcom, activeChar);
  1469. +                       }
  1470. +                   }
  1471. +                  
  1472. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1473. +                   {
  1474. +                       CreatureSay partyroomcom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1475. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getChannelLeader().equals(activeChar))
  1476. +                       {
  1477. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomcom, activeChar);
  1478. +                       }
  1479. +                   }
  1480. +                  
  1481. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1482. +                   {
  1483. +                       CreatureSay partyroomcom = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1484. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getChannelLeader().equals(activeChar))
  1485. +                       {
  1486. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomcom, activeChar);
  1487. +                       }
  1488. +                   }
  1489. +                  
  1490.                 }
  1491.                 break;
  1492.             case PARTYROOM_ALL: // 16
  1493.                 if (activeChar.isInParty())
  1494.                 {
  1495. -                   if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().isLeader(activeChar))
  1496. +                  
  1497. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1498.                     {
  1499. -                       activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(cs, activeChar);
  1500. +                       CreatureSay partyroomall = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1501. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().isLeader(activeChar))
  1502. +                       {
  1503. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomall, activeChar);
  1504. +                       }
  1505.                     }
  1506. +                  
  1507. +                   if (activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1508. +                   {
  1509. +                       CreatureSay partyroomall = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1510. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().isLeader(activeChar))
  1511. +                       {
  1512. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomall, activeChar);
  1513. +                       }
  1514. +                   }
  1515. +                  
  1516. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 1)
  1517. +                   {
  1518. +                       CreatureSay partyroomall = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1519. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().isLeader(activeChar))
  1520. +                       {
  1521. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomall, activeChar);
  1522. +                       }
  1523. +                   }
  1524. +                  
  1525. +                   if (!activeChar.isGM() && activeChar.getPremiumService() == 0)
  1526. +                   {
  1527. +                       CreatureSay partyroomall = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1528. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().isLeader(activeChar))
  1529. +                       {
  1530. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomall, activeChar);
  1531. +                       }
  1532. +                   }
  1533. +                  
  1534. +                   if (activeChar.isGM() && !activeChar.isHideNameEnabled())
  1535. +                   {
  1536. +                       CreatureSay partyroomall = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1537. +                       if (activeChar.getParty().isInCommandChannel() && activeChar.getParty().isLeader(activeChar))
  1538. +                       {
  1539. +                           activeChar.getParty().getCommandChannel().broadcastCSToChannelMembers(partyroomall, activeChar);
  1540. +                       }
  1541. +                   }
  1542. +                  
  1543.                 }
  1544.                 break;
  1545.             case HERO_VOICE:
  1546. -               if (activeChar.isGM())
  1547. +              
  1548. +               if (activeChar.isHero() && !activeChar.isGM() && activeChar.getPremiumService() == 1)
  1549.                 {
  1550. -                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1551. -                   {
  1552. -                       if (player == null)
  1553. -                       {
  1554. -                           continue;
  1555. -                       }
  1556. -                      
  1557. -                       player.sendPacket(cs);
  1558. -                   }
  1559. -               }
  1560. -               else if (activeChar.isHero())
  1561. -               {
  1562. +                   CreatureSay Hero = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.PREMIUM_NAME_ADD + activeChar.getName(), _text);
  1563.                     if (!getClient().getFloodProtectors().getHeroVoice().tryPerformAction("hero voice"))
  1564.                     {
  1565.                         activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_HERO_VOICE.FLOOD_PROTECTION_INTERVAL / 10 + " sec.");
  1566. @@ -609,10 +1557,103 @@
  1567.                        
  1568.                         if (!BlockList.isBlocked(player, activeChar))
  1569.                         {
  1570. -                           player.sendPacket(cs);
  1571. +                           player.sendPacket(Hero);
  1572.                         }
  1573.                     }
  1574.                 }
  1575. +              
  1576. +               else if (activeChar.isHero() && !activeChar.isGM() && activeChar.getPremiumService() == 0)
  1577. +               {
  1578. +                   CreatureSay Hero = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1579. +                   if (!getClient().getFloodProtectors().getHeroVoice().tryPerformAction("hero voice"))
  1580. +                   {
  1581. +                       activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_HERO_VOICE.FLOOD_PROTECTION_INTERVAL / 10 + " sec.");
  1582. +                       return;
  1583. +                   }
  1584. +                  
  1585. +                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1586. +                   {
  1587. +                       if (player == null)
  1588. +                       {
  1589. +                           continue;
  1590. +                       }
  1591. +                      
  1592. +                       if (!BlockList.isBlocked(player, activeChar))
  1593. +                       {
  1594. +                           player.sendPacket(Hero);
  1595. +                       }
  1596. +                   }
  1597. +               }
  1598. +              
  1599. +               else if (activeChar.isHero() && activeChar.isGM() && !activeChar.isHideNameEnabled())
  1600. +               {
  1601. +                   CreatureSay Hero = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + activeChar.getName(), _text);
  1602. +                   if (!getClient().getFloodProtectors().getHeroVoice().tryPerformAction("hero voice"))
  1603. +                   {
  1604. +                       activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_HERO_VOICE.FLOOD_PROTECTION_INTERVAL / 10 + " sec.");
  1605. +                       return;
  1606. +                   }
  1607. +                  
  1608. +                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1609. +                   {
  1610. +                       if (player == null)
  1611. +                       {
  1612. +                           continue;
  1613. +                       }
  1614. +                      
  1615. +                       if (!BlockList.isBlocked(player, activeChar))
  1616. +                       {
  1617. +                           player.sendPacket(Hero);
  1618. +                       }
  1619. +                   }
  1620. +               }
  1621. +              
  1622. +               else if (activeChar.isHero() && activeChar.isGM() && activeChar.getAccessLevel().getLevel() == 1 && activeChar.isHideNameEnabled())
  1623. +               {
  1624. +                   CreatureSay Hero = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_NAME_PROTECT, _text);
  1625. +                   if (!getClient().getFloodProtectors().getHeroVoice().tryPerformAction("hero voice"))
  1626. +                   {
  1627. +                       activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_HERO_VOICE.FLOOD_PROTECTION_INTERVAL / 10 + " sec.");
  1628. +                       return;
  1629. +                   }
  1630. +                  
  1631. +                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1632. +                   {
  1633. +                       if (player == null)
  1634. +                       {
  1635. +                           continue;
  1636. +                       }
  1637. +                      
  1638. +                       if (!BlockList.isBlocked(player, activeChar))
  1639. +                       {
  1640. +                           player.sendPacket(Hero);
  1641. +                       }
  1642. +                   }
  1643. +               }
  1644. +              
  1645. +               else if (activeChar.isHero() && activeChar.isGM() && activeChar.getAccessLevel().getLevel() > 1 && activeChar.isHideNameEnabled())
  1646. +               {
  1647. +                   CreatureSay Hero = new CreatureSay(activeChar.getObjectId(), _type, "" + (Config.SHOW_TIME_IN_CHAT ? "[" + fmt.format(new Date(System.currentTimeMillis())) + "]" : "") + " " + Config.GM_SUPPORT_NAME_PROTECT, _text);
  1648. +                   if (!getClient().getFloodProtectors().getHeroVoice().tryPerformAction("hero voice"))
  1649. +                   {
  1650. +                       activeChar.sendMessage("You can send message every " + Config.FLOOD_PROTECTOR_HERO_VOICE.FLOOD_PROTECTION_INTERVAL / 10 + " sec.");
  1651. +                       return;
  1652. +                   }
  1653. +                  
  1654. +                   for (L2PcInstance player : L2World.getInstance().getAllPlayers().values())
  1655. +                   {
  1656. +                       if (player == null)
  1657. +                       {
  1658. +                           continue;
  1659. +                       }
  1660. +                      
  1661. +                       if (!BlockList.isBlocked(player, activeChar))
  1662. +                       {
  1663. +                           player.sendPacket(Hero);
  1664. +                       }
  1665. +                   }
  1666. +               }
  1667. +              
  1668.                 break;
  1669.         }
  1670.     }
  1671. @@ -671,6 +1712,7 @@
  1672.    
  1673.     private void checkText(L2PcInstance activeChar)
  1674.     {
  1675. +      
  1676.         if (Config.USE_SAY_FILTER)
  1677.         {
  1678.             String filteredText = _text.toLowerCase();
  1679. @@ -699,6 +1741,7 @@
  1680.                
  1681.                 activeChar.sendMessage("The word: " + _text + " is not allowed here.");
  1682.                 _text = filteredText;
  1683. +              
  1684.             }
  1685.         }
  1686.     }
  1687. @@ -708,4 +1751,5 @@
  1688.     {
  1689.         return "[C] 38 Say2";
  1690.     }
  1691. +  
  1692. }
  1693. \ No newline at end of file
  1694. diff --git src/l2jorion/game/network/serverpackets/CharInfo.java src/l2jorion/game/network/serverpackets/CharInfo.java
  1695. index c7eda05..1112fa0 100644
  1696. --- src/l2jorion/game/network/serverpackets/CharInfo.java
  1697. +++ src/l2jorion/game/network/serverpackets/CharInfo.java
  1698. @@ -124,7 +124,14 @@
  1699.                 writeC(_activeChar.isInCombat() ? 1 : 0);
  1700.                 writeC(_activeChar.isAlikeDead() ? 1 : 0);
  1701.                 writeC(0); // if the charinfo is written means receiver can see the char
  1702. -               writeS(_activeChar.getName());
  1703. +               if (_activeChar.isHideNameEnabled() == true && _activeChar.isGM())
  1704. +               {
  1705. +                   writeS("");
  1706. +               }
  1707. +               else
  1708. +               {
  1709. +                   writeS(_activeChar.getName());
  1710. +               }
  1711.                
  1712.                 if (_activeChar.getAppearance().getInvisible())
  1713.                 {
  1714. @@ -170,7 +177,14 @@
  1715.             writeD(0); // it's _vehicleId, but we don't have it yet
  1716.            
  1717.             writeD(_objId);
  1718. -           writeS(_activeChar.getName());
  1719. +           if (_activeChar.isHideNameEnabled() == true && _activeChar.isGM())
  1720. +           {
  1721. +               writeS("");
  1722. +           }
  1723. +           else
  1724. +           {
  1725. +               writeS(_activeChar.getName());
  1726. +           }
  1727.             writeD(_activeChar.getRace().ordinal());
  1728.             writeD(_activeChar.getAppearance().getSex() ? 1 : 0);
  1729.            
  1730. diff --git src/l2jorion/game/network/serverpackets/UserInfo.java src/l2jorion/game/network/serverpackets/UserInfo.java
  1731. index a04983d..e0285d3 100644
  1732. --- src/l2jorion/game/network/serverpackets/UserInfo.java
  1733. +++ src/l2jorion/game/network/serverpackets/UserInfo.java
  1734. @@ -85,7 +85,14 @@
  1735.         writeD(_activeChar.getHeading());
  1736.        
  1737.         writeD(_activeChar.getObjectId());
  1738. -       writeS(_activeChar.getName());
  1739. +       if (_activeChar.isHideNameEnabled() == true && _activeChar.isGM())
  1740. +       {
  1741. +           writeS("");
  1742. +       }
  1743. +       else
  1744. +       {
  1745. +           writeS(_activeChar.getName());
  1746. +       }
  1747.         writeD(_activeChar.getRace().ordinal());
  1748.         writeD(_activeChar.getAppearance().getSex() ? 1 : 0);
  1749.        
  1750.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement