getId() public method

Returns the ID of the guild.
public getId ( ) : int
return int
Ejemplo n.º 1
0
 public void removeGuild(Guild guild)
 {
     string sql=String.Format("DELETE FROM {0} WHERE ID = '{0}';", GUILDS_TBL_NAME, guild.getId());
     mDb.ExecuteNonQuery(sql);
 }
Ejemplo n.º 2
0
        public Guild createGuild(string name, int playerId)
        {
            Guild guild=new Guild(name);
            // Add guild to db
            Program.storage.addGuild(guild);

            // Add guild, and add owner
            mGuilds.Add(guild);
            mOwners.Add(playerId);

            // put the owner in the guild
            addGuildMember(guild, playerId);

            // Set and save the member rights
            Program.storage.setMemberRights(guild.getId(), playerId, (int)GuildAccessLevel.GAL_OWNER);

            guild.setOwner(playerId);

            return guild;
        }
Ejemplo n.º 3
0
        void setUserRights(Guild guild, int playerId, int rights)
        {
            // Set and save the member rights
            Program.storage.setMemberRights(guild.getId(), playerId, rights);

            // Set with guild
            guild.setUserPermissions(playerId, rights);
        }
Ejemplo n.º 4
0
 public void addGuildMember(Guild guild, int playerId)
 {
     Program.storage.addGuildMember(guild.getId(), playerId);
     guild.addMember(playerId, (int)GuildAccessLevel.GAL_NONE);
 }
Ejemplo n.º 5
0
        public void removeGuildMember(Guild guild, int playerId)
        {
            // remove the user from the guild
            Program.storage.removeGuildMember(guild.getId(), playerId);
            guild.removeMember(playerId);

            // if theres no more members left delete the guild
            if (guild.memberCount() == 0)
                removeGuild(guild);

            // remove the user from owners list
            mOwners.Remove(playerId);
        }