i explore to this codes and try to figure out the service chat works.. but didnt get any luck.. so here's the code, i erased what i add
Code:
#region TalkPacket
public static void Process_TalkPacket(Player client, TalkPacket packet)
{
if (packet.Words[0] == Constants.COMMAND_PREFIX)
{
Commands.Handle(client, packet.Words.Substring(1).ToLower().Split(' '));
return;
}
switch (packet.Type)
{
#region Guild
case ChatType.Syndicate:
if (client.Guild != null)
foreach (var p in PlayerManager.Players.Values)
if (p.Guild == client.Guild)
p.Send(packet);
break;
#endregion
#region Team
case ChatType.Team:
if (client.Team != null)
client.Team.SendToTeam(packet);
break;
#endregion
#region Talk
case ChatType.Talk:
client.SendToScreen(packet);
break;
#endregion
#region Whisper
case ChatType.Whisper:
{
var target = Managers.PlayerManager.GetUser(packet.Hearer);
if (target != null)
{
Database.ServerDatabase.Context.ChatLogs.Add(new DbChatLog(packet));
packet.SpeakerLookface = client.Lookface;
packet.HearerLookface = target.Lookface;
target.Send(packet);
}
else
{
packet.Words = packet.Hearer + " is not online";
client.Send(packet);
}
break;
}
#endregion
#region Friend
case ChatType.Friend:
foreach (var friend in client.AssociateManager.Friends.Values)
friend.Send(packet);
break;
#endregion
here's the Chat Type.. i can see World there but still wont work..
Code:
namespace Redux.Enum
{
public enum ChatType : ushort
{
/// <summary>
/// [2000]
/// </summary>
Talk = 2000,
/// <summary>
/// [2001]
/// </summary>
Whisper,
/// <summary>
/// [2002]
/// </summary>
Action,
/// <summary>
/// [2003]
/// </summary>
Team,
/// <summary>
/// [2004]
/// </summary>
Syndicate,
/// <summary>
/// [2005]
/// </summary>
System = Talk + 5,
/// <summary>
/// [2006]
/// </summary>
Family,
/// <summary>
/// [2007]
/// </summary>
Talk2,
/// <summary>
/// [2008]
/// </summary>
Yelp,
/// <summary>
/// [2009]
/// </summary>
Friend,
/// <summary>
/// [2010]
/// </summary>
Global = Talk + 10,
/// <summary>
/// [2011]
/// </summary>
GM,
/// <summary>
/// [2013]
/// </summary>
Ghost,
/// <summary>
/// [2014]
/// </summary>
Serve,
/// <summary>
/// [2021]
/// </summary>
World = Talk + 21,
/// <summary>
/// [2100]
/// </summary>
Register = Talk + 100,
/// <summary>
/// [2101]
/// </summary>
Entrance,
Shop,
PetTalk,
CryOut,
Webpage = Talk + 105,
NewMessage,
Task,
SynWarFirst,
SynWarNext,
LeaveWord = Talk + 110,
SynAnnounce,
MessageBox,
Reject,
SynTenet,
MsgBoardTrade = Talk + 201,
MsgBoardFriend,
MsgBoardTeam,
MsgBoardSyndicate,
MsgBoardOther,
MsgBoardSystem,
Broadcast = Talk + 500
}
}






