BannerlordCE / CEEvents

Captivity Events Source Code
https://www.nexusmods.com/mountandblade2bannerlord/mods/1226
MIT License
4 stars 6 forks source link

BL Logic which releases SpawnHero Captives - Fix discussion #80

Closed SkipWestcott closed 1 year ago

SkipWestcott commented 1 year ago

Describe the bug Captive Wanderers released on generic Peace events.

To Reproduce

  1. Spawn a wanderer prisoner
  2. Peace with any faction
  3. Wanderer is released

Expected behavior Captive wanderers should not be at peace with Main Hero!!!

Additional context

Hero hero = HeroCreator.CreateSpecialHero(wanderer, randomElementWithPredicate, CampaignData.NeutralFaction, CampaignData.NeutralFaction, -1);

This is the problem. This needs to pull in the Intended Clan. Let me see what I can find as far as correct syntax.

EDIT:

Hero hero = HeroCreator.CreateSpecialHero(wanderer, randomElement, Clan.BanditFactions.GetRandomElementInefficiently(), null, -1);

You actually have this fixed in Master? Development reflects the first, erroneous pattern.

SkipWestcott commented 1 year ago

Submitted PR 85 to fix.

Technically, it could search the Faction space instead of just the BanditFaction space, and we could spawn merc clan concubines etc. But this is fine for now

TheBadListener commented 1 year ago

Closing issues as it has been merged :)