示例#1
0
        public static void CreateGuildRequest(World.Network.WorldClient client, string packet)
        {
            string[] data = packet.Substring(2).Split('|');

            //Guild creator request pattern : gC8|16777215|8|8796216|Nightteam

            int backArtID  = int.Parse(data[0]);
            int backColor  = int.Parse(data[1]);
            int frontArtID = int.Parse(data[2]);
            int frontColor = int.Parse(data[3]);

            Game.Guilds.GuildEmblem emblem = new Game.Guilds.GuildEmblem(backArtID, backColor, frontArtID, frontColor);

            string guildName = data[4];

            if (!Helper.GuildHelper.ExistGuild(guildName.ToLower()))
            {
                Game.Guilds.Guild guild = new Game.Guilds.Guild(1, guildName, emblem);
                guild.AddMember(client);
                client.Action.GuildMember.Rank = Game.Guilds.GuildRank.Leader;
                client.Action.GuildMember.AllowFullRight();
            }
            else // Guild already exist
            {
                client.Action.SystemMessage("Ce nom de guilde existe deja !");
                client.Send("gV");
            }

            client.Send("gV");
        }
示例#2
0
        public static void CreateGuildRequest(World.Network.WorldClient client, string packet)
        {
            string[] data = packet.Substring(2).Split('|');

            //Guild creator request pattern : gC8|16777215|8|8796216|Nightteam

            int backArtID = int.Parse(data[0]);
            int backColor = int.Parse(data[1]);
            int frontArtID = int.Parse(data[2]);
            int frontColor = int.Parse(data[3]);

            Game.Guilds.GuildEmblem emblem = new Game.Guilds.GuildEmblem(backArtID, backColor, frontArtID, frontColor);

            string guildName = data[4];

            if (!Helper.GuildHelper.ExistGuild(guildName.ToLower()))
            {
                Game.Guilds.Guild guild = new Game.Guilds.Guild(1, guildName, emblem);
                guild.AddMember(client);
                client.Action.GuildMember.Rank = Game.Guilds.GuildRank.Leader;
                client.Action.GuildMember.AllowFullRight();
            }
            else // Guild already exist
            {
                client.Action.SystemMessage("Ce nom de guilde existe deja !");
                client.Send("gV");
            }

            client.Send("gV");
        }