This PR fixes the following issue: #2591 (Fast Travel deducts gold even if travel is canceled)
Pretty straight forward. Moved the code to deduct the gold into a separate method, DaggerfallTravelPopUp.DeductFastTravelGold. Rather than invoking directly from update, I opted to do so in DaggerfallTravelPopUp.performFastTravel, as that method seemed to be where most of the other related changes to GameManager.Instance.PlayerEntity state occur. The only concern I have is related to the DaggerfallTravelPopUp.OnPreFastTravel and DaggerfallTravelPopUp.OnPostFastTravel events. Previously, the gold was deducted prior to either event being fired. In performFastTravel, I put it after OnPreFastTravel, as that seemed to make the most sense. Looking at the codebase, I did not see any subscribers to OnPreFastTravel, so I don't think this will break anything.
This PR fixes the following issue: #2591 (Fast Travel deducts gold even if travel is canceled)
Pretty straight forward. Moved the code to deduct the gold into a separate method,
DaggerfallTravelPopUp.DeductFastTravelGold
. Rather than invoking directly from update, I opted to do so inDaggerfallTravelPopUp.performFastTravel
, as that method seemed to be where most of the other related changes toGameManager.Instance.PlayerEntity
state occur. The only concern I have is related to theDaggerfallTravelPopUp.OnPreFastTravel
andDaggerfallTravelPopUp.OnPostFastTravel
events. Previously, the gold was deducted prior to either event being fired. InperformFastTravel
, I put it afterOnPreFastTravel
, as that seemed to make the most sense. Looking at the codebase, I did not see any subscribers toOnPreFastTravel
, so I don't think this will break anything.