예제 #1
0
 //When player logs off
 public void RemoveMeFromGuildDisconnect(guild g, character c)
 {
     //Repeat for each client in members of guild
     foreach (Client member in g.MembersClient)
     {
         //Make sure the client is not null
         if (member != null)
         {
             //Make sure the client is not the one of the player that logs off
             if (member != client)
             {
                 //Send packet to client
                 member.Send(Packet.GuildUpdate(c, 6, 0, 0, 0));
             }
         }
     }
 }
예제 #2
0
파일: Test.cs 프로젝트: kbdavis07/DEA
        public static void Guild()
        {
            var db = new DEAContext();

            var    NewGuild = new guild();
            Random randNum  = new Random();
            var    Num1     = randNum.Next(100000000, 999999999);
            var    Num2     = randNum.Next(100000000, 999999999);
            ulong  GuildId  = (ulong)(Num1 + Num2);

            NewGuild.id = GuildId;
            db.guilds.Add(NewGuild);
            db.SaveChanges();
            Console.WriteLine("Saved New Guild");
            var NewGuildId = NewGuild.id;

            Console.WriteLine(NewGuildId);
            var ResultsGuild = GuildRepository.FetchGuildByIdAsync(999999999123456787);

            Console.WriteLine(ResultsGuild.Result.id);
        }
예제 #3
0
 : !gu.GuildPermissions.Administrator && (await FilterInvites(guild, msg) || await FilterWords(guild, msg));
예제 #4
0
 : !gu.GuildPermissions.Administrator && (await FilterInvites(guild, msg).ConfigureAwait(false) || await FilterWords(guild, msg).ConfigureAwait(false));
예제 #5
0
 => msg.Author is IGuildUser gu && !gu.GuildPermissions.Administrator && (await FilterInvites(guild, msg, realExecution) || await FilterWords(guild, msg, realExecution) || await FilterZalgo(guild, msg, realExecution));
 => await GetMemberSilentAsync(guild, uid) is
 {
예제 #7
0
 TokenOf <SocketTextChannel> => GetSocketGuildTextChannel(value, client, guild as SocketGuild),
예제 #8
0
 public static byte[] GuildSetOnline(guild c, int memberid)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_ONLINE);
     Writer.DWord(memberid);
     Writer.DWord(c.Guildid);
     Writer.Text(c.Name);
     Writer.Word(0);
     Writer.DWord(0);
     Writer.DWord(0);
     Writer.DWord(0);
     Writer.Byte(0);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
예제 #9
0
 public static byte[] SendGuildInfo(guild guildGlobal)
 {
     PacketWriter Writer = new PacketWriter();
     /////////////////////////////////////////////////////////////////////////
     //Opcode information
     /////////////////////////////////////////////////////////////////////////
     Writer.Create(Systems.SERVER_GUILD_INFO_LOAD);
     /////////////////////////////////////////////////////////////////////////
     //Packet Structure
     /////////////////////////////////////////////////////////////////////////
     //Writer.Byte(1); // Guild update
     Writer.DWord(guildGlobal.Guildid);              // Unique Guild ID
     Writer.Text(guildGlobal.Name);                  // Guild Name
     Writer.Byte(guildGlobal.Level);                 // Guild level
     Writer.DWord(guildGlobal.PointsTotal);          // Guild GP
     Writer.Word(guildGlobal.NewsTitle.Length);      // Guild Message Title Lenght
     Writer.String(guildGlobal.NewsTitle);           // Guild Message Title
     Writer.Word(guildGlobal.NewsMessage.Length);    // Guild Message Lenght
     Writer.String(guildGlobal.NewsMessage);         // Guild Message
     Writer.DWord(0);                                // War on guild id
     Writer.Byte(0);                                 // War status?
     /////////////////////////////////////////////////////////////////////////
     // Write Guild Member information for each excisting member.
     /////////////////////////////////////////////////////////////////////////
     Guild_ListPlayersInfo(guildGlobal.MembersInfo, Writer);
     Writer.Byte(0);
     return Writer.GetBytes();
 }
예제 #10
0
        public static byte[] Guild_Create(guild guildGlobal)
        {
            PacketWriter Writer = new PacketWriter();
            Writer.Create(Systems.SERVER_GUILD);
            Writer.Byte(1);
            Writer.DWord(guildGlobal.Guildid);
            Writer.Text(guildGlobal.Name);
            Writer.Byte(1);
            Writer.DWord(0);
            if (guildGlobal.NewsTitle != null)
            {
                if (guildGlobal.NewsTitle != "")
                    Writer.Text(guildGlobal.NewsTitle);
                else
                    Writer.Word(0);
            }
            else
                Writer.Word(0);

            if (guildGlobal.NewsMessage != null)
            {
                if (guildGlobal.NewsMessage != "")
                    Writer.Text(guildGlobal.NewsMessage);
                else
                    Writer.Word(0);
            }
            else
                Writer.Word(0);

            Writer.DWord(0);
            Writer.Byte(0);

            Guild_ListPlayersInfo(guildGlobal.MembersInfo, Writer);

            Writer.Byte(0);
            return Writer.GetBytes();
        }
예제 #11
0
 await FilterLinks(guild, msg).ConfigureAwait(false));
예제 #12
0
 await FilterWords(guild, msg).ConfigureAwait(false) ||
예제 #13
0
 (await FilterInvites(guild, msg).ConfigureAwait(false) ||