[HELP] Redux Source

12/16/2015 00:10 NewbieKid#1
because of 5065 dont support World Chat.. im planning to make Service Chat to be the World chat..

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
    }
}
if happens that someone know how to do it.. will give me a hint on how to do it? thanks!
12/16/2015 13:22 KraHen#2
Quote:
i erased what i add


And that's where you go wrong. We are not here to provide you with implementation, at least show your work so we can see where you go wrong and help you, we are not going to spoonfeed you.
12/16/2015 15:00 NewbieKid#3
Quote:
Originally Posted by KraHen View Post
[/FONT]

And that's where you go wrong. We are not here to provide you with implementation, at least show your work so we can see where you go wrong and help you, we are not going to spoonfeed you.
i just copy the code of ChatType.Guild

and create something like ChatType.Serve
that's what on the enums..