showPortraitForFactionId(factionId, generalId) {
    if (this._portraitsByGeneralId == null) {
      this._portraitsByGeneralId = {};
    }

    if (this._portraitsByFactionId == null) {
      this._portraitsByFactionId = {};
    }

    if (this._portrait == null || this._portrait._generalId != generalId) {
      // animate current out
      if (this._portrait != null) {
        this._portrait.fadeToInvisible(CONFIG.ANIMATE_FAST_DURATION);
        this._portrait = null;
      }

      // show new
      if (generalId != null) {
        // show new general portrait by general id
        this._portrait = this._portraitsByGeneralId[generalId];

        if (this._portrait == null) {
          const generalCard = SDK.GameSession.getCardCaches().getCardById(generalId);
          const portraitHexResource = generalCard.getPortraitHexResource();
          this._portrait = BaseSprite.create();
          this._portrait.setRequiredTextureResource(portraitHexResource);
          const winCenterPosition = UtilsEngine.getGSIWinCenterPosition();
          this._portrait.setPosition(winCenterPosition.x, winCenterPosition.y + 285);
          this._portrait.setScale(0.5);
          this._portrait._generalId = generalId;
          this._portraitsByGeneralId[generalId] = this._portrait;
          this.getNoFXLayer().addChild(this._portrait, this._z_order_faction);
        }

        this._portrait.setVisible(false);
        this._portrait.whenRequiredResourcesReady().then((requestId) => {
          if (!this._portrait.getAreResourcesValid(requestId)) return; // resources have been invalidated
          this._portrait.setVisible(true);

          // animate in
          this._portrait.setOpacity(0.0);
          this._portrait.fadeTo(CONFIG.FADE_FAST_DURATION, 255);
        });
      }
    }
  }
Shows a portrait by general id, if no general id then by faction id, or clears current if none provided.
@param {String} [factionId=null]
@param {String} [generalId=null]