Index: D:/L2HauntedStory/L2_GameServer/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java
===================================================================
--- D:/L2HauntedStory/L2_GameServer/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (revision 2785)
+++ D:/L2HauntedStory/L2_GameServer/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (working copy)
@@ -42,27 +42,15 @@
*/
public void handleChat(int type, L2PcInstance activeChar, String target, String text)
{
- CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
-
- Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
-
- if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
+ if((activeChar.getPvpKills() >= 100) || (activeChar.isGM()))
{
- for (L2PcInstance player : pls)
- {
- if (!BlockList.isBlocked(player, activeChar))
- player.sendPacket(cs);
- }
-
- }
- else if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("limited"))
- {
- int region = MapRegionTable.getInstance().getMapRegion(activeChar.getX(), activeChar.getY());
+ CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
+
+ Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
//synchronized (L2World.getInstance().getAllPlayers())
{
for (L2PcInstance player : pls)
- if (region == MapRegionTable.getInstance().getMapRegion(player.getX(), player.getY()) && !BlockList.isBlocked(player, activeChar) && player.getInstanceId() == activeChar.getInstanceId())
- player.sendPacket(cs);
+ player.sendPacket(cs);
}
}
}
Index: D:/L2HauntedStory/L2_GameServer/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java
===================================================================
--- D:/L2HauntedStory/L2_GameServer/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (revision 2785)
+++ D:/L2HauntedStory/L2_GameServer/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (working copy)
@@ -42,28 +42,17 @@
*/
public void handleChat(int type, L2PcInstance activeChar, String target, String text)
{
- CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
-
- Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
-
- if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
+ if((activeChar.getPvpKills() >= 200) || (activeChar.isGM()))
{
- int region = MapRegionTable.getInstance().getMapRegion(activeChar.getX(), activeChar.getY());
+ CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
+
+ Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
//synchronized (L2World.getInstance().getAllPlayers())
{
for (L2PcInstance player : pls)
- if (region == MapRegionTable.getInstance().getMapRegion(player.getX(), player.getY()) && !BlockList.isBlocked(player, activeChar) && player.getInstanceId() == activeChar.getInstanceId())
- player.sendPacket(cs);
+ player.sendPacket(cs);
}
}
- else if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("global"))
- {
- for (L2PcInstance player : pls)
- {
- if (!BlockList.isBlocked(player, activeChar))
- player.sendPacket(cs);
- }
- }
}
/**