Renamed TELL and NPC_TELL chat types, also fixed minor typo in L2PcInstance.
Source L2J Ertheia branch:48e9f32ede
9e6d13a293
This commit is contained in:
parent
f9a65fe3c1
commit
46efd67919
4
trunk/dist/game/config/General.properties
vendored
4
trunk/dist/game/config/General.properties
vendored
@ -564,9 +564,9 @@ ChatFilterChars = ^_^
|
||||
# NPC_GENERAL
|
||||
# NPC_SHOUT
|
||||
# NEW_TELL
|
||||
# GLOBAL (&)
|
||||
# WORLD (&)
|
||||
# Default: ALL;SHOUT;GLOBAL;TRADE;HERO_VOICE
|
||||
BanChatChannels = GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE
|
||||
BanChatChannels = GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -65,7 +65,7 @@ public final class Proclaimer extends AbstractNpcAI
|
||||
String htmltext = null;
|
||||
if (!player.isOnDarkSide())
|
||||
{
|
||||
player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_TELL, npc.getId(), NpcStringId.WHEN_THE_WORLD_PLUNGES_INTO_CHAOS_WE_WILL_NEED_YOUR_HELP_WE_HOPE_YOU_JOIN_US_WHEN_THE_TIME_COMES));
|
||||
player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_WHISPER, npc.getId(), NpcStringId.WHEN_THE_WORLD_PLUNGES_INTO_CHAOS_WE_WILL_NEED_YOUR_HELP_WE_HOPE_YOU_JOIN_US_WHEN_THE_TIME_COMES));
|
||||
|
||||
final L2Clan ownerClan = npc.getCastle().getOwner();
|
||||
if (ownerClan != null)
|
||||
|
@ -136,9 +136,9 @@ import handlers.bypasshandlers.TerritoryStatus;
|
||||
import handlers.bypasshandlers.TutorialClose;
|
||||
import handlers.bypasshandlers.VoiceCommand;
|
||||
import handlers.bypasshandlers.Wear;
|
||||
import handlers.chathandlers.ChatAll;
|
||||
import handlers.chathandlers.ChatAlliance;
|
||||
import handlers.chathandlers.ChatClan;
|
||||
import handlers.chathandlers.ChatGeneral;
|
||||
import handlers.chathandlers.ChatHeroVoice;
|
||||
import handlers.chathandlers.ChatParty;
|
||||
import handlers.chathandlers.ChatPartyMatchRoom;
|
||||
@ -146,8 +146,8 @@ import handlers.chathandlers.ChatPartyRoomAll;
|
||||
import handlers.chathandlers.ChatPartyRoomCommander;
|
||||
import handlers.chathandlers.ChatPetition;
|
||||
import handlers.chathandlers.ChatShout;
|
||||
import handlers.chathandlers.ChatTell;
|
||||
import handlers.chathandlers.ChatTrade;
|
||||
import handlers.chathandlers.ChatWhisper;
|
||||
import handlers.chathandlers.ChatWorld;
|
||||
import handlers.communityboard.ClanBoard;
|
||||
import handlers.communityboard.FavoriteBoard;
|
||||
@ -438,7 +438,7 @@ public class MasterHandler
|
||||
},
|
||||
{
|
||||
// Chat Handlers
|
||||
ChatAll.class,
|
||||
ChatGeneral.class,
|
||||
ChatAlliance.class,
|
||||
ChatClan.class,
|
||||
ChatHeroVoice.class,
|
||||
@ -448,7 +448,7 @@ public class MasterHandler
|
||||
ChatPartyRoomCommander.class,
|
||||
ChatPetition.class,
|
||||
ChatShout.class,
|
||||
ChatTell.class,
|
||||
ChatWhisper.class,
|
||||
ChatTrade.class,
|
||||
ChatWorld.class,
|
||||
},
|
||||
|
@ -309,7 +309,7 @@ public class AdminAdmin implements IAdminCommandHandler
|
||||
sb.append(" ");
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.GLOBAL, sb.toString());
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, sb.toString());
|
||||
L2World.getInstance().getPlayers().stream().filter(activeChar::isNotBlocked).forEach(cs::sendTo);
|
||||
break;
|
||||
}
|
||||
|
@ -37,9 +37,9 @@ import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
* General Chat Handler.
|
||||
* @author durgus
|
||||
*/
|
||||
public final class ChatAll implements IChatHandler
|
||||
public final class ChatGeneral implements IChatHandler
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(ChatAll.class.getName());
|
||||
private static Logger _log = Logger.getLogger(ChatGeneral.class.getName());
|
||||
|
||||
private static final ChatType[] CHAT_TYPES =
|
||||
{
|
@ -33,11 +33,11 @@ import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
* Tell chat handler.
|
||||
* @author durgus
|
||||
*/
|
||||
public final class ChatTell implements IChatHandler
|
||||
public final class ChatWhisper implements IChatHandler
|
||||
{
|
||||
private static final ChatType[] CHAT_TYPES =
|
||||
{
|
||||
ChatType.TELL,
|
||||
ChatType.WHISPER
|
||||
};
|
||||
|
||||
@Override
|
@ -43,7 +43,7 @@ public final class ChatWorld implements IChatHandler
|
||||
|
||||
private static final ChatType[] CHAT_TYPES =
|
||||
{
|
||||
ChatType.GLOBAL,
|
||||
ChatType.WORLD,
|
||||
};
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +67,7 @@ public class ChatsHandler implements ITelnetHandler
|
||||
String name = st.nextToken();
|
||||
String message = val.substring(name.length() + 1);
|
||||
L2PcInstance reciever = L2World.getInstance().getPlayer(name);
|
||||
CreatureSay cs = new CreatureSay(0, ChatType.TELL, "Telnet Priv", message);
|
||||
CreatureSay cs = new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", message);
|
||||
if (reciever != null)
|
||||
{
|
||||
reciever.sendPacket(cs);
|
||||
|
@ -246,7 +246,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.FOR_THE_ETERNITY_OF_EINHASAD));
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.TELL, caster.getId(), NpcStringId.MY_POWER_S_WEAKENING_HURRY_AND_TURN_ON_THE_SEALING_DEVICE));
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.MY_POWER_S_WEAKENING_HURRY_AND_TURN_ON_THE_SEALING_DEVICE));
|
||||
}
|
||||
caster.setScriptValue(1);
|
||||
}
|
||||
@ -259,7 +259,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.DEAR_SHILLIEN_S_OFFSPRINGS_YOU_ARE_NOT_CAPABLE_OF_CONFRONTING_US));
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.TELL, caster.getId(), NpcStringId.ALL_4_SEALING_DEVICES_MUST_BE_TURNED_ON));
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.ALL_4_SEALING_DEVICES_MUST_BE_TURNED_ON));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -268,7 +268,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.I_LL_SHOW_YOU_THE_REAL_POWER_OF_EINHASAD));
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.TELL, caster.getId(), NpcStringId.LILITH_ATTACK_IS_GETTING_STRONGER_GO_AHEAD_AND_TURN_IT_ON));
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.LILITH_ATTACK_IS_GETTING_STRONGER_GO_AHEAD_AND_TURN_IT_ON));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -277,7 +277,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.DEAR_MILITARY_FORCE_OF_LIGHT_GO_DESTROY_THE_OFFSPRINGS_OF_SHILLIEN));
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.TELL, caster.getId(), NpcStringId.DEAR_S1_GIVE_ME_MORE_STRENGTH).addStringParameter(player.getName()));
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.DEAR_S1_GIVE_ME_MORE_STRENGTH).addStringParameter(player.getName()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -515,8 +515,8 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.I_HERMUNCUS_GIVE_MY_POWER_TO_THOSE_WHO_FIGHT_FOR_ME, ExShowScreenMessage.TOP_CENTER, 5000);
|
||||
|
||||
broadcastNpcSay(npc, ChatType.TELL, NpcStringId.RECEIVE_THIS_POWER_FORM_THE_ANCIENT_GIANT);
|
||||
broadcastNpcSay(npc, ChatType.TELL, NpcStringId.USE_THIS_NEW_POWER_WHEN_THE_TIME_IS_RIGHT);
|
||||
broadcastNpcSay(npc, ChatType.WHISPER, NpcStringId.RECEIVE_THIS_POWER_FORM_THE_ANCIENT_GIANT);
|
||||
broadcastNpcSay(npc, ChatType.WHISPER, NpcStringId.USE_THIS_NEW_POWER_WHEN_THE_TIME_IS_RIGHT);
|
||||
|
||||
startQuestTimer("message4", 3000, npc, player);
|
||||
}
|
||||
|
@ -246,6 +246,6 @@ public final class Q00457_LostAndFound extends Quest
|
||||
|
||||
public void broadcastNpcSay(L2Npc npc, L2PcInstance player, NpcStringId stringId, boolean whisper)
|
||||
{
|
||||
((whisper) ? player : npc).sendPacket(new NpcSay(npc.getObjectId(), ((whisper) ? ChatType.TELL : ChatType.NPC_GENERAL), npc.getId(), stringId));
|
||||
((whisper) ? player : npc).sendPacket(new NpcSay(npc.getObjectId(), ((whisper) ? ChatType.NPC_WHISPER : ChatType.NPC_GENERAL), npc.getId(), stringId));
|
||||
}
|
||||
}
|
@ -1919,7 +1919,7 @@ public final class Config
|
||||
BBS_DEFAULT = General.getString("BBSDefault", "_bbshome");
|
||||
USE_SAY_FILTER = General.getBoolean("UseChatFilter", false);
|
||||
CHAT_FILTER_CHARS = General.getString("ChatFilterChars", "^_^");
|
||||
final String[] propertySplit4 = General.getString("BanChatChannels", "GENERAL;SHOUT;GLOBAL;TRADE;HERO_VOICE").trim().split(";");
|
||||
final String[] propertySplit4 = General.getString("BanChatChannels", "GENERAL;SHOUT;WORLD;TRADE;HERO_VOICE").trim().split(";");
|
||||
BAN_CHAT_CHANNELS = new HashSet<>();
|
||||
try
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ public enum ChatType
|
||||
{
|
||||
GENERAL(0),
|
||||
SHOUT(1),
|
||||
TELL(2),
|
||||
WHISPER(2),
|
||||
PARTY(3),
|
||||
CLAN(4),
|
||||
GM(5),
|
||||
@ -47,8 +47,8 @@ public enum ChatType
|
||||
MPCC_ROOM(21),
|
||||
NPC_GENERAL(22),
|
||||
NPC_SHOUT(23),
|
||||
NPC_TELL(24),
|
||||
GLOBAL(25);
|
||||
NPC_WHISPER(24),
|
||||
WORLD(25);
|
||||
|
||||
private final int _clientId;
|
||||
|
||||
|
@ -930,7 +930,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
private boolean _hasCharmOfCourage = false;
|
||||
|
||||
private final Set<Integer> _whispepers = ConcurrentHashMap.newKeySet();
|
||||
private final Set<Integer> _whisperers = ConcurrentHashMap.newKeySet();
|
||||
|
||||
private int _jumpTrackId = 0;
|
||||
|
||||
@ -15177,6 +15177,6 @@ public final class L2PcInstance extends L2Playable
|
||||
*/
|
||||
public Set<Integer> getWhisperers()
|
||||
{
|
||||
return _whispepers;
|
||||
return _whisperers;
|
||||
}
|
||||
}
|
||||
|
@ -855,7 +855,7 @@ public class TvTEvent
|
||||
|
||||
killerTeam.increasePoints();
|
||||
|
||||
CreatureSay cs = new CreatureSay(killerPlayerInstance.getObjectId(), ChatType.TELL, killerPlayerInstance.getName(), "I have killed " + killedPlayerInstance.getName() + "!");
|
||||
CreatureSay cs = new CreatureSay(killerPlayerInstance.getObjectId(), ChatType.WHISPER, killerPlayerInstance.getName(), "I have killed " + killedPlayerInstance.getName() + "!");
|
||||
|
||||
for (L2PcInstance playerInstance : _teams[killerTeamId].getParticipatedPlayers().values())
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ public final class Say2 extends L2GameClientPacket
|
||||
{
|
||||
_text = readS();
|
||||
_type = readD();
|
||||
_target = (_type == ChatType.TELL.getClientId()) ? readS() : null;
|
||||
_target = (_type == ChatType.WHISPER.getClientId()) ? readS() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -138,7 +138,7 @@ public final class Say2 extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.L2WALKER_PROTECTION && (chatType == ChatType.TELL) && checkBot(_text))
|
||||
if (Config.L2WALKER_PROTECTION && (chatType == ChatType.WHISPER) && checkBot(_text))
|
||||
{
|
||||
Util.handleIllegalPlayerAction(activeChar, "Client Emulator Detect: Player " + activeChar.getName() + " using l2walker.", Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
@ -168,7 +168,7 @@ public final class Say2 extends L2GameClientPacket
|
||||
|
||||
if (activeChar.isJailed() && Config.JAIL_DISABLE_CHAT)
|
||||
{
|
||||
if ((chatType == ChatType.TELL) || (chatType == ChatType.SHOUT) || (chatType == ChatType.TRADE) || (chatType == ChatType.HERO_VOICE))
|
||||
if ((chatType == ChatType.WHISPER) || (chatType == ChatType.SHOUT) || (chatType == ChatType.TRADE) || (chatType == ChatType.HERO_VOICE))
|
||||
{
|
||||
activeChar.sendMessage("You can not chat with players outside of the jail.");
|
||||
return;
|
||||
@ -185,7 +185,7 @@ public final class Say2 extends L2GameClientPacket
|
||||
final LogRecord record = new LogRecord(Level.INFO, _text);
|
||||
record.setLoggerName("chat");
|
||||
|
||||
if (chatType == ChatType.TELL)
|
||||
if (chatType == ChatType.WHISPER)
|
||||
{
|
||||
record.setParameters(new Object[]
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
if (_text != null)
|
||||
{
|
||||
writeS(_text);
|
||||
if ((_charLevel > 0) && (_textType == ChatType.TELL))
|
||||
if ((_charLevel > 0) && (_textType == ChatType.WHISPER))
|
||||
{
|
||||
writeC(_mask);
|
||||
if ((_mask & 0x10) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user