Or is the C# compiler just not very good? I encountered this in a decompiled DLL while modding and it seems this is a clear optimization opportunity:
if (partyToReceiveLoot.IsMobile)
{
TakePrisonerAction.Apply(partyToReceiveLoot, troopRosterElement3.Character.HeroObject);
}
else
{
TakePrisonerAction.Apply(partyToReceiveLoot, troopRosterElement3.Character.HeroObject);
}
DLL: Taleworlds.CampaignSystem.dll Method: LootCollector.GiveShareOfLootToParty