//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)); } } } }
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); }
: !gu.GuildPermissions.Administrator && (await FilterInvites(guild, msg) || await FilterWords(guild, msg));
: !gu.GuildPermissions.Administrator && (await FilterInvites(guild, msg).ConfigureAwait(false) || await FilterWords(guild, msg).ConfigureAwait(false));
=> 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 {
TokenOf <SocketTextChannel> => GetSocketGuildTextChannel(value, client, guild as SocketGuild),
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(); }
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(); }
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(); }
await FilterLinks(guild, msg).ConfigureAwait(false));
await FilterWords(guild, msg).ConfigureAwait(false) ||
(await FilterInvites(guild, msg).ConfigureAwait(false) ||