CreatureSay cleanup and improvements.
This commit is contained in:
parent
1cdcd2f8b0
commit
f8acdcace7
@ -95,8 +95,7 @@ public class PolymorphingOnAttack extends AbstractNpcAI
|
||||
if (tmp.get(3) >= 0)
|
||||
{
|
||||
final NpcStringId npcString = MOBTEXTS[tmp.get(3)][getRandom(MOBTEXTS[tmp.get(3)].length)];
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), npcString));
|
||||
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, npcString));
|
||||
}
|
||||
npc.deleteMe();
|
||||
final Attackable newNpc = (Attackable) addSpawn(tmp.get(0), npc.getX(), npc.getY(), npc.getZ() + 10, npc.getHeading(), false, 0, true);
|
||||
|
@ -380,7 +380,7 @@ public class Race extends Event
|
||||
|
||||
private void sendMessage(PlayerInstance player, String text)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(_npc.getObjectId(), ChatType.MPCC_ROOM, _npc.getName(), text));
|
||||
player.sendPacket(new CreatureSay(_npc, ChatType.MPCC_ROOM, _npc.getName(), text));
|
||||
}
|
||||
|
||||
private void showMenu(PlayerInstance player)
|
||||
|
@ -123,7 +123,7 @@ public class FreyaCelebration extends LongTimeEvent
|
||||
{
|
||||
if (getRandom(100) < 5)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
|
||||
final CreatureSay cs = new CreatureSay(npc, ChatType.NPC_GENERAL, NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
|
||||
cs.addStringParameter(caster.getName());
|
||||
|
||||
npc.broadcastPacket(cs);
|
||||
@ -132,7 +132,7 @@ public class FreyaCelebration extends LongTimeEvent
|
||||
}
|
||||
else if (getRandom(10) < 2)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), getRandomEntry(FREYA_TEXT)));
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, getRandomEntry(FREYA_TEXT)));
|
||||
}
|
||||
}
|
||||
return super.onSkillSee(npc, caster, skill, targets, isSummon);
|
||||
|
@ -296,7 +296,7 @@ public class AdminAdmin implements IAdminCommandHandler
|
||||
sb.append(" ");
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, sb.toString());
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, activeChar.getName(), sb.toString());
|
||||
World.getInstance().getPlayers().stream().filter(activeChar::isNotBlocked).forEach(cs::sendTo);
|
||||
break;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public class AdminGmChat implements IAdminCommandHandler
|
||||
offset = 13;
|
||||
}
|
||||
text = command.substring(offset);
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.ALLIANCE, activeChar.getName(), text);
|
||||
AdminData.getInstance().broadcastToGMs(cs);
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
|
@ -53,7 +53,7 @@ public class AdminTargetSay implements IAdminCommandHandler
|
||||
|
||||
final String message = command.substring(16);
|
||||
final Creature target = (Creature) obj;
|
||||
target.broadcastPacket(new CreatureSay(target.getObjectId(), target.isPlayer() ? ChatType.GENERAL : ChatType.NPC_GENERAL, target.getName(), message));
|
||||
target.broadcastPacket(new CreatureSay(target, target.isPlayer() ? ChatType.GENERAL : ChatType.NPC_GENERAL, target.getName(), message));
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ public class FindPvP implements IBypassHandler
|
||||
|
||||
if (biggestAllyId == allyId)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -139,7 +139,7 @@ public class FindPvP implements IBypassHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class ChatAlliance implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getClan().broadcastToOnlineAllyMembers(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text));
|
||||
activeChar.getClan().broadcastToOnlineAllyMembers(new CreatureSay(activeChar, type, activeChar.getName(), text));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,7 +54,7 @@ public class ChatClan implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getClan().broadcastCSToOnlineMembers(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getClan().broadcastCSToOnlineMembers(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,8 +87,8 @@ public class ChatGeneral implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getAppearance().getVisibleName(), text);
|
||||
final CreatureSay csRandom = new CreatureSay(activeChar.getObjectId(), type, activeChar.getAppearance().getVisibleName(), ChatRandomizer.randomize(text));
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getAppearance().getVisibleName(), text);
|
||||
final CreatureSay csRandom = new CreatureSay(activeChar, type, activeChar.getAppearance().getVisibleName(), ChatRandomizer.randomize(text));
|
||||
World.getInstance().forEachVisibleObjectInRange(activeChar, PlayerInstance.class, 1250, player ->
|
||||
{
|
||||
if ((player != null) && !BlockList.isBlocked(player, activeChar))
|
||||
|
@ -62,7 +62,7 @@ public class ChatHeroVoice implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
for (PlayerInstance player : World.getInstance().getPlayers())
|
||||
{
|
||||
if ((player != null) && !BlockList.isBlocked(player, activeChar))
|
||||
|
@ -54,7 +54,7 @@ public class ChatParty implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +53,7 @@ public class ChatPartyMatchRoom implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
for (PlayerInstance _member : room.getMembers())
|
||||
{
|
||||
if (Config.FACTION_SYSTEM_ENABLED)
|
||||
|
@ -50,7 +50,7 @@ public class ChatPartyRoomAll implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class ChatPartyRoomCommander implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class ChatShout implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS)))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);
|
||||
|
@ -58,7 +58,7 @@ public class ChatTrade implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS)))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);
|
||||
|
@ -93,7 +93,7 @@ public class ChatWorld implements IChatHandler
|
||||
}
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_SPECIFIC_CHAT)
|
||||
{
|
||||
if (activeChar.isGood())
|
||||
|
@ -52,7 +52,7 @@ public class GMChat implements ITelnetCommand
|
||||
{
|
||||
sb.append(str + " ");
|
||||
}
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(null, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
|
||||
return "GMChat sent!";
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class Msg implements ITelnetCommand
|
||||
{
|
||||
sb.append(args[i] + " ");
|
||||
}
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", sb.toString()));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, "Telnet Priv", sb.toString()));
|
||||
return "Announcement sent!";
|
||||
}
|
||||
return "Couldn't find player with such name.";
|
||||
|
@ -145,7 +145,7 @@ public class Q00457_LostAndFound extends Quest
|
||||
startQuestTimer("STOP", 1000, npc, player);
|
||||
startQuestTimer("BYE", 3000, npc, player);
|
||||
cancelQuestTimer("CHECK", npc, player);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.AH_FRESH_AIR));
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, NpcStringId.AH_FRESH_AIR));
|
||||
broadcastNpcSay(npc, player, NpcStringId.AH_FRESH_AIR, false);
|
||||
giveItems(player, PACKAGED_BOOK, 1);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
|
@ -138,29 +138,29 @@ public class BoatGludinRune implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY_2);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY_2);
|
||||
LEAVING_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
ARRIVAL_RUNE15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_RUNE15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
GLUDIN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GLUDIN_DOCK[0].getX(), GLUDIN_DOCK[0].getY(), GLUDIN_DOCK[0].getZ());
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
|
@ -94,17 +94,17 @@ public class BoatInnadrilTour implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
|
||||
ARRIVAL20 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL20 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
INNADRIL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), DOCK.getX(), DOCK.getY(), DOCK.getZ());
|
||||
}
|
||||
|
@ -90,13 +90,13 @@ public class BoatRunePrimeval implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
PRIMEVAL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), PRIMEVAL_DOCK.getX(), PRIMEVAL_DOCK.getY(), PRIMEVAL_DOCK.getZ());
|
||||
|
@ -110,9 +110,7 @@ public class AnnouncementsTable
|
||||
{
|
||||
if (announce.isValid() && (announce.getType() == type))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, //
|
||||
type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, //
|
||||
player.getName(), announce.getContent()));
|
||||
player.sendPacket(new CreatureSay(null, type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, player.getName(), announce.getContent()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ public class FakePlayerChatManager implements IXmlReader
|
||||
final Npc npc = spawn.getLastSpawn();
|
||||
if (npc != null)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(npc, fpcName, ChatType.WHISPER, message));
|
||||
player.sendPacket(new CreatureSay(npc, ChatType.WHISPER, fpcName, message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ public class PetitionManager
|
||||
|
||||
if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
|
||||
{
|
||||
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||
cs = new CreatureSay(player, ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||
currPetition.addLogMessage(cs);
|
||||
|
||||
currPetition.sendResponderPacket(cs);
|
||||
@ -349,7 +349,7 @@ public class PetitionManager
|
||||
|
||||
if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
|
||||
{
|
||||
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_GM, player.getName(), messageText);
|
||||
cs = new CreatureSay(player, ChatType.PETITION_GM, player.getName(), messageText);
|
||||
currPetition.addLogMessage(cs);
|
||||
|
||||
currPetition.sendResponderPacket(cs);
|
||||
@ -423,7 +423,7 @@ public class PetitionManager
|
||||
|
||||
// Notify all GMs that a new petition has been submitted.
|
||||
final String msgContent = petitioner.getName() + " has submitted a new petition."; // (ID: " + newPetitionId + ").";
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(petitioner.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(petitioner, ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
|
||||
return newPetitionId;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ public class Attackable extends Npc
|
||||
_commandChannelTimer = new CommandChannelTimer(this);
|
||||
_commandChannelLastAttack = System.currentTimeMillis();
|
||||
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(null, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ public abstract class VoteSystem implements Runnable
|
||||
|
||||
private void announce(String msg)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
Broadcast.toAllOnlinePlayers(cs);
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
|
||||
if ((Config.SERVER_RESTART_SCHEDULE_ENABLED) && (Config.SERVER_RESTART_SCHEDULE_MESSAGE))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(2, ChatType.BATTLEFIELD, "[SERVER]", "Next restart is scheduled at " + ServerRestartManager.getInstance().getNextRestartTime() + "."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.BATTLEFIELD, "[SERVER]", "Next restart is scheduled at " + ServerRestartManager.getInstance().getNextRestartTime() + "."));
|
||||
}
|
||||
|
||||
if (showClanNotice)
|
||||
|
@ -80,7 +80,7 @@ public class RequestPetitionCancel implements IClientIncomingPacket
|
||||
|
||||
// Notify all GMs that the player's pending petition has been cancelled.
|
||||
final String msgContent = player.getName() + " has canceled a pending petition.";
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(player.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(player, ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.instancemanager.MentorManager;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
@ -30,30 +30,29 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
||||
public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final ChatType _textType;
|
||||
private String _charName = null;
|
||||
private int _charId = 0;
|
||||
private final Creature _sender;
|
||||
private final ChatType _chatType;
|
||||
private String _senderName = null;
|
||||
private String _text = null;
|
||||
private int _npcString = -1;
|
||||
private int _charId = 0;
|
||||
private int _messageId = -1;
|
||||
private int _mask;
|
||||
private int _charLevel = -1;
|
||||
private List<String> _parameters;
|
||||
|
||||
/**
|
||||
* @param sender
|
||||
* @param receiver
|
||||
* @param name
|
||||
* @param messageType
|
||||
* @param chatType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(PlayerInstance sender, PlayerInstance receiver, String name, ChatType messageType, String text)
|
||||
public CreatureSay(PlayerInstance sender, PlayerInstance receiver, String name, ChatType chatType, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
_charLevel = sender.getLevel();
|
||||
_textType = messageType;
|
||||
_sender = sender;
|
||||
_senderName = name;
|
||||
_chatType = chatType;
|
||||
_text = text;
|
||||
|
||||
if (receiver != null)
|
||||
{
|
||||
if (receiver.getFriendList().contains(sender.getObjectId()))
|
||||
@ -81,66 +80,27 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by fake players.
|
||||
* @param sender
|
||||
* @param name
|
||||
* @param messageType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(Npc sender, String name, ChatType messageType, String text)
|
||||
public CreatureSay(Creature sender, ChatType chatType, String senderName, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
_charLevel = sender.getLevel();
|
||||
_textType = messageType;
|
||||
_sender = sender;
|
||||
_chatType = chatType;
|
||||
_senderName = senderName;
|
||||
_text = text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param objectId
|
||||
* @param messageType
|
||||
* @param charName
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, String text)
|
||||
public CreatureSay(Creature sender, ChatType chatType, NpcStringId npcStringId)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charName = charName;
|
||||
_text = text;
|
||||
_sender = sender;
|
||||
_chatType = chatType;
|
||||
_messageId = npcStringId.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(PlayerInstance player, ChatType messageType, String text)
|
||||
public CreatureSay(ChatType chatType, int charId, SystemMessageId systemMessageId)
|
||||
{
|
||||
_objectId = player.getObjectId();
|
||||
_textType = messageType;
|
||||
_charName = player.getAppearance().getVisibleName();
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_sender = null;
|
||||
_chatType = chatType;
|
||||
_charId = charId;
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charName = charName;
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, SystemMessageId sysString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charId = charId;
|
||||
_npcString = sysString.getId();
|
||||
_messageId = systemMessageId.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,26 +121,26 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.SAY2.writeId(packet);
|
||||
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_textType.getClientId());
|
||||
if (_charName != null)
|
||||
packet.writeD(_sender == null ? 0 : _sender.getObjectId());
|
||||
packet.writeD(_chatType.getClientId());
|
||||
if (_senderName != null)
|
||||
{
|
||||
packet.writeS(_charName);
|
||||
packet.writeS(_senderName);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(_charId);
|
||||
}
|
||||
packet.writeD(_npcString); // High Five NPCString ID
|
||||
packet.writeD(_messageId); // High Five NPCString ID
|
||||
if (_text != null)
|
||||
{
|
||||
packet.writeS(_text);
|
||||
if ((_charLevel > 0) && (_textType == ChatType.WHISPER))
|
||||
if ((_sender != null) && (_sender.isPlayer() || _sender.isFakePlayer()) && (_chatType == ChatType.WHISPER))
|
||||
{
|
||||
packet.writeC(_mask);
|
||||
if ((_mask & 0x10) == 0)
|
||||
{
|
||||
packet.writeC(_charLevel);
|
||||
packet.writeC(_sender.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -199,7 +159,7 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
player.broadcastSnoop(_textType, _charName, _text);
|
||||
player.broadcastSnoop(_chatType, _senderName, _text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class Broadcast
|
||||
|
||||
public static void toAllOnlinePlayers(String text, boolean isCritical)
|
||||
{
|
||||
toAllOnlinePlayers(new CreatureSay(0, isCritical ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, "", text));
|
||||
toAllOnlinePlayers(new CreatureSay(null, isCritical ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, "", text));
|
||||
}
|
||||
|
||||
public static void toAllOnlinePlayersOnScreen(String text)
|
||||
|
@ -41,7 +41,7 @@ public class BuilderUtil
|
||||
{
|
||||
if (Config.GM_STARTUP_BUILDER_HIDE)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "SYS", message));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.GENERAL, "SYS", message));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -56,7 +56,7 @@ public class BuilderUtil
|
||||
*/
|
||||
public static void sendHtmlMessage(PlayerInstance player, String message)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "HTML", message));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.GENERAL, "HTML", message));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,8 +95,7 @@ public class PolymorphingOnAttack extends AbstractNpcAI
|
||||
if (tmp.get(3) >= 0)
|
||||
{
|
||||
final NpcStringId npcString = MOBTEXTS[tmp.get(3)][getRandom(MOBTEXTS[tmp.get(3)].length)];
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), npcString));
|
||||
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, npcString));
|
||||
}
|
||||
npc.deleteMe();
|
||||
final Attackable newNpc = (Attackable) addSpawn(tmp.get(0), npc.getX(), npc.getY(), npc.getZ() + 10, npc.getHeading(), false, 0, true);
|
||||
|
@ -380,7 +380,7 @@ public class Race extends Event
|
||||
|
||||
private void sendMessage(PlayerInstance player, String text)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(_npc.getObjectId(), ChatType.MPCC_ROOM, _npc.getName(), text));
|
||||
player.sendPacket(new CreatureSay(_npc, ChatType.MPCC_ROOM, _npc.getName(), text));
|
||||
}
|
||||
|
||||
private void showMenu(PlayerInstance player)
|
||||
|
@ -123,7 +123,7 @@ public class FreyaCelebration extends LongTimeEvent
|
||||
{
|
||||
if (getRandom(100) < 5)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
|
||||
final CreatureSay cs = new CreatureSay(npc, ChatType.NPC_GENERAL, NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
|
||||
cs.addStringParameter(caster.getName());
|
||||
|
||||
npc.broadcastPacket(cs);
|
||||
@ -132,7 +132,7 @@ public class FreyaCelebration extends LongTimeEvent
|
||||
}
|
||||
else if (getRandom(10) < 2)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), getRandomEntry(FREYA_TEXT)));
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, getRandomEntry(FREYA_TEXT)));
|
||||
}
|
||||
}
|
||||
return super.onSkillSee(npc, caster, skill, targets, isSummon);
|
||||
|
@ -296,7 +296,7 @@ public class AdminAdmin implements IAdminCommandHandler
|
||||
sb.append(" ");
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, sb.toString());
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, activeChar.getName(), sb.toString());
|
||||
World.getInstance().getPlayers().stream().filter(activeChar::isNotBlocked).forEach(cs::sendTo);
|
||||
break;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public class AdminGmChat implements IAdminCommandHandler
|
||||
offset = 13;
|
||||
}
|
||||
text = command.substring(offset);
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.ALLIANCE, activeChar.getName(), text);
|
||||
AdminData.getInstance().broadcastToGMs(cs);
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
|
@ -53,7 +53,7 @@ public class AdminTargetSay implements IAdminCommandHandler
|
||||
|
||||
final String message = command.substring(16);
|
||||
final Creature target = (Creature) obj;
|
||||
target.broadcastPacket(new CreatureSay(target.getObjectId(), target.isPlayer() ? ChatType.GENERAL : ChatType.NPC_GENERAL, target.getName(), message));
|
||||
target.broadcastPacket(new CreatureSay(target, target.isPlayer() ? ChatType.GENERAL : ChatType.NPC_GENERAL, target.getName(), message));
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ public class FindPvP implements IBypassHandler
|
||||
|
||||
if (biggestAllyId == allyId)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -139,7 +139,7 @@ public class FindPvP implements IBypassHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class ChatAlliance implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getClan().broadcastToOnlineAllyMembers(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text));
|
||||
activeChar.getClan().broadcastToOnlineAllyMembers(new CreatureSay(activeChar, type, activeChar.getName(), text));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,7 +54,7 @@ public class ChatClan implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getClan().broadcastCSToOnlineMembers(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getClan().broadcastCSToOnlineMembers(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,8 +87,8 @@ public class ChatGeneral implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getAppearance().getVisibleName(), text);
|
||||
final CreatureSay csRandom = new CreatureSay(activeChar.getObjectId(), type, activeChar.getAppearance().getVisibleName(), ChatRandomizer.randomize(text));
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getAppearance().getVisibleName(), text);
|
||||
final CreatureSay csRandom = new CreatureSay(activeChar, type, activeChar.getAppearance().getVisibleName(), ChatRandomizer.randomize(text));
|
||||
World.getInstance().forEachVisibleObjectInRange(activeChar, PlayerInstance.class, 1250, player ->
|
||||
{
|
||||
if ((player != null) && !BlockList.isBlocked(player, activeChar))
|
||||
|
@ -62,7 +62,7 @@ public class ChatHeroVoice implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
for (PlayerInstance player : World.getInstance().getPlayers())
|
||||
{
|
||||
if ((player != null) && !BlockList.isBlocked(player, activeChar))
|
||||
|
@ -54,7 +54,7 @@ public class ChatParty implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +53,7 @@ public class ChatPartyMatchRoom implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
for (PlayerInstance _member : room.getMembers())
|
||||
{
|
||||
if (Config.FACTION_SYSTEM_ENABLED)
|
||||
|
@ -50,7 +50,7 @@ public class ChatPartyRoomAll implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class ChatPartyRoomCommander implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class ChatShout implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS)))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);
|
||||
|
@ -58,7 +58,7 @@ public class ChatTrade implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS)))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);
|
||||
|
@ -93,7 +93,7 @@ public class ChatWorld implements IChatHandler
|
||||
}
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_SPECIFIC_CHAT)
|
||||
{
|
||||
if (activeChar.isGood())
|
||||
|
@ -52,7 +52,7 @@ public class GMChat implements ITelnetCommand
|
||||
{
|
||||
sb.append(str + " ");
|
||||
}
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(null, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
|
||||
return "GMChat sent!";
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class Msg implements ITelnetCommand
|
||||
{
|
||||
sb.append(args[i] + " ");
|
||||
}
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", sb.toString()));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, "Telnet Priv", sb.toString()));
|
||||
return "Announcement sent!";
|
||||
}
|
||||
return "Couldn't find player with such name.";
|
||||
|
@ -145,7 +145,7 @@ public class Q00457_LostAndFound extends Quest
|
||||
startQuestTimer("STOP", 1000, npc, player);
|
||||
startQuestTimer("BYE", 3000, npc, player);
|
||||
cancelQuestTimer("CHECK", npc, player);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.AH_FRESH_AIR));
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, NpcStringId.AH_FRESH_AIR));
|
||||
broadcastNpcSay(npc, player, NpcStringId.AH_FRESH_AIR, false);
|
||||
giveItems(player, PACKAGED_BOOK, 1);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
|
@ -138,29 +138,29 @@ public class BoatGludinRune implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY_2);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY_2);
|
||||
LEAVING_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
ARRIVAL_RUNE15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_RUNE15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
GLUDIN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GLUDIN_DOCK[0].getX(), GLUDIN_DOCK[0].getY(), GLUDIN_DOCK[0].getZ());
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
|
@ -94,17 +94,17 @@ public class BoatInnadrilTour implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
|
||||
ARRIVAL20 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL20 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
INNADRIL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), DOCK.getX(), DOCK.getY(), DOCK.getZ());
|
||||
}
|
||||
|
@ -90,13 +90,13 @@ public class BoatRunePrimeval implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
PRIMEVAL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), PRIMEVAL_DOCK.getX(), PRIMEVAL_DOCK.getY(), PRIMEVAL_DOCK.getZ());
|
||||
|
@ -110,9 +110,7 @@ public class AnnouncementsTable
|
||||
{
|
||||
if (announce.isValid() && (announce.getType() == type))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, //
|
||||
type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, //
|
||||
player.getName(), announce.getContent()));
|
||||
player.sendPacket(new CreatureSay(null, type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, player.getName(), announce.getContent()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ public class FakePlayerChatManager implements IXmlReader
|
||||
final Npc npc = spawn.getLastSpawn();
|
||||
if (npc != null)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(npc, fpcName, ChatType.WHISPER, message));
|
||||
player.sendPacket(new CreatureSay(npc, ChatType.WHISPER, fpcName, message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ public class PetitionManager
|
||||
|
||||
if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
|
||||
{
|
||||
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||
cs = new CreatureSay(player, ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||
currPetition.addLogMessage(cs);
|
||||
|
||||
currPetition.sendResponderPacket(cs);
|
||||
@ -349,7 +349,7 @@ public class PetitionManager
|
||||
|
||||
if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
|
||||
{
|
||||
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_GM, player.getName(), messageText);
|
||||
cs = new CreatureSay(player, ChatType.PETITION_GM, player.getName(), messageText);
|
||||
currPetition.addLogMessage(cs);
|
||||
|
||||
currPetition.sendResponderPacket(cs);
|
||||
@ -423,7 +423,7 @@ public class PetitionManager
|
||||
|
||||
// Notify all GMs that a new petition has been submitted.
|
||||
final String msgContent = petitioner.getName() + " has submitted a new petition."; // (ID: " + newPetitionId + ").";
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(petitioner.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(petitioner, ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
|
||||
return newPetitionId;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ public class Attackable extends Npc
|
||||
_commandChannelTimer = new CommandChannelTimer(this);
|
||||
_commandChannelLastAttack = System.currentTimeMillis();
|
||||
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(null, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ public abstract class VoteSystem implements Runnable
|
||||
|
||||
private void announce(String msg)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
Broadcast.toAllOnlinePlayers(cs);
|
||||
}
|
||||
|
||||
|
@ -481,7 +481,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
|
||||
if ((Config.SERVER_RESTART_SCHEDULE_ENABLED) && (Config.SERVER_RESTART_SCHEDULE_MESSAGE))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(2, ChatType.BATTLEFIELD, "[SERVER]", "Next restart is scheduled at " + ServerRestartManager.getInstance().getNextRestartTime() + "."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.BATTLEFIELD, "[SERVER]", "Next restart is scheduled at " + ServerRestartManager.getInstance().getNextRestartTime() + "."));
|
||||
}
|
||||
|
||||
if (showClanNotice)
|
||||
|
@ -80,7 +80,7 @@ public class RequestPetitionCancel implements IClientIncomingPacket
|
||||
|
||||
// Notify all GMs that the player's pending petition has been cancelled.
|
||||
final String msgContent = player.getName() + " has canceled a pending petition.";
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(player.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(player, ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.instancemanager.MentorManager;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
@ -30,30 +30,29 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
||||
public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final ChatType _textType;
|
||||
private String _charName = null;
|
||||
private int _charId = 0;
|
||||
private final Creature _sender;
|
||||
private final ChatType _chatType;
|
||||
private String _senderName = null;
|
||||
private String _text = null;
|
||||
private int _npcString = -1;
|
||||
private int _charId = 0;
|
||||
private int _messageId = -1;
|
||||
private int _mask;
|
||||
private int _charLevel = -1;
|
||||
private List<String> _parameters;
|
||||
|
||||
/**
|
||||
* @param sender
|
||||
* @param receiver
|
||||
* @param name
|
||||
* @param messageType
|
||||
* @param chatType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(PlayerInstance sender, PlayerInstance receiver, String name, ChatType messageType, String text)
|
||||
public CreatureSay(PlayerInstance sender, PlayerInstance receiver, String name, ChatType chatType, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
_charLevel = sender.getLevel();
|
||||
_textType = messageType;
|
||||
_sender = sender;
|
||||
_senderName = name;
|
||||
_chatType = chatType;
|
||||
_text = text;
|
||||
|
||||
if (receiver != null)
|
||||
{
|
||||
if (receiver.getFriendList().contains(sender.getObjectId()))
|
||||
@ -81,66 +80,27 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by fake players.
|
||||
* @param sender
|
||||
* @param name
|
||||
* @param messageType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(Npc sender, String name, ChatType messageType, String text)
|
||||
public CreatureSay(Creature sender, ChatType chatType, String senderName, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
_charLevel = sender.getLevel();
|
||||
_textType = messageType;
|
||||
_sender = sender;
|
||||
_chatType = chatType;
|
||||
_senderName = senderName;
|
||||
_text = text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param objectId
|
||||
* @param messageType
|
||||
* @param charName
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, String text)
|
||||
public CreatureSay(Creature sender, ChatType chatType, NpcStringId npcStringId)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charName = charName;
|
||||
_text = text;
|
||||
_sender = sender;
|
||||
_chatType = chatType;
|
||||
_messageId = npcStringId.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(PlayerInstance player, ChatType messageType, String text)
|
||||
public CreatureSay(ChatType chatType, int charId, SystemMessageId systemMessageId)
|
||||
{
|
||||
_objectId = player.getObjectId();
|
||||
_textType = messageType;
|
||||
_charName = player.getAppearance().getVisibleName();
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_sender = null;
|
||||
_chatType = chatType;
|
||||
_charId = charId;
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charName = charName;
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, SystemMessageId sysString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charId = charId;
|
||||
_npcString = sysString.getId();
|
||||
_messageId = systemMessageId.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,26 +121,26 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.SAY2.writeId(packet);
|
||||
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_textType.getClientId());
|
||||
if (_charName != null)
|
||||
packet.writeD(_sender == null ? 0 : _sender.getObjectId());
|
||||
packet.writeD(_chatType.getClientId());
|
||||
if (_senderName != null)
|
||||
{
|
||||
packet.writeS(_charName);
|
||||
packet.writeS(_senderName);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(_charId);
|
||||
}
|
||||
packet.writeD(_npcString); // High Five NPCString ID
|
||||
packet.writeD(_messageId); // High Five NPCString ID
|
||||
if (_text != null)
|
||||
{
|
||||
packet.writeS(_text);
|
||||
if ((_charLevel > 0) && (_textType == ChatType.WHISPER))
|
||||
if ((_sender != null) && (_sender.isPlayer() || _sender.isFakePlayer()) && (_chatType == ChatType.WHISPER))
|
||||
{
|
||||
packet.writeC(_mask);
|
||||
if ((_mask & 0x10) == 0)
|
||||
{
|
||||
packet.writeC(_charLevel);
|
||||
packet.writeC(_sender.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -199,7 +159,7 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
player.broadcastSnoop(_textType, _charName, _text);
|
||||
player.broadcastSnoop(_chatType, _senderName, _text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class Broadcast
|
||||
|
||||
public static void toAllOnlinePlayers(String text, boolean isCritical)
|
||||
{
|
||||
toAllOnlinePlayers(new CreatureSay(0, isCritical ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, "", text));
|
||||
toAllOnlinePlayers(new CreatureSay(null, isCritical ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, "", text));
|
||||
}
|
||||
|
||||
public static void toAllOnlinePlayersOnScreen(String text)
|
||||
|
@ -41,7 +41,7 @@ public class BuilderUtil
|
||||
{
|
||||
if (Config.GM_STARTUP_BUILDER_HIDE)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "SYS", message));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.GENERAL, "SYS", message));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -56,7 +56,7 @@ public class BuilderUtil
|
||||
*/
|
||||
public static void sendHtmlMessage(PlayerInstance player, String message)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "HTML", message));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.GENERAL, "HTML", message));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,8 +95,7 @@ public class PolymorphingOnAttack extends AbstractNpcAI
|
||||
if (tmp.get(3) >= 0)
|
||||
{
|
||||
final NpcStringId npcString = MOBTEXTS[tmp.get(3)][getRandom(MOBTEXTS[tmp.get(3)].length)];
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), npcString));
|
||||
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, npcString));
|
||||
}
|
||||
npc.deleteMe();
|
||||
final Attackable newNpc = (Attackable) addSpawn(tmp.get(0), npc.getX(), npc.getY(), npc.getZ() + 10, npc.getHeading(), false, 0, true);
|
||||
|
@ -380,7 +380,7 @@ public class Race extends Event
|
||||
|
||||
private void sendMessage(PlayerInstance player, String text)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(_npc.getObjectId(), ChatType.MPCC_ROOM, _npc.getName(), text));
|
||||
player.sendPacket(new CreatureSay(_npc, ChatType.MPCC_ROOM, _npc.getName(), text));
|
||||
}
|
||||
|
||||
private void showMenu(PlayerInstance player)
|
||||
|
@ -123,7 +123,7 @@ public class FreyaCelebration extends LongTimeEvent
|
||||
{
|
||||
if (getRandom(100) < 5)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
|
||||
final CreatureSay cs = new CreatureSay(npc, ChatType.NPC_GENERAL, NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
|
||||
cs.addStringParameter(caster.getName());
|
||||
|
||||
npc.broadcastPacket(cs);
|
||||
@ -132,7 +132,7 @@ public class FreyaCelebration extends LongTimeEvent
|
||||
}
|
||||
else if (getRandom(10) < 2)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), getRandomEntry(FREYA_TEXT)));
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, getRandomEntry(FREYA_TEXT)));
|
||||
}
|
||||
}
|
||||
return super.onSkillSee(npc, caster, skill, targets, isSummon);
|
||||
|
@ -296,7 +296,7 @@ public class AdminAdmin implements IAdminCommandHandler
|
||||
sb.append(" ");
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, sb.toString());
|
||||
final CreatureSay cs = new CreatureSay(activeChar, ChatType.WORLD, activeChar.getName(), sb.toString());
|
||||
World.getInstance().getPlayers().stream().filter(activeChar::isNotBlocked).forEach(cs::sendTo);
|
||||
break;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public class AdminGmChat implements IAdminCommandHandler
|
||||
offset = 13;
|
||||
}
|
||||
text = command.substring(offset);
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.ALLIANCE, activeChar.getName(), text);
|
||||
AdminData.getInstance().broadcastToGMs(cs);
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
|
@ -53,7 +53,7 @@ public class AdminTargetSay implements IAdminCommandHandler
|
||||
|
||||
final String message = command.substring(16);
|
||||
final Creature target = (Creature) obj;
|
||||
target.broadcastPacket(new CreatureSay(target.getObjectId(), target.isPlayer() ? ChatType.GENERAL : ChatType.NPC_GENERAL, target.getName(), message));
|
||||
target.broadcastPacket(new CreatureSay(target, target.isPlayer() ? ChatType.GENERAL : ChatType.NPC_GENERAL, target.getName(), message));
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ public class FindPvP implements IBypassHandler
|
||||
|
||||
if (biggestAllyId == allyId)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -139,7 +139,7 @@ public class FindPvP implements IBypassHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class ChatAlliance implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getClan().broadcastToOnlineAllyMembers(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text));
|
||||
activeChar.getClan().broadcastToOnlineAllyMembers(new CreatureSay(activeChar, type, activeChar.getName(), text));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,7 +54,7 @@ public class ChatClan implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getClan().broadcastCSToOnlineMembers(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getClan().broadcastCSToOnlineMembers(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,8 +87,8 @@ public class ChatGeneral implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getAppearance().getVisibleName(), text);
|
||||
final CreatureSay csRandom = new CreatureSay(activeChar.getObjectId(), type, activeChar.getAppearance().getVisibleName(), ChatRandomizer.randomize(text));
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getAppearance().getVisibleName(), text);
|
||||
final CreatureSay csRandom = new CreatureSay(activeChar, type, activeChar.getAppearance().getVisibleName(), ChatRandomizer.randomize(text));
|
||||
World.getInstance().forEachVisibleObjectInRange(activeChar, PlayerInstance.class, 1250, player ->
|
||||
{
|
||||
if ((player != null) && !BlockList.isBlocked(player, activeChar))
|
||||
|
@ -62,7 +62,7 @@ public class ChatHeroVoice implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
for (PlayerInstance player : World.getInstance().getPlayers())
|
||||
{
|
||||
if ((player != null) && !BlockList.isBlocked(player, activeChar))
|
||||
|
@ -54,7 +54,7 @@ public class ChatParty implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +53,7 @@ public class ChatPartyMatchRoom implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
for (PlayerInstance _member : room.getMembers())
|
||||
{
|
||||
if (Config.FACTION_SYSTEM_ENABLED)
|
||||
|
@ -50,7 +50,7 @@ public class ChatPartyRoomAll implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class ChatPartyRoomCommander implements IChatHandler
|
||||
activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED);
|
||||
return;
|
||||
}
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text), activeChar);
|
||||
activeChar.getParty().getCommandChannel().broadcastCreatureSay(new CreatureSay(activeChar, type, activeChar.getName(), text), activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class ChatShout implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS)))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);
|
||||
|
@ -58,7 +58,7 @@ public class ChatTrade implements IChatHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS)))
|
||||
{
|
||||
final int region = MapRegionManager.getInstance().getMapRegionLocId(activeChar);
|
||||
|
@ -93,7 +93,7 @@ public class ChatWorld implements IChatHandler
|
||||
}
|
||||
}
|
||||
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, text);
|
||||
final CreatureSay cs = new CreatureSay(activeChar, type, activeChar.getName(), text);
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_SPECIFIC_CHAT)
|
||||
{
|
||||
if (activeChar.isGood())
|
||||
|
@ -52,7 +52,7 @@ public class GMChat implements ITelnetCommand
|
||||
{
|
||||
sb.append(str + " ");
|
||||
}
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(null, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
|
||||
return "GMChat sent!";
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class Msg implements ITelnetCommand
|
||||
{
|
||||
sb.append(args[i] + " ");
|
||||
}
|
||||
player.sendPacket(new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", sb.toString()));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.WHISPER, "Telnet Priv", sb.toString()));
|
||||
return "Announcement sent!";
|
||||
}
|
||||
return "Couldn't find player with such name.";
|
||||
|
@ -145,7 +145,7 @@ public class Q00457_LostAndFound extends Quest
|
||||
startQuestTimer("STOP", 1000, npc, player);
|
||||
startQuestTimer("BYE", 3000, npc, player);
|
||||
cancelQuestTimer("CHECK", npc, player);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.AH_FRESH_AIR));
|
||||
npc.broadcastPacket(new CreatureSay(npc, ChatType.NPC_GENERAL, NpcStringId.AH_FRESH_AIR));
|
||||
broadcastNpcSay(npc, player, NpcStringId.AH_FRESH_AIR, false);
|
||||
giveItems(player, PACKAGED_BOOK, 1);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
|
@ -138,29 +138,29 @@ public class BoatGludinRune implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY_2);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY_2);
|
||||
LEAVING_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
ARRIVAL_RUNE15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_RUNE15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
GLUDIN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GLUDIN_DOCK[0].getX(), GLUDIN_DOCK[0].getY(), GLUDIN_DOCK[0].getZ());
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
|
@ -94,17 +94,17 @@ public class BoatInnadrilTour implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
|
||||
ARRIVAL20 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL20 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
INNADRIL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), DOCK.getX(), DOCK.getY(), DOCK.getZ());
|
||||
}
|
||||
|
@ -90,13 +90,13 @@ public class BoatRunePrimeval implements Runnable
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
PRIMEVAL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), PRIMEVAL_DOCK.getX(), PRIMEVAL_DOCK.getY(), PRIMEVAL_DOCK.getZ());
|
||||
|
@ -110,9 +110,7 @@ public class AnnouncementsTable
|
||||
{
|
||||
if (announce.isValid() && (announce.getType() == type))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, //
|
||||
type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, //
|
||||
player.getName(), announce.getContent()));
|
||||
player.sendPacket(new CreatureSay(null, type == AnnouncementType.CRITICAL ? ChatType.CRITICAL_ANNOUNCE : ChatType.ANNOUNCEMENT, player.getName(), announce.getContent()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ public class FakePlayerChatManager implements IXmlReader
|
||||
final Npc npc = spawn.getLastSpawn();
|
||||
if (npc != null)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(npc, fpcName, ChatType.WHISPER, message));
|
||||
player.sendPacket(new CreatureSay(npc, ChatType.WHISPER, fpcName, message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ public class PetitionManager
|
||||
|
||||
if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
|
||||
{
|
||||
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||
cs = new CreatureSay(player, ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||
currPetition.addLogMessage(cs);
|
||||
|
||||
currPetition.sendResponderPacket(cs);
|
||||
@ -349,7 +349,7 @@ public class PetitionManager
|
||||
|
||||
if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
|
||||
{
|
||||
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_GM, player.getName(), messageText);
|
||||
cs = new CreatureSay(player, ChatType.PETITION_GM, player.getName(), messageText);
|
||||
currPetition.addLogMessage(cs);
|
||||
|
||||
currPetition.sendResponderPacket(cs);
|
||||
@ -423,7 +423,7 @@ public class PetitionManager
|
||||
|
||||
// Notify all GMs that a new petition has been submitted.
|
||||
final String msgContent = petitioner.getName() + " has submitted a new petition."; // (ID: " + newPetitionId + ").";
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(petitioner.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(petitioner, ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
|
||||
return newPetitionId;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ public class Attackable extends Npc
|
||||
_commandChannelTimer = new CommandChannelTimer(this);
|
||||
_commandChannelLastAttack = System.currentTimeMillis();
|
||||
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(null, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ public abstract class VoteSystem implements Runnable
|
||||
|
||||
private void announce(String msg)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
Broadcast.toAllOnlinePlayers(cs);
|
||||
}
|
||||
|
||||
|
@ -481,7 +481,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
|
||||
if ((Config.SERVER_RESTART_SCHEDULE_ENABLED) && (Config.SERVER_RESTART_SCHEDULE_MESSAGE))
|
||||
{
|
||||
player.sendPacket(new CreatureSay(2, ChatType.BATTLEFIELD, "[SERVER]", "Next restart is scheduled at " + ServerRestartManager.getInstance().getNextRestartTime() + "."));
|
||||
player.sendPacket(new CreatureSay(null, ChatType.BATTLEFIELD, "[SERVER]", "Next restart is scheduled at " + ServerRestartManager.getInstance().getNextRestartTime() + "."));
|
||||
}
|
||||
|
||||
if (showClanNotice)
|
||||
|
@ -80,7 +80,7 @@ public class RequestPetitionCancel implements IClientIncomingPacket
|
||||
|
||||
// Notify all GMs that the player's pending petition has been cancelled.
|
||||
final String msgContent = player.getName() + " has canceled a pending petition.";
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(player.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
AdminData.getInstance().broadcastToGMs(new CreatureSay(player, ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.instancemanager.MentorManager;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
@ -30,30 +30,29 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
||||
public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final ChatType _textType;
|
||||
private String _charName = null;
|
||||
private int _charId = 0;
|
||||
private final Creature _sender;
|
||||
private final ChatType _chatType;
|
||||
private String _senderName = null;
|
||||
private String _text = null;
|
||||
private int _npcString = -1;
|
||||
private int _charId = 0;
|
||||
private int _messageId = -1;
|
||||
private int _mask;
|
||||
private int _charLevel = -1;
|
||||
private List<String> _parameters;
|
||||
|
||||
/**
|
||||
* @param sender
|
||||
* @param receiver
|
||||
* @param name
|
||||
* @param messageType
|
||||
* @param chatType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(PlayerInstance sender, PlayerInstance receiver, String name, ChatType messageType, String text)
|
||||
public CreatureSay(PlayerInstance sender, PlayerInstance receiver, String name, ChatType chatType, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
_charLevel = sender.getLevel();
|
||||
_textType = messageType;
|
||||
_sender = sender;
|
||||
_senderName = name;
|
||||
_chatType = chatType;
|
||||
_text = text;
|
||||
|
||||
if (receiver != null)
|
||||
{
|
||||
if (receiver.getFriendList().contains(sender.getObjectId()))
|
||||
@ -81,66 +80,27 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by fake players.
|
||||
* @param sender
|
||||
* @param name
|
||||
* @param messageType
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(Npc sender, String name, ChatType messageType, String text)
|
||||
public CreatureSay(Creature sender, ChatType chatType, String senderName, String text)
|
||||
{
|
||||
_objectId = sender.getObjectId();
|
||||
_charName = name;
|
||||
_charLevel = sender.getLevel();
|
||||
_textType = messageType;
|
||||
_sender = sender;
|
||||
_chatType = chatType;
|
||||
_senderName = senderName;
|
||||
_text = text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param objectId
|
||||
* @param messageType
|
||||
* @param charName
|
||||
* @param text
|
||||
*/
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, String text)
|
||||
public CreatureSay(Creature sender, ChatType chatType, NpcStringId npcStringId)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charName = charName;
|
||||
_text = text;
|
||||
_sender = sender;
|
||||
_chatType = chatType;
|
||||
_messageId = npcStringId.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(PlayerInstance player, ChatType messageType, String text)
|
||||
public CreatureSay(ChatType chatType, int charId, SystemMessageId systemMessageId)
|
||||
{
|
||||
_objectId = player.getObjectId();
|
||||
_textType = messageType;
|
||||
_charName = player.getAppearance().getVisibleName();
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_sender = null;
|
||||
_chatType = chatType;
|
||||
_charId = charId;
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, String charName, NpcStringId npcString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charName = charName;
|
||||
_npcString = npcString.getId();
|
||||
}
|
||||
|
||||
public CreatureSay(int objectId, ChatType messageType, int charId, SystemMessageId sysString)
|
||||
{
|
||||
_objectId = objectId;
|
||||
_textType = messageType;
|
||||
_charId = charId;
|
||||
_npcString = sysString.getId();
|
||||
_messageId = systemMessageId.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,26 +121,26 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.SAY2.writeId(packet);
|
||||
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_textType.getClientId());
|
||||
if (_charName != null)
|
||||
packet.writeD(_sender == null ? 0 : _sender.getObjectId());
|
||||
packet.writeD(_chatType.getClientId());
|
||||
if (_senderName != null)
|
||||
{
|
||||
packet.writeS(_charName);
|
||||
packet.writeS(_senderName);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(_charId);
|
||||
}
|
||||
packet.writeD(_npcString); // High Five NPCString ID
|
||||
packet.writeD(_messageId); // High Five NPCString ID
|
||||
if (_text != null)
|
||||
{
|
||||
packet.writeS(_text);
|
||||
if ((_charLevel > 0) && (_textType == ChatType.WHISPER))
|
||||
if ((_sender != null) && (_sender.isPlayer() || _sender.isFakePlayer()) && (_chatType == ChatType.WHISPER))
|
||||
{
|
||||
packet.writeC(_mask);
|
||||
if ((_mask & 0x10) == 0)
|
||||
{
|
||||
packet.writeC(_charLevel);
|
||||
packet.writeC(_sender.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -199,7 +159,7 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
player.broadcastSnoop(_textType, _charName, _text);
|
||||
player.broadcastSnoop(_chatType, _senderName, _text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user