示例#1
0
 private void OnPartyUpdate_JoinedParty(BnetEntityId partyId, BnetGameAccountId otherMemberId)
 {
     if (this.DidSendChallenge() && (this.m_challengee.GetHearthstoneGameAccount().GetId() == otherMemberId))
     {
         if (partyId != this.m_partyId)
         {
             this.m_challengeePartyId = partyId;
             if (this.m_partyId != null)
             {
                 this.ResolveChallengeConflict();
             }
         }
     }
     else if (!BnetUtils.CanReceiveChallengeFrom(otherMemberId))
     {
         Network.DeclineFriendChallenge(partyId);
     }
     else if (!this.AmIAvailable())
     {
         Network.DeclineFriendChallenge(partyId);
     }
     else
     {
         this.HandleJoinedParty(partyId, otherMemberId);
     }
 }
示例#2
0
    private static void SpectatorCount_OnRollover(UIEvent evt)
    {
        BnetBar bar = Get();

        if (bar != null)
        {
            string str2;
            string headline = GameStrings.Get("GLOBAL_SPECTATOR_COUNT_PANEL_HEADER");
            BnetGameAccountId[] spectatorPartyMembers = SpectatorManager.Get().GetSpectatorPartyMembers(true, false);
            if (spectatorPartyMembers.Length == 1)
            {
                string   playerBestName = BnetUtils.GetPlayerBestName(spectatorPartyMembers[0]);
                object[] args           = new object[] { playerBestName };
                str2 = GameStrings.Format("GLOBAL_SPECTATOR_COUNT_PANEL_TEXT_ONE", args);
            }
            else
            {
                if (< > f__am$cache20 == null)
                {
示例#3
0
 private void HandleJoinedParty(BnetEntityId partyId, BnetGameAccountId otherMemberId)
 {
     this.m_partyId               = partyId;
     this.m_challengeePartyId     = partyId;
     this.m_challengerId          = otherMemberId;
     this.m_challenger            = BnetUtils.GetPlayer(this.m_challengerId);
     this.m_challengee            = BnetPresenceMgr.Get().GetMyPlayer();
     this.m_hasSeenDeclinedReason = false;
     if ((this.m_challenger == null) || !this.m_challenger.IsDisplayable())
     {
         this.m_challengerPending = true;
         this.UpdateMyAvailability();
     }
     else
     {
         this.UpdateMyAvailability();
         this.FireChangedEvent(FriendChallengeEvent.I_RECEIVED_CHALLENGE, this.m_challenger);
     }
 }
示例#4
0
 public bool IsDisplayable()
 {
     BnetPlayer player = BnetUtils.GetPlayer(this.m_speakerId);
     BnetPlayer player2 = BnetUtils.GetPlayer(this.m_receiverId);
     if (player == null)
     {
         return false;
     }
     if (!player.IsDisplayable())
     {
         return false;
     }
     if (player2 == null)
     {
         return false;
     }
     if (!player2.IsDisplayable())
     {
         return false;
     }
     return true;
 }
示例#5
0
 public BnetPlayer GetSpeaker()
 {
     return BnetUtils.GetPlayer(this.m_speakerId);
 }
示例#6
0
 public BnetPlayer GetReceiver()
 {
     return BnetUtils.GetPlayer(this.m_receiverId);
 }