• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

WarRocK Serverfiles Channel Switch Fix

Status
Not open for further replies.
Banned
Banned
Joined
Nov 26, 2012
Messages
245
Reaction score
105
HANDLE_CHANNEL_SWITCH.cs:

Code:
using GameServer.Networking.Packets;

using GameServer.Managers;

namespace GameServer.Networking.Handlers
{
    class HANDLE_CHANNEL_SWITCH : PacketHandler
    {
        public override void Handle(GameServer.Virtual_Objects.User.virtualUser User)
        {
            int TargetChannel = int.Parse(getNextBlock());

            //if (TargetChannel == 1 || User.Rank > 2 || TargetChannel == 3)
            //if (TargetChannel == 1 || User.Rank > 0 || TargetChannel == 2 || TargetChannel == 3)
            //if (TargetChannel >= 1 && TargetChannel <= 1)
            if (TargetChannel >= 1 && TargetChannel <= 3)
            {
                User.Channel = TargetChannel;
                User.Page = 0;
                User.send(new PACKET_CHANGE_CHANNEL(User));
                User.send(new PACKET_ROOM_LIST(User, User.Page));
            }
            else
            {
                User.Channel = 1;
                User.Page = 0;
                User.send(new PACKET_CHANGE_CHANNEL(User));
                User.send(new PACKET_ROOM_LIST(User, User.Page));
                //if (TargetChannel != -1)
                //{
                //  User.send(new PACKET_CHAT("SYSTEM", PACKET_CHAT.ChatType.Room_ToAll, "SYSTEM >> This Channel is not avaible yet, but we're working on it ;)!", 999, "NULL"));
                //}

                if (TargetChannel == 2)
                {
                    User.send(new PACKET_CHAT("SYSTEM", PACKET_CHAT.ChatType.Room_ToAll, "SYSTEM >> Bg channel is not avaible!", 999, "NULL"));
                }
                if (TargetChannel == 3)
                {
                    User.send(new PACKET_CHAT("SYSTEM", PACKET_CHAT.ChatType.Room_ToAll, "SYSTEM >> Zombie channel is not avaible!", 999, "NULL"));
                }
            }
        }
    }
}
 
◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜
Developer
Joined
May 29, 2007
Messages
2,167
Reaction score
899
I think he just changed a value in the if statement. This isn't a fix it's just changing a value..
 
Status
Not open for further replies.
Back
Top