Пример #1
0
        public void AddMembershipRequest(ObjectGuid guildGuid, MembershipRequest request)
        {
            _membershipRequestsByGuild[guildGuid][request.GetPlayerGUID()]  = request;
            _membershipRequestsByPlayer[request.GetPlayerGUID()][guildGuid] = request;

            SQLTransaction    trans = new SQLTransaction();
            PreparedStatement stmt  = DB.Characters.GetPreparedStatement(CharStatements.REP_GUILD_FINDER_APPLICANT);

            stmt.AddValue(0, request.GetGuildGuid());
            stmt.AddValue(1, request.GetPlayerGUID());
            stmt.AddValue(2, request.GetAvailability());
            stmt.AddValue(3, request.GetClassRoles());
            stmt.AddValue(4, request.GetInterests());
            stmt.AddValue(5, request.GetComment());
            stmt.AddValue(6, request.GetSubmitTime());
            trans.Append(stmt);
            DB.Characters.CommitTransaction(trans);

            // Notify the applicant his submittion has been added
            Player player = Global.ObjAccessor.FindPlayer(request.GetPlayerGUID());

            if (player)
            {
                SendMembershipRequestListUpdate(player);
            }

            // Notify the guild master and officers the list changed
            Guild guild = Global.GuildMgr.GetGuildById(guildGuid.GetCounter());

            if (guild)
            {
                SendApplicantListUpdate(guild);
            }
        }
Пример #2
0
        public MembershipRequest(MembershipRequest settings)
        {
            _comment = settings.GetComment();

            _availability = settings.GetAvailability();
            _classRoles   = settings.GetClassRoles();
            _interests    = settings.GetInterests();
            _guildId      = settings.GetGuildGuid();
            _playerGUID   = settings.GetPlayerGUID();
            _time         = settings.GetSubmitTime();
        }