Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settlement Enter Spam & Leave Crash fix #700

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

EgardA
Copy link
Contributor

@EgardA EgardA commented Dec 7, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • All new classes have class-level documentation comments, if there are any at all
  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation update
  • Other... Please describe:

What is the current behaviour?

bug and crash

What is the new behaviour?

Resolves #688 #686

bug and crash no more

Other information

@EgardA EgardA self-assigned this Dec 7, 2023
@EgardA EgardA linked an issue Dec 7, 2023 that may be closed by this pull request
2 tasks
@@ -34,6 +34,8 @@ public static void OverrideLeaveConsequence()
LeaveSettlementActionPatches.AllowedInstance.Instance = MobileParty.MainParty;
PlayerEncounter.Finish(true);
Campaign.Current.SaveHandler.SignalAutoSave();

EncounterManagerPatches.inSettlement = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this into a patch for the PlayerEncounter.Finish method in the PlayerEncounterPatches.cs file

@@ -19,6 +19,7 @@ namespace GameInterface.Services.MobileParties.Patches;
[HarmonyPatch(typeof(EncounterManager))]
internal class EncounterManagerPatches
{
public static bool inSettlement = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this private

@EgardA EgardA requested a review from garrettluskey December 11, 2023 22:38
@garrettluskey garrettluskey merged commit 88a061b into development Dec 15, 2023
1 check passed
@garrettluskey garrettluskey deleted the Enter-exit-settlement-fix branch December 15, 2023 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enter Settlement Message Spam Town Enter/Town Leave Crash
2 participants