Kommissar
Recruit

I'm calling StartAlleyFightMapEvent, which works as expected. Two parties begin to fight (spawned party and a garrison). This is done just outside of a town.
Player can get involved, as they would with an alley fight - the option being to help the garrison or to not get involved.
If the player chooses to help the garrison and wins the fight, they are presented with a menu and a "continue" option, upon clicking of which I get a null exception error. I tracked the code to the following:
Sandbox.Source.Towns - CommonAreaCampaignBehavior
The highlighted variable is null, which causes an exception. Is there any way to call an alley fight in a different way, or at least to ensure such error will not be thrown?
Player can get involved, as they would with an alley fight - the option being to help the garrison or to not get involved.
If the player chooses to help the garrison and wins the fight, they are presented with a menu and a "continue" option, upon clicking of which I get a null exception error. I tracked the code to the following:
Sandbox.Source.Towns - CommonAreaCampaignBehavior
The highlighted variable is null, which causes an exception. Is there any way to call an alley fight in a different way, or at least to ensure such error will not be thrown?
C#:
Campaign.Current.MapEventManager.StartAlleyFightMapEvent(mob.Party, garrison.Party);
最后编辑: