Renamed TELL and NPC_TELL chat types, also fixed minor typo in L2PcInstance.
Source L2J Ertheia branch:48e9f32ede
9e6d13a293
This commit is contained in:
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));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user