当前位置: 首页>>代码示例>>C#>>正文


C# Guild类代码示例

本文整理汇总了C#中Guild的典型用法代码示例。如果您正苦于以下问题:C# Guild类的具体用法?C# Guild怎么用?C# Guild使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Guild类属于命名空间,在下文中一共展示了Guild类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GuildTitlePrompt

 public GuildTitlePrompt( Mobile from, Mobile target, Guild g )
     : base(from)
 {
     m_Mobile = from;
     m_Target = target;
     m_Guild = g;
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:7,代码来源:GuildTitlePrompt.cs

示例2: Page_Load

 //public static GuildRoster ooj = null;
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         if(ooj == null){
             RequestXml.basePath = MapPath("./armory/");
             RequestData.SqlConnectionString = ""; // Omitted for GitHub
             ooj = new Guild("Terenas", "Overlords of Justice");
         }
     }
     //OOJ Roster
     //http://www.wowarmory.com/guild-info.xml?r=Terenas&gn=Overlords+of+Justice&rhtml=n
     BodyText.Text = ooj.roster.ReturnRoster();
     try
     {
         //BodyText.Text = ooj.ReturnRoster();
     }catch
     {
         BodyText.Text = "Roster is currently loading...";
     }
     if (this.IsPostBack)
     {
     }
     else { }
 }
开发者ID:Velkitor,项目名称:Old-World-Of-Warcraft-Guild-Site,代码行数:26,代码来源:Roster.aspx.cs

示例3: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                    {
                        m_Guild = reader.ReadGuild() as Guild;

                        goto case 0;
                    }
                case 0:
                    {
                        break;
                    }
            }

            if ( m_Guild == null )
            {
                this.Delete();
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:25,代码来源:GuildStone.cs

示例4: GuildAllyPrompt

 public GuildAllyPrompt( Mobile leader, Guild target, Guild g )
     : base(leader)
 {
     m_Leader = leader;
     m_Target = target;
     m_Guild = g;
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:7,代码来源:GuildAllyPrompt.cs

示例5: CreateGuild

			Guild CreateGuild(CmdTrigger<RealmServerCmdArgs> trigger, string name, CharacterRecord record)
			{
				var guild = new Guild(record, name);

				trigger.Reply("Guild created");

				return guild;
			}
开发者ID:pallmall,项目名称:WCell,代码行数:8,代码来源:GuildCommands.cs

示例6: SendMessageToGuild

        /// <summary>
        /// Send message to a guild
        /// </summary>
        /// <param name="message">The message</param>
        /// <param name="guild">The guild</param>
        public static void SendMessageToGuild(string message, Guild guild)
        {
            if (guild == null)
                return;

            message = "[Guild] [" + message + "]";
            guild.SendMessageToGuildMembers(message, eChatType.CT_Guild, eChatLoc.CL_ChatWindow);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:13,代码来源:Guild+Manager.cs

示例7: GuildEventLogEntry

		public GuildEventLogEntry(Guild guild, GuildEventLogEntryType type, int character1LowId, int character2LowId, int newRankId, DateTime timeStamp)
		{
			GuildId = guild.Id;
			Type = type;
			Character1LowId = character1LowId;
			Character2LowId = character2LowId;
			NewRankId = newRankId;
			TimeStamp = timeStamp;
		}
开发者ID:remixod,项目名称:netServer,代码行数:9,代码来源:GuildEventLogEntry.cs

示例8: ChangeGuild

        public Guild ChangeGuild(Account acc, int guildid, int rank, int fame, bool renounce)
        {
            Guild guild;
            if (renounce)
            {
                guild = new Guild
                {
                    Name = "",
                    Id = 0,
                    Rank = 0,
                    Fame = 0
                };

                MySqlCommand cmd = CreateQuery();
                cmd.CommandText = "UPDATE accounts SET guild=0, guildRank=0, guildFame=0 WHERE [email protected]";
                cmd.Parameters.AddWithValue("@aid", acc.AccountId);
                if (cmd.ExecuteNonQuery() == 0)
                {
                    throw new Exception("Could not change player's guild in the SQL!");
                }

                UpdateGuild(guildid);

                return guild;
            }
            else
            {
                guild = new Guild
                {
                    Id = guildid,
                    Name = GetGuildName(guildid),
                    Rank = rank,
                    Fame = fame
                };
                if (guild.Name == "")
                {
                    throw new Exception("Guild not found!");
                }
                MySqlCommand cmd = CreateQuery();
                cmd.CommandText = "UPDATE accounts SET [email protected], [email protected], [email protected] WHERE [email protected]";
                cmd.Parameters.AddWithValue("@gid", guildid);
                cmd.Parameters.AddWithValue("@gr", rank);
                cmd.Parameters.AddWithValue("@gf", fame);
                cmd.Parameters.AddWithValue("@aid", acc.AccountId);
                if (cmd.ExecuteNonQuery() == 0)
                {
                    throw new Exception("Could not change player's guild in the SQL!");
                }

                UpdateGuild(guildid);

                return guild;
            }
        }
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:54,代码来源:Database.Guild.cs

示例9: GuildInfoNoGuild

		/// <summary>
		/// Sends GuildInfoNoGuild to creature's client.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="guild"></param>
		public static void GuildInfoNoGuild(Creature creature, Guild guild)
		{
			var packet = new Packet(Op.GuildInfoNoGuild, creature.EntityId);
			packet.PutLong(guild.Id);
			packet.PutString(guild.Name);
			packet.PutString(guild.LeaderName);
			packet.PutInt(guild.MemberCount);
			packet.PutString(guild.IntroMessage);

			creature.Client.Send(packet);
		}
开发者ID:aura-project,项目名称:aura,代码行数:16,代码来源:Send.Guilds.cs

示例10: GuildInfoApplied

		/// <summary>
		/// Sends GuildInfoApplied to creature's client.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="guild"></param>
		public static void GuildInfoApplied(Creature creature, Guild guild)
		{
			// The fields of this packet were guessed, something might be missing.

			var packet = new Packet(Op.GuildInfoApplied, creature.EntityId);
			packet.PutLong(guild.Id);
			packet.PutString(guild.Server);
			packet.PutLong(creature.EntityId);
			packet.PutString(guild.Name);

			creature.Client.Send(packet);
		}
开发者ID:aura-project,项目名称:aura,代码行数:17,代码来源:Send.Guilds.cs

示例11: GuildEventLog

		internal GuildEventLog(Guild guild, bool isNew)
			: this(guild)
		{
			if (!isNew)
			{
				var entries = GuildEventLogEntry.FindAllByProperty("m_GuildId", (int)guild.Id);
				foreach (var entry in entries)
				{
					m_entries.Enqueue(entry);
				}
			}
		}
开发者ID:WCellFR,项目名称:WCellFR,代码行数:12,代码来源:GuildEventLog.cs

示例12: GuildPanel

		/// <summary>
		/// Sends GuildPanel to creature's client.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="guild"></param>
		public static void GuildPanel(Creature creature, Guild guild)
		{
			var packet = new Packet(Op.GuildPanel, creature.EntityId);
			packet.PutLong(guild.Id);
			packet.PutByte(creature.GuildMember.IsLeader);
			if (creature.GuildMember.IsLeader)
			{
				packet.PutInt(guild.WithdrawMaxAmount);
				packet.PutLong(guild.WithdrawDeadline);
				packet.PutInt(guild.MaxMembers);
			}
			packet.PutByte(0);
			packet.PutByte(0); // 1: Go To Guild Hall,  2: Go To Guild Stone

			creature.Client.Send(packet);
		}
开发者ID:aura-project,项目名称:aura,代码行数:21,代码来源:Send.Guilds.cs

示例13: GuildMember

		public GuildMember(CharacterRecord chr, Guild guild, GuildRank rank)
			: this()
		{
			var zoneId = (int)chr.Zone;

			Guild = guild;

			CharacterLowId = (int)chr.EntityLowId;
			_rankId = rank.RankIndex;
			_name = chr.Name;
			_lastLevel = chr.Level;
			_lastLogin = DateTime.Now;
			_lastZoneId = zoneId;
			_class = (int)chr.Class;
			_publicNote = string.Empty;
			_officerNote = string.Empty;
		}
开发者ID:remixod,项目名称:netServer,代码行数:17,代码来源:GuildMember.cs

示例14: ForOnlineMembers

		/// <summary>
		/// Executes the given action for all members of guild that are online.
		/// </summary>
		/// <param name="guild"></param>
		/// <param name="action"></param>
		public static void ForOnlineMembers(Guild guild, Action<User> action)
		{
			var members = guild.GetMembers();
			foreach (var member in members)
			{
				// Applicants aren't full members and shouldn't receive
				// "broadcasts" yet.
				if (member.Rank > GuildMemberRank.Member)
					continue;

				var user = MsgrServer.Instance.UserManager.GetUserByCharacterId(member.CharacterId);
				if (user == null)
					continue;

				action(user);
			}
		}
开发者ID:aura-project,项目名称:aura,代码行数:22,代码来源:GuildManager.cs

示例15: LoadGuilds

 private void LoadGuilds()
 {
     MySqlCommand mysqlCmd = new MySqlCommand("SELECT * FROM Guilds", Program.DatabaseManager.GetClient().GetConnection());
     int GuildCount = 0;
     MySqlDataReader GuildReader = mysqlCmd.ExecuteReader();
     {
         for (int i = 0; i < GuildReader.FieldCount; i++)
         {
             while (GuildReader.Read())
             {
                 Guild g = new Guild(Program.DatabaseManager.GetClient().GetConnection(), GuildReader);
                 GuildManager.AddGuildToList(g);
                 GuildCount++;
             }
         }
     }
     GuildReader.Close();
     Log.WriteLine(LogLevel.Info, "Load {0} Guilds", GuildCount);
 }
开发者ID:Dextan,项目名称:Estrella,代码行数:19,代码来源:GuildDataProvider.cs


注:本文中的Guild类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。