diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Benom.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Benom.java
index 7fd34cc6e1..e69ab8244f 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Benom.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Benom.java
@@ -21,6 +21,7 @@ import java.util.Collection;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.datatables.xml.DoorData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
import org.l2jmobius.gameserver.model.Location;
@@ -282,7 +283,7 @@ public class Benom extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, "Benom", TALK[Rnd.get(4)]));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, "Benom", TALK[Rnd.get(4)]));
}
break;
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java
index a75966e74e..d96755cd88 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
import org.l2jmobius.gameserver.model.Location;
@@ -203,14 +204,14 @@ public class Core extends Quest
{
if (Rnd.get(100) == 0)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Removing intruders."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Removing intruders."));
}
}
else
{
_firstAttacked = true;
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "A non-permitted target has been discovered."));
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Starting intruder removal system."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "A non-permitted target has been discovered."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Starting intruder removal system."));
}
}
return super.onAttack(npc, attacker, damage, isPet);
@@ -224,9 +225,9 @@ public class Core extends Quest
if (npcId == CORE)
{
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "A fatal error has occurred."));
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "System is being shut down..."));
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "......"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "A fatal error has occurred."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "System is being shut down..."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "......"));
_firstAttacked = false;
addSpawn(31842, 16502, 110165, -6394, 0, false, 900000);
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Frintezza.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Frintezza.java
index 5574a86ee4..db4c6da71d 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Frintezza.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Frintezza.java
@@ -24,6 +24,7 @@ import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.datatables.SkillTable;
import org.l2jmobius.gameserver.datatables.xml.DoorData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
import org.l2jmobius.gameserver.model.CommandChannel;
import org.l2jmobius.gameserver.model.Party;
@@ -1363,7 +1364,7 @@ public class Frintezza extends Quest
}
else if (event.equals("room_final"))
{
- _zone.broadcastPacket(new CreatureSay(npc.getObjectId(), 1, npc.getName(), "Exceeded his time limit, challenge failed!"));
+ _zone.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.SHOUT, npc.getName(), "Exceeded his time limit, challenge failed!"));
_zone.oustAllPlayers();
cancelQuestTimer("waiting", npc, null);
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/CatsEyeBandit.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/CatsEyeBandit.java
index 0a30fedfcf..c0bf59dac8 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/CatsEyeBandit.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/CatsEyeBandit.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -46,7 +47,7 @@ public class CatsEyeBandit extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You childish fool, do you think you can catch me?"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You childish fool, do you think you can catch me?"));
}
}
else
@@ -61,7 +62,7 @@ public class CatsEyeBandit extends Quest
{
if (Rnd.get(100) < 80)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "I must do something about this shameful incident..."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "I must do something about this shameful incident..."));
}
return super.onKill(npc, killer, isPet);
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialAgent.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialAgent.java
index 2295c5aeb2..90d4c04af5 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialAgent.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialAgent.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,13 +46,13 @@ public class DeluLizardmanSpecialAgent extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Hey! We're having a duel here!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Hey! We're having a duel here!"));
}
}
else
{
npc.setScriptValue(1);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "How dare you interrupt our fight! Hey guys, help!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "How dare you interrupt our fight! Hey guys, help!"));
}
return super.onAttack(npc, attacker, damage, isPet);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialCommander.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialCommander.java
index b2037815d2..c9028621dd 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialCommander.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/DeluLizardmanSpecialCommander.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,13 +46,13 @@ public class DeluLizardmanSpecialCommander extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Come on, Ill take you on!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Come on, Ill take you on!"));
}
}
else
{
npc.setScriptValue(1);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "How dare you interrupt a sacred duel! You must be taught a lesson!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "How dare you interrupt a sacred duel! You must be taught a lesson!"));
}
return super.onAttack(npc, attacker, damage, isPet);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java
index 50ec76d62e..abde65a8dc 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java
@@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.idfactory.IdFactory;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Attackable;
@@ -416,7 +417,7 @@ public class FeedableBeasts extends Quest
final int rand = Rnd.get(20);
if (rand < 5)
{
- npc.broadcastPacket(new CreatureSay(nextNpc.getObjectId(), 0, nextNpc.getName(), SPAWN_CHATS[rand].replace("$s1", player.getName())));
+ npc.broadcastPacket(new CreatureSay(nextNpc.getObjectId(), ChatType.GENERAL, nextNpc.getName(), SPAWN_CHATS[rand].replace("$s1", player.getName())));
}
}
else
@@ -523,7 +524,7 @@ public class FeedableBeasts extends Quest
// Rare random talk...
if (Rnd.get(20) == 0)
{
- npc.broadcastPacket(new CreatureSay(objectId, 0, npc.getName(), TEXT[growthLevel][Rnd.get(TEXT[growthLevel].length)]));
+ npc.broadcastPacket(new CreatureSay(objectId, ChatType.GENERAL, npc.getName(), TEXT[growthLevel][Rnd.get(TEXT[growthLevel].length)]));
}
if ((growthLevel > 0) && (FEED_INFO.getOrDefault(objectId, 0) != caster.getObjectId()))
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/KarulBugbear.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/KarulBugbear.java
index 9346748d4d..2b9aca6748 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/KarulBugbear.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/KarulBugbear.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,7 +46,7 @@ public class KarulBugbear extends Quest
{
if (Rnd.get(100) < 4)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Your rear is practically unguarded!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Your rear is practically unguarded!"));
}
}
else
@@ -53,7 +54,7 @@ public class KarulBugbear extends Quest
npc.setScriptValue(1);
if (Rnd.get(100) < 4)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Watch your back!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Watch your back!"));
}
}
return super.onAttack(npc, attacker, damage, isPet);
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Monastery.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Monastery.java
index a03aaf9473..98af9f30d9 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Monastery.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Monastery.java
@@ -23,6 +23,7 @@ import java.util.List;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.datatables.SkillTable;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.Skill.SkillType;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -75,7 +76,7 @@ public class Monastery extends Quest
if ((player.getActiveWeaponInstance() != null) && !player.isSilentMoving())
{
npc.setTarget(player);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), TEXT[0]));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), TEXT[0]));
switch (npc.getNpcId())
{
@@ -132,7 +133,7 @@ public class Monastery extends Quest
if ((target.getActiveWeaponInstance() != null) && !npc.isInCombat() && (npc.getTarget() == null))
{
npc.setTarget(target);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), TEXT[0]));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), TEXT[0]));
switch (npc.getNpcId())
{
case 22124:
@@ -171,7 +172,7 @@ public class Monastery extends Quest
if (Util.contains(MOBS_2, npc.getNpcId()) && (skill.getSkillType() == SkillType.AGGDAMAGE))
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), TEXT[Rnd.get(2) + 1].replace("name", player.getName())));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), TEXT[Rnd.get(2) + 1].replace("name", player.getName())));
((Attackable) npc).addDamageHate(player, 0, 999);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/OlMahumGeneral.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/OlMahumGeneral.java
index fe447cafb2..d6f5376a8e 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/OlMahumGeneral.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/OlMahumGeneral.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,13 +46,13 @@ public class OlMahumGeneral extends Quest
{
if (Rnd.get(100) < 10)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "We shall see about that!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "We shall see about that!"));
}
}
else
{
npc.setScriptValue(1);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "I will definitely repay this humiliation!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "I will definitely repay this humiliation!"));
}
return super.onAttack(npc, attacker, damage, isPet);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/RetreatOnAttack.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/RetreatOnAttack.java
index fce487d826..88d1428bcd 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/RetreatOnAttack.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/RetreatOnAttack.java
@@ -18,6 +18,7 @@ package ai.others;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
@@ -68,7 +69,7 @@ public class RetreatOnAttack extends Quest
{
if (npcId == OL_MAHUM_GUARD)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), OL_MAHUM_GUARD_TEXT[Rnd.get(OL_MAHUM_GUARD_TEXT.length)]));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), OL_MAHUM_GUARD_TEXT[Rnd.get(OL_MAHUM_GUARD_TEXT.length)]));
}
int posX = npc.getX();
int posY = npc.getY();
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/SummonMinions.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/SummonMinions.java
index f6803aed16..b4390d5f78 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/SummonMinions.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/SummonMinions.java
@@ -26,6 +26,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -243,7 +244,7 @@ public class SummonMinions extends Quest
}
if (npcId == 20767)
{
- npc.broadcastPacket(new CreatureSay(npcObjId, 0, npc.getName(), "Come out, you children of darkness!"));
+ npc.broadcastPacket(new CreatureSay(npcObjId, ChatType.GENERAL, npc.getName(), "Come out, you children of darkness!"));
}
}
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcOverlord.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcOverlord.java
index 24283d4717..4211df4dca 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcOverlord.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcOverlord.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,7 +46,7 @@ public class TimakOrcOverlord extends Quest
{
if (Rnd.get(100) < 50)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Dear ultimate power!!!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Dear ultimate power!!!"));
}
}
else
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcTroopLeader.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcTroopLeader.java
index 36f8e3a3b6..8954cfa896 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcTroopLeader.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TimakOrcTroopLeader.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,7 +46,7 @@ public class TimakOrcTroopLeader extends Quest
{
if (Rnd.get(100) < 50)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Destroy the enemy, my brothers!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Destroy the enemy, my brothers!"));
}
}
else
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Transform.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Transform.java
index fa03f205f5..9d63d6e301 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Transform.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/Transform.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
@@ -146,7 +147,7 @@ public class Transform extends Quest
{
if (monster.getMessage() != 0)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), Message[Rnd.get(monster.getMessage())]));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), Message[Rnd.get(monster.getMessage())]));
}
npc.onDecay();
final Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
@@ -176,7 +177,7 @@ public class Transform extends Quest
{
if (monster.getMessage() != 0)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), Message[Rnd.get(monster.getMessage())]));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), Message[Rnd.get(monster.getMessage())]));
}
final Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
final Creature originalAttacker = isPet ? killer.getPet() : killer;
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcFootman.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcFootman.java
index 0543a528b3..8d369bfaca 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcFootman.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcFootman.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,13 +46,13 @@ public class TurekOrcFootman extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "There is no reason for you to kill me! I have nothing you need!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "There is no reason for you to kill me! I have nothing you need!"));
}
}
else
{
npc.setScriptValue(1);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "We shall see about that!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "We shall see about that!"));
}
return super.onAttack(npc, attacker, damage, isPet);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcSupplier.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcSupplier.java
index f69e10d763..409be318a5 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcSupplier.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcSupplier.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,13 +46,13 @@ public class TurekOrcSupplier extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You wont take me down easily."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You wont take me down easily."));
}
}
else
{
npc.setScriptValue(1);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "We shall see about that!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "We shall see about that!"));
}
return super.onAttack(npc, attacker, damage, isPet);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcWarlord.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcWarlord.java
index 27584cd464..57f9218e3d 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcWarlord.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/TurekOrcWarlord.java
@@ -17,6 +17,7 @@
package ai.others;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -45,13 +46,13 @@ public class TurekOrcWarlord extends Quest
{
if (Rnd.get(100) < 40)
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You wont take me down easily."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You wont take me down easily."));
}
}
else
{
npc.setScriptValue(1);
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "The battle has just begun!"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "The battle has just begun!"));
}
return super.onAttack(npc, attacker, damage, isPet);
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q024_InhabitantsOfTheForrestOfTheDead/Q024_InhabitantsOfTheForrestOfTheDead.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q024_InhabitantsOfTheForrestOfTheDead/Q024_InhabitantsOfTheForrestOfTheDead.java
index b52e89b33b..92345e7052 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q024_InhabitantsOfTheForrestOfTheDead/Q024_InhabitantsOfTheForrestOfTheDead.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q024_InhabitantsOfTheForrestOfTheDead/Q024_InhabitantsOfTheForrestOfTheDead.java
@@ -16,6 +16,7 @@
*/
package quests.Q024_InhabitantsOfTheForrestOfTheDead;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -275,7 +276,7 @@ public class Q024_InhabitantsOfTheForrestOfTheDead extends Quest
for (PlayerInstance nearby : npc.getKnownList().getKnownPlayers().values())
{
- nearby.sendPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "That sign!"));
+ nearby.sendPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "That sign!"));
}
}
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q025_HidingBehindTheTruth/Q025_HidingBehindTheTruth.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q025_HidingBehindTheTruth/Q025_HidingBehindTheTruth.java
index 0c89b83e72..251f9627d1 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q025_HidingBehindTheTruth/Q025_HidingBehindTheTruth.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q025_HidingBehindTheTruth/Q025_HidingBehindTheTruth.java
@@ -17,6 +17,7 @@
package quests.Q025_HidingBehindTheTruth;
import org.l2jmobius.gameserver.ai.CtrlIntention;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Attackable;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -123,7 +124,7 @@ public class Q025_HidingBehindTheTruth extends Quest
{
qs.set("step", "1");
final NpcInstance triol = qs.addSpawn(TRIOL, 59712, -47568, -2712, 300000);
- triol.broadcastPacket(new CreatureSay(triol.getObjectId(), 0, triol.getName(), "That box was sealed by my master. Don't touch it!"));
+ triol.broadcastPacket(new CreatureSay(triol.getObjectId(), ChatType.GENERAL, triol.getName(), "That box was sealed by my master. Don't touch it!"));
triol.setRunning();
((Attackable) triol).addDamageHate(player, 0, 999);
triol.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
@@ -438,7 +439,7 @@ public class Q025_HidingBehindTheTruth extends Quest
{
qs.playSound("ItemSound.quest_itemget");
qs.set("cond", "8");
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You've ended my immortal life! You've protected by the feudal lord, aren't you?"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You've ended my immortal life! You've protected by the feudal lord, aren't you?"));
qs.giveItems(TOTEM_DOLL, 1);
qs.set("step", "2");
}
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q115_TheOtherSideOfTruth/Q115_TheOtherSideOfTruth.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q115_TheOtherSideOfTruth/Q115_TheOtherSideOfTruth.java
index a56005884a..cdbe2f23fc 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q115_TheOtherSideOfTruth/Q115_TheOtherSideOfTruth.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q115_TheOtherSideOfTruth/Q115_TheOtherSideOfTruth.java
@@ -16,6 +16,7 @@
*/
package quests.Q115_TheOtherSideOfTruth;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
@@ -141,7 +142,7 @@ public class Q115_TheOtherSideOfTruth extends Quest
qs.playSound("ItemSound.quest_middle");
qs.set("cond", "9");
final NpcInstance man = qs.addSpawn(SUSPICIOUS, 104562, -107598, -3688, 0, false, 4000);
- man.broadcastPacket(new CreatureSay(man.getObjectId(), 0, man.getName(), "We meet again."));
+ man.broadcastPacket(new CreatureSay(man.getObjectId(), ChatType.GENERAL, man.getName(), "We meet again."));
startQuestTimer("2", 3700, man, player);
qs.giveItems(REPORT, 1);
break;
@@ -158,7 +159,7 @@ public class Q115_TheOtherSideOfTruth extends Quest
qs.playSound("ItemSound.quest_middle");
qs.set("cond", "8");
final NpcInstance man = qs.addSpawn(SUSPICIOUS, 117890, -126478, -2584, 0, false, 4000);
- man.broadcastPacket(new CreatureSay(man.getObjectId(), 0, man.getName(), "This looks like the right place..."));
+ man.broadcastPacket(new CreatureSay(man.getObjectId(), ChatType.GENERAL, man.getName(), "This looks like the right place..."));
startQuestTimer("1", 3700, man, player);
htmltext = "Sculpture-04.htm";
if ((qs.getInt("" + SCULPTURE1) == 0) && (qs.getInt("" + SCULPTURE2) == 0))
@@ -174,12 +175,12 @@ public class Q115_TheOtherSideOfTruth extends Quest
}
case "1":
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "I see someone. Is this fate?"));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "I see someone. Is this fate?"));
break;
}
case "2":
{
- npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Don't bother trying to find out more about me. Follow your own destiny."));
+ npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Don't bother trying to find out more about me. Follow your own destiny."));
break;
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/enums/ChatType.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/enums/ChatType.java
new file mode 100644
index 0000000000..23d036b0cf
--- /dev/null
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/enums/ChatType.java
@@ -0,0 +1,75 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package org.l2jmobius.gameserver.enums;
+
+/**
+ * @author St3eT
+ */
+public enum ChatType
+{
+ GENERAL(0),
+ SHOUT(1),
+ WHISPER(2),
+ PARTY(3),
+ CLAN(4),
+ GM(5),
+ PETITION_PLAYER(6),
+ PETITION_GM(7),
+ TRADE(8),
+ ALLIANCE(9),
+ ANNOUNCEMENT(10),
+ BOAT(11),
+ FRIEND(12),
+ MSNCHAT(13),
+ PARTYMATCH_ROOM(14),
+ PARTYROOM_COMMANDER(15),
+ PARTYROOM_ALL(16),
+ HERO_VOICE(17),
+ CRITICAL_ANNOUNCE(18);
+
+ private final int _clientId;
+
+ private ChatType(int clientId)
+ {
+ _clientId = clientId;
+ }
+
+ /**
+ * @return the client id.
+ */
+ public int getClientId()
+ {
+ return _clientId;
+ }
+
+ /**
+ * Finds the {@code ChatType} by its clientId
+ * @param clientId the clientId
+ * @return the {@code ChatType} if its found, {@code null} otherwise.
+ */
+ public static ChatType findByClientId(int clientId)
+ {
+ for (ChatType ChatType : values())
+ {
+ if (ChatType.getClientId() == clientId)
+ {
+ return ChatType;
+ }
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/AutoChatHandler.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/AutoChatHandler.java
index f1df7e1d05..8153a41276 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/AutoChatHandler.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/AutoChatHandler.java
@@ -30,6 +30,7 @@ import java.util.logging.Logger;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.commons.util.Rnd;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -787,7 +788,7 @@ public class AutoChatHandler implements SpawnListener
return;
}
- final CreatureSay cs = new CreatureSay(chatNpc.getObjectId(), 0, creatureName, text);
+ final CreatureSay cs = new CreatureSay(chatNpc.getObjectId(), ChatType.GENERAL, creatureName, text);
for (PlayerInstance nearbyPlayer : nearbyPlayers)
{
nearbyPlayer.sendPacket(cs);
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java
index 4a47af8be3..05399df8f1 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java
@@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.handler.admincommandhandlers;
import java.util.StringTokenizer;
import org.l2jmobius.Config;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.handler.AutoAnnouncementHandler;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.entity.Announcements;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.util.Broadcast;
import org.l2jmobius.gameserver.util.BuilderUtil;
@@ -156,7 +156,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
{
text1 = activeChar.getName() + ": " + text1;
}
- Broadcast.toAllOnlinePlayers(new CreatureSay(activeChar.getObjectId(), Say2.CRITICAL_ANNOUNCE, "", text1));
+ Broadcast.toAllOnlinePlayers(new CreatureSay(activeChar.getObjectId(), ChatType.CRITICAL_ANNOUNCE, "", text1));
return true;
}
case "admin_list_autoannouncements":
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java
index 9da0f9701c..877ca29c39 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java
@@ -16,7 +16,7 @@
*/
package org.l2jmobius.gameserver.handler.admincommandhandlers;
-import org.l2jmobius.gameserver.datatables.xml.AdminData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -102,21 +102,15 @@ public class AdminGmChat implements IAdminCommandHandler
{
try
{
- int offset = 0;
-
- String text;
-
- if (command.contains("menu"))
+ final int offset = command.contains("menu") ? 17 : 13;
+ final String text = command.substring(offset);
+ for (PlayerInstance player : World.getInstance().getAllPlayers())
{
- offset = 17;
+ if (player.isGM())
+ {
+ player.sendPacket(new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text));
+ }
}
- else
- {
- offset = 13;
- }
-
- text = command.substring(offset);
- AdminData.broadcastToGMs(new CreatureSay(0, 9, activeChar.getName(), text));
}
catch (StringIndexOutOfBoundsException e)
{
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminTownWar.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminTownWar.java
index eee1f880b6..12c7a8f5df 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminTownWar.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/admincommandhandlers/AdminTownWar.java
@@ -104,15 +104,15 @@ public class AdminTownWar implements IAdminCommandHandler
// Announce for all towns
if (Config.TW_ALL_TOWNS)
{
- Announcements.getInstance().gameAnnounceToAll("Town War Event!");
- Announcements.getInstance().gameAnnounceToAll("All towns have been set to war zone by " + activeChar.getName() + ".");
+ Announcements.getInstance().criticalAnnounceToAll("Town War Event!");
+ Announcements.getInstance().criticalAnnounceToAll("All towns have been set to war zone by " + activeChar.getName() + ".");
}
// Announce for one town
if (!Config.TW_ALL_TOWNS)
{
- Announcements.getInstance().gameAnnounceToAll("Town War Event!");
- Announcements.getInstance().gameAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set to war zone by " + activeChar.getName() + ".");
+ Announcements.getInstance().criticalAnnounceToAll("Town War Event!");
+ Announcements.getInstance().criticalAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set to war zone by " + activeChar.getName() + ".");
}
}
@@ -179,13 +179,13 @@ public class AdminTownWar implements IAdminCommandHandler
// Announce for all towns
if (Config.TW_ALL_TOWNS)
{
- Announcements.getInstance().gameAnnounceToAll("All towns have been set back to normal by " + activeChar.getName() + ".");
+ Announcements.getInstance().criticalAnnounceToAll("All towns have been set back to normal by " + activeChar.getName() + ".");
}
// Announce for one town
if (!Config.TW_ALL_TOWNS)
{
- Announcements.getInstance().gameAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set back to normal by " + activeChar.getName() + ".");
+ Announcements.getInstance().criticalAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set back to normal by " + activeChar.getName() + ".");
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/ChristmasManager.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/ChristmasManager.java
index 8ccb0f65c5..508802ed8c 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/ChristmasManager.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/ChristmasManager.java
@@ -26,6 +26,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.gameserver.datatables.ItemTable;
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.idfactory.IdFactory;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.WorldObject;
@@ -545,7 +546,7 @@ public class ChristmasManager
*/
protected CreatureSay getXMasMessage()
{
- return new CreatureSay(0, 17, getRandomSender(), getRandomXMasMessage());
+ return new CreatureSay(0, ChatType.HERO_VOICE, getRandomSender(), getRandomXMasMessage());
}
/**
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/PetitionManager.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/PetitionManager.java
index aae9dabbcd..5ea0243138 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/PetitionManager.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/instancemanager/PetitionManager.java
@@ -26,10 +26,10 @@ import java.util.logging.Logger;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.datatables.xml.AdminData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.idfactory.IdFactory;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
@@ -507,7 +507,7 @@ public class PetitionManager
if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
{
- cs = new CreatureSay(player.getObjectId(), Say2.PETITION_PLAYER, player.getName(), messageText);
+ cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_PLAYER, player.getName(), messageText);
currPetition.addLogMessage(cs);
currPetition.sendResponderPacket(cs);
@@ -518,7 +518,7 @@ public class PetitionManager
if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
{
- cs = new CreatureSay(player.getObjectId(), Say2.PETITION_GM, player.getName(), messageText);
+ cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_GM, player.getName(), messageText);
currPetition.addLogMessage(cs);
currPetition.sendResponderPacket(cs);
@@ -580,7 +580,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.broadcastToGMs(new CreatureSay(petitioner.getObjectId(), 17, "Petition System", msgContent));
+ AdminData.broadcastToGMs(new CreatureSay(petitioner.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
return newPetitionId;
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java
index ba4323eaa1..9b6f16b8b1 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java
@@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.ai.FortSiegeGuardAI;
import org.l2jmobius.gameserver.ai.SiegeGuardAI;
import org.l2jmobius.gameserver.datatables.ItemTable;
import org.l2jmobius.gameserver.datatables.xml.ManorSeedData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
import org.l2jmobius.gameserver.model.CommandChannel;
import org.l2jmobius.gameserver.model.DropCategory;
@@ -60,7 +61,6 @@ import org.l2jmobius.gameserver.model.quest.EventType;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -454,7 +454,7 @@ public class Attackable extends NpcInstance
_commandChannelTimer = new CommandChannelTimer(this);
_commandChannelLastAttack = System.currentTimeMillis();
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
- _firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
+ _firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
}
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
index c29b9d9720..0b3ed6d14a 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java
@@ -231,16 +231,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
}
}
- /**
- * This will return true if the player is GM,
- * but if the player is not GM it will return false.
- * @return GM status
- */
- public boolean charIsGM()
- {
- return (this instanceof PlayerInstance) && ((PlayerInstance) this).isGM();
- }
-
/**
* Constructor of Creature.
*
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/BoatInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/BoatInstance.java
index 529eefabf8..e10e470323 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/BoatInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/BoatInstance.java
@@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.gameserver.GameTimeController;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.knownlist.BoatKnownList;
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
@@ -30,7 +31,6 @@ import org.l2jmobius.gameserver.model.holders.BoatPathHolder;
import org.l2jmobius.gameserver.model.holders.BoatPathHolder.BoatPoint;
import org.l2jmobius.gameserver.model.items.Weapon;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.OnVehicleCheckLocation;
@@ -263,11 +263,11 @@ public class BoatInstance extends Creature
{
if (cycle == 1)
{
- sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess10);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess10);
}
else
{
- sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess10);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess10);
}
ps = new PlaySound(0, "itemsound.ship_arrival_departure", this);
if ((knownPlayers == null) || knownPlayers.isEmpty())
@@ -287,11 +287,11 @@ public class BoatInstance extends Creature
{
if (cycle == 1)
{
- sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess5);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess5);
}
else
{
- sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess5);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess5);
}
ps = new PlaySound(0, "itemsound.ship_5min", this);
if ((knownPlayers == null) || knownPlayers.isEmpty())
@@ -309,11 +309,11 @@ public class BoatInstance extends Creature
{
if (cycle == 1)
{
- sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess1);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess1);
}
else
{
- sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess1);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess1);
}
ps = new PlaySound(0, "itemsound.ship_1min", this);
if ((knownPlayers == null) || knownPlayers.isEmpty())
@@ -331,11 +331,11 @@ public class BoatInstance extends Creature
{
if (cycle == 1)
{
- sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess0);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess0);
}
else
{
- sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess0);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess0);
}
if ((knownPlayers == null) || knownPlayers.isEmpty())
{
@@ -351,11 +351,11 @@ public class BoatInstance extends Creature
{
if (cycle == 1)
{
- sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmessb);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmessb);
}
else
{
- sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmessb);
+ sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmessb);
}
ps = new PlaySound(0, "itemsound.ship_arrival_departure", this);
for (PlayerInstance player : knownPlayers)
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcInstance.java
index 527e0ca797..4fdb8ba982 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcInstance.java
@@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.datatables.sql.ClanTable;
import org.l2jmobius.gameserver.datatables.sql.HelperBuffTable;
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.idfactory.IdFactory;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.CustomNpcInstanceManager;
@@ -79,7 +80,6 @@ import org.l2jmobius.gameserver.model.spawn.Spawn;
import org.l2jmobius.gameserver.model.zone.type.TownZone;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.network.serverpackets.ExShowVariationCancelWindow;
@@ -1929,7 +1929,7 @@ public class NpcInstance extends Creature
*/
public void broadcastNpcSay(String message)
{
- broadcastPacket(new CreatureSay(getObjectId(), Say2.ALL, getName(), message));
+ broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), message));
}
/**
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcWalkerInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcWalkerInstance.java
index 15efbf2315..6e2e675372 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcWalkerInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/NpcWalkerInstance.java
@@ -20,6 +20,7 @@ import java.util.Map;
import org.l2jmobius.gameserver.ai.CreatureAI;
import org.l2jmobius.gameserver.ai.NpcWalkerAI;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
@@ -81,7 +82,7 @@ public class NpcWalkerInstance extends NpcInstance
// we send message to known players only!
if (!knownPlayers.isEmpty())
{
- final CreatureSay cs = new CreatureSay(getObjectId(), 0, getName(), chat);
+ final CreatureSay cs = new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), chat);
// we interact and list players here
for (PlayerInstance players : knownPlayers.values())
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PenaltyMonsterInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PenaltyMonsterInstance.java
index ef99ffebac..35ec3857de 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PenaltyMonsterInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PenaltyMonsterInstance.java
@@ -19,10 +19,10 @@ package org.l2jmobius.gameserver.model.actor.instance;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlEvent;
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.spawn.Spawn;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
public class PenaltyMonsterInstance extends MonsterInstance
@@ -58,7 +58,7 @@ public class PenaltyMonsterInstance extends MonsterInstance
{
if (Rnd.get(100) <= 80)
{
- broadcastPacket(new CreatureSay(getObjectId(), Say2.ALL, getName(), "mmm your bait was delicious"));
+ broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "mmm your bait was delicious"));
}
_ptk = ptk;
addDamageHate(ptk, 10, 10);
@@ -76,7 +76,7 @@ public class PenaltyMonsterInstance extends MonsterInstance
if (Rnd.get(100) <= 75)
{
- broadcastPacket(new CreatureSay(getObjectId(), Say2.ALL, getName(), "I will tell fishes not to take your bait"));
+ broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "I will tell fishes not to take your bait"));
}
return true;
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index c6aa58df49..70cf2dd21c 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.datatables.xml.MapRegionData;
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
import org.l2jmobius.gameserver.datatables.xml.RecipeData;
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.enums.TeleportWhereType;
import org.l2jmobius.gameserver.geoengine.GeoEngine;
@@ -6353,7 +6354,7 @@ public class PlayerInstance extends Playable
CTF.removeFlagFromPlayer(this);
broadcastUserInfo();
_haveFlagCTF = false;
- Announcements.getInstance().gameAnnounceToAll(CTF.getEventName() + "(CTF): " + _teamNameHaveFlagCTF + "'s flag returned.");
+ Announcements.getInstance().criticalAnnounceToAll(CTF.getEventName() + "(CTF): " + _teamNameHaveFlagCTF + "'s flag returned.");
}
/**
@@ -6788,7 +6789,7 @@ public class PlayerInstance extends Playable
if ((_heroConsecutiveKillCount == Config.KILLS_TO_GET_WAR_LEGEND_AURA) && Config.WAR_LEGEND_AURA)
{
setHeroAura(true);
- Announcements.getInstance().gameAnnounceToAll(getName() + " becames War Legend with " + Config.KILLS_TO_GET_WAR_LEGEND_AURA + " PvP!!");
+ Announcements.getInstance().criticalAnnounceToAll(getName() + " becames War Legend with " + Config.KILLS_TO_GET_WAR_LEGEND_AURA + " PvP!!");
}
@@ -6827,7 +6828,7 @@ public class PlayerInstance extends Playable
{
if (Config.ENABLE_ANTI_PVP_FARM_MSG)
{
- final CreatureSay cs12 = new CreatureSay(0, 15, "", getName() + " 5 consecutive kill! Only Gm."); // 8D
+ final CreatureSay cs12 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " 5 consecutive kill! Only Gm."); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline() && player.isGM())
@@ -6840,7 +6841,7 @@ public class PlayerInstance extends Playable
}
case 6:
{
- final CreatureSay cs = new CreatureSay(0, 15, "", getName() + " is Dominating!"); // 8D
+ final CreatureSay cs = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is Dominating!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6852,7 +6853,7 @@ public class PlayerInstance extends Playable
}
case 9:
{
- final CreatureSay cs2 = new CreatureSay(0, 15, "", getName() + " is on a Rampage!"); // 8D
+ final CreatureSay cs2 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Rampage!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6864,7 +6865,7 @@ public class PlayerInstance extends Playable
}
case 14:
{
- final CreatureSay cs3 = new CreatureSay(0, 15, "", getName() + " is on a Killing Spree!"); // 8D
+ final CreatureSay cs3 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Killing Spree!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6876,7 +6877,7 @@ public class PlayerInstance extends Playable
}
case 18:
{
- final CreatureSay cs4 = new CreatureSay(0, 15, "", getName() + " is on a Monster Kill!"); // 8D
+ final CreatureSay cs4 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Monster Kill!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6888,7 +6889,7 @@ public class PlayerInstance extends Playable
}
case 22:
{
- final CreatureSay cs5 = new CreatureSay(0, 15, "", getName() + " is Unstoppable!"); // 8D
+ final CreatureSay cs5 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is Unstoppable!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6900,7 +6901,7 @@ public class PlayerInstance extends Playable
}
case 25:
{
- final CreatureSay cs6 = new CreatureSay(0, 15, "", getName() + " is on an Ultra Kill!"); // 8D
+ final CreatureSay cs6 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on an Ultra Kill!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6912,7 +6913,7 @@ public class PlayerInstance extends Playable
}
case 28:
{
- final CreatureSay cs7 = new CreatureSay(0, 15, "", getName() + " God Blessed!"); // 8D
+ final CreatureSay cs7 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " God Blessed!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6924,7 +6925,7 @@ public class PlayerInstance extends Playable
}
case 32:
{
- final CreatureSay cs8 = new CreatureSay(0, 15, "", getName() + " is Wicked Sick!"); // 8D
+ final CreatureSay cs8 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is Wicked Sick!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6936,7 +6937,7 @@ public class PlayerInstance extends Playable
}
case 35:
{
- final CreatureSay cs9 = new CreatureSay(0, 15, "", getName() + " is on a Ludricrous Kill!"); // 8D
+ final CreatureSay cs9 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Ludricrous Kill!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -6948,7 +6949,7 @@ public class PlayerInstance extends Playable
}
case 40:
{
- final CreatureSay cs10 = new CreatureSay(0, 15, "", getName() + " is GodLike!"); // 8D
+ final CreatureSay cs10 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is GodLike!"); // 8D
for (PlayerInstance player : World.getInstance().getAllPlayers())
{
if ((player != null) && player.isOnline())
@@ -13873,11 +13874,11 @@ public class PlayerInstance extends Playable
}
}
- public void broadcastSnoop(int type, String name, String text, CreatureSay cs)
+ public void broadcastSnoop(ChatType _chatType, String name, String text, CreatureSay cs)
{
if (!_snoopListener.isEmpty())
{
- final Snoop sn = new Snoop(this, type, name, text);
+ final Snoop sn = new Snoop(this, _chatType, name, text);
for (PlayerInstance pci : _snoopListener)
{
if (pci != null)
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/ProtectorInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/ProtectorInstance.java
index b567c0b0e5..74de12e020 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/ProtectorInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/ProtectorInstance.java
@@ -21,6 +21,7 @@ import java.util.concurrent.ScheduledFuture;
import org.l2jmobius.Config;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.gameserver.datatables.SkillTable;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Summon;
@@ -87,7 +88,7 @@ public class ProtectorInstance extends NpcInstance
final int objId = _caster.getObjectId();
skill.getEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
- broadcastPacket(new CreatureSay(objId, 0, getName(), Config.PROTECTOR_MESSAGE));
+ broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
return true;
}
@@ -109,7 +110,7 @@ public class ProtectorInstance extends NpcInstance
final int objId = _caster.getObjectId();
skill.getEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
- broadcastPacket(new CreatureSay(objId, 0, getName(), Config.PROTECTOR_MESSAGE));
+ broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
return true;
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherMonsterInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherMonsterInstance.java
index cec86570e5..fdadc4601e 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherMonsterInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherMonsterInstance.java
@@ -20,6 +20,7 @@ import java.util.concurrent.Future;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.gameserver.datatables.SkillTable;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.Creature;
@@ -370,7 +371,7 @@ public class SepulcherMonsterInstance extends MonsterInstance
return;
}
- broadcastPacket(new CreatureSay(getObjectId(), 0, getName(), "forgive me!!"));
+ broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "forgive me!!"));
}
}
@@ -397,7 +398,7 @@ public class SepulcherMonsterInstance extends MonsterInstance
}
FourSepulchersManager.getInstance().spawnKeyBox(_activeChar);
- broadcastPacket(new CreatureSay(getObjectId(), 0, getName(), "Many thanks for rescue me."));
+ broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "Many thanks for rescue me."));
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherNpcInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherNpcInstance.java
index fccda1953b..d139d891fa 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherNpcInstance.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/SepulcherNpcInstance.java
@@ -26,6 +26,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.datatables.xml.DoorData;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
@@ -436,7 +437,7 @@ public class SepulcherNpcInstance extends NpcInstance
{
return;
}
- final CreatureSay sm = new CreatureSay(0, 1, getName(), msg);
+ final CreatureSay sm = new CreatureSay(0, ChatType.SHOUT, getName(), msg);
for (PlayerInstance player : knownPlayers)
{
if (player == null)
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
index 7db15829fc..2d37904213 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/stat/CreatureStat.java
@@ -901,7 +901,7 @@ public class CreatureStat
}
val /= _creature.getArmourExpertisePenalty();
- if ((val > Config.MAX_RUN_SPEED) && !_creature.charIsGM())
+ if ((val > Config.MAX_RUN_SPEED) && !(_creature.isPlayer() && !_creature.getActingPlayer().isGM()))
{
val = Config.MAX_RUN_SPEED;
}
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/Announcements.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/Announcements.java
index 103499a536..d006de1920 100644
--- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/Announcements.java
+++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/entity/Announcements.java
@@ -29,10 +29,10 @@ import java.util.logging.Logger;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.cache.HtmCache;
+import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.World;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.SystemMessageId;
-import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -73,7 +73,7 @@ public class Announcements
{
for (String _announcement : _announcements)
{
- player.sendPacket(new CreatureSay(0, Say2.ANNOUNCEMENT, player.getName(), _announcement.replace("%name%", player.getName())));
+ player.sendPacket(new CreatureSay(0, ChatType.ANNOUNCEMENT, player.getName(), _announcement.replace("%name%", player.getName())));
}
for (List