public static void HandleWorldMessage(ZoneConnection zc, InterPacket packet) { string msg; bool wut; byte type; if (!packet.TryReadString(out msg) || !packet.TryReadByte(out type) || !packet.TryReadBool(out wut)) { return; } if (wut) { string to; if (!packet.TryReadString(out to)) { return; } WorldClient client; if ((client = ClientManager.Instance.GetClientByCharname(to)) == null) { Log.WriteLine(LogLevel.Warn, "Tried to send a WorldMessage to a character that is unknown. Charname: {0}", to); } else { using (var p = Handler25.CreateWorldMessage((WorldMessageTypes)type, msg)) { client.SendPacket(p); } } } else { using (var p = Handler25.CreateWorldMessage((WorldMessageTypes)type, msg)) { ClientManager.Instance.SendPacketToAll(p); } } }