Vous êtes sur la page 1sur 28

### Harmony id=mod.bannerlord.improvedsmithing, version=2.0.0.

9,
location=C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II
Bannerlord\bin\Win64_Shipping_Client\0Harmony.dll
### Started from virtual System.Void ImprovedSmithing.Core::OnSubModuleLoad(),
location C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II
Bannerlord\Modules\ImprovedSmithing\bin\Win64_Shipping_Client\ImprovedSmithing.dll
### At 2020-04-23 07.55.08
### Patch: virtual System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetEnerg
yCostForRefining(TaleWorlds.Core.RefiningFormula& refineFormula,
TaleWorlds.CampaignSystem.Hero hero)
### Replacement: static System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetEnerg
yCostForRefining_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.Defaul
tSmithingModel this, TaleWorlds.Core.RefiningFormula& refineFormula,
TaleWorlds.CampaignSystem.Hero hero)
IL_0000: Local var 0: System.Int32
IL_0000: Local var 1: System.Int32
IL_0000: ldc.i4 0
IL_0005: stloc 1 (System.Int32)
IL_0009: // start original
IL_0009: ldc.i4.6
IL_000A: stloc.0
IL_000B: ldarg.2
IL_000C: call static TaleWorlds.CampaignSystem.PerkObject
TaleWorlds.CampaignSystem.Crafting::get_PracticalRefiner()
IL_0011: callvirt System.Boolean
TaleWorlds.CampaignSystem.Hero::GetPerkValue(TaleWorlds.CampaignSystem.PerkObject
perk)
IL_0016: brfalse => Label0
IL_001B: ldloc.0
IL_001C: ldc.i4.1
IL_001D: add
IL_001E: ldc.i4.2
IL_001F: div
IL_0020: stloc.0
IL_0021: Label0
IL_0021: ldloc.0
IL_0022: // end original
IL_0022: stloc 1 (System.Int32)
IL_0026: ldarg 1
IL_002A: ldarg 2
IL_002E: ldloca 1 (System.Int32)
IL_0032: call static System.Void
ImprovedSmithing.AddRefiningPatch::Postfix(TaleWorlds.Core.RefiningFormula&
refineFormula, TaleWorlds.CampaignSystem.Hero hero, System.Int32& __result)
IL_0037: ldloc 1 (System.Int32)
IL_003B: ret
DONE

### Patch: virtual System.Int32


TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetEnerg
yCostForSmithing(TaleWorlds.Core.ItemObject item, TaleWorlds.CampaignSystem.Hero
hero)
### Replacement: static System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetEnerg
yCostForSmithing_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.Defaul
tSmithingModel this, TaleWorlds.Core.ItemObject item,
TaleWorlds.CampaignSystem.Hero hero)
IL_0000: Local var 0: System.Int32
IL_0000: Local var 1: System.Int32
IL_0000: ldc.i4 0
IL_0005: stloc 1 (System.Int32)
IL_0009: // start original
IL_0009: ldc.i4.s 10
IL_000B: ldc.i4.5
IL_000C: ldarg.1
IL_000D: callvirt TaleWorlds.Core.ItemTiers
TaleWorlds.Core.ItemObject::get_Tier()
IL_0012: mul
IL_0013: add
IL_0014: stloc.0
IL_0015: ldarg.2
IL_0016: call static TaleWorlds.CampaignSystem.PerkObject
TaleWorlds.CampaignSystem.Crafting::get_PracticalSmith()
IL_001B: callvirt System.Boolean
TaleWorlds.CampaignSystem.Hero::GetPerkValue(TaleWorlds.CampaignSystem.PerkObject
perk)
IL_0020: brfalse => Label0
IL_0025: ldloc.0
IL_0026: ldc.i4.1
IL_0027: add
IL_0028: ldc.i4.2
IL_0029: div
IL_002A: stloc.0
IL_002B: Label0
IL_002B: ldloc.0
IL_002C: // end original
IL_002C: stloc 1 (System.Int32)
IL_0030: ldarg 1
IL_0034: ldarg 2
IL_0038: ldloca 1 (System.Int32)
IL_003C: call static System.Void
ImprovedSmithing.AddSmithingPatch::Postfix(TaleWorlds.Core.ItemObject item,
TaleWorlds.CampaignSystem.Hero hero, System.Int32& __result)
IL_0041: ldloc 1 (System.Int32)
IL_0045: ret
DONE

### Patch: virtual System.Int32


TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetEnerg
yCostForSmelting(TaleWorlds.Core.ItemObject item, TaleWorlds.CampaignSystem.Hero
hero)
### Replacement: static System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetEnerg
yCostForSmelting_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.Defaul
tSmithingModel this, TaleWorlds.Core.ItemObject item,
TaleWorlds.CampaignSystem.Hero hero)
IL_0000: Local var 0: System.Int32
IL_0000: Local var 1: System.Int32
IL_0000: ldc.i4 0
IL_0005: stloc 1 (System.Int32)
IL_0009: // start original
IL_0009: ldc.i4.s 10
IL_000B: stloc.0
IL_000C: ldarg.2
IL_000D: call static TaleWorlds.CampaignSystem.PerkObject
TaleWorlds.CampaignSystem.Crafting::get_PracticalSmelter()
IL_0012: callvirt System.Boolean
TaleWorlds.CampaignSystem.Hero::GetPerkValue(TaleWorlds.CampaignSystem.PerkObject
perk)
IL_0017: brfalse => Label0
IL_001C: ldloc.0
IL_001D: ldc.i4.1
IL_001E: add
IL_001F: ldc.i4.2
IL_0020: div
IL_0021: stloc.0
IL_0022: Label0
IL_0022: ldloc.0
IL_0023: // end original
IL_0023: stloc 1 (System.Int32)
IL_0027: ldarg 1
IL_002B: ldarg 2
IL_002F: ldloca 1 (System.Int32)
IL_0033: call static System.Void
ImprovedSmithing.AddSmeltingPatch::Postfix(TaleWorlds.Core.ItemObject item,
TaleWorlds.CampaignSystem.Hero hero, System.Int32& __result)
IL_0038: ldloc 1 (System.Int32)
IL_003C: ret
DONE

### Patch: virtual System.Int32


TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::Research
PointsNeedForNewPart(System.Int32 count)
### Replacement: static System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::Research
PointsNeedForNewPart_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.De
faultSmithingModel this, System.Int32 count)
IL_0000: Local var 0: System.Int32
IL_0000: ldc.i4 0
IL_0005: stloc 0 (System.Int32)
IL_0009: // start original
IL_0009: ldarg.1
IL_000A: ldarg.1
IL_000B: mul
IL_000C: ldc.i4.s 12
IL_000E: add
IL_000F: ldc.i4.4
IL_0010: div
IL_0011: // end original
IL_0011: stloc 0 (System.Int32)
IL_0015: ldarg 1
IL_0019: ldloca 0 (System.Int32)
IL_001D: call static System.Void
ImprovedSmithing.AddResearchPatch::Postfix(System.Int32 count, System.Int32&
__result)
IL_0022: ldloc 0 (System.Int32)
IL_0026: ret
DONE

### Patch: virtual System.Int32


TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetModif
ierTierForSmithedWeapon(TaleWorlds.Core.WeaponDesign weaponDesign,
TaleWorlds.CampaignSystem.Hero hero)
### Replacement: static System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetModif
ierTierForSmithedWeapon_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map
.DefaultSmithingModel this, TaleWorlds.Core.WeaponDesign weaponDesign,
TaleWorlds.CampaignSystem.Hero hero)
IL_0000: Local var 0: System.Int32
IL_0000: Local var 1: System.Int32
IL_0000: Local var 2: System.Single
IL_0000: Local var 3: System.Single
IL_0000: Local var 4: System.Int32
IL_0000: ldc.i4 0
IL_0005: stloc 4 (System.Int32)
IL_0009: // start original
IL_0009: ldarg.0
IL_000A: ldarg.1
IL_000B: callvirt abstract virtual System.Int32
TaleWorlds.CampaignSystem.SmithingModel::CalculateWeaponDesignDifficulty(TaleWorlds
.Core.WeaponDesign weaponDesign)
IL_0010: stloc.0
IL_0011: ldarg.2
IL_0012: callvirt TaleWorlds.CampaignSystem.CharacterObject
TaleWorlds.CampaignSystem.Hero::get_CharacterObject()
IL_0017: call static TaleWorlds.Core.SkillObject
TaleWorlds.Core.DefaultSkills::get_Crafting()
IL_001C: callvirt virtual System.Int32
TaleWorlds.Core.BasicCharacterObject::GetSkillValue(TaleWorlds.Core.SkillObject
skill)
IL_0021: ldloc.0
IL_0022: sub
IL_0023: stloc.1
IL_0024: ldloc.1
IL_0025: ldc.i4.0
IL_0026: bge => Label0
IL_002B: ldarg.0
IL_002C: ldloc.1
IL_002D: call System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetPenal
tyForLowSkill(System.Int32 difference)
IL_0032: br => Label9
IL_0037: Label0
IL_0037: call static System.Single
TaleWorlds.Core.MBRandom::get_RandomFloat()
IL_003C: stloc.2
IL_003D: ldarg.2
IL_003E: call static TaleWorlds.CampaignSystem.PerkObject
TaleWorlds.CampaignSystem.Crafting::get_ExperiencedSmith()
IL_0043: callvirt System.Boolean
TaleWorlds.CampaignSystem.Hero::GetPerkValue(TaleWorlds.CampaignSystem.PerkObject
perk)
IL_0048: brfalse => Label1
IL_004D: ldloc.2
IL_004E: ldc.r4 0.2
IL_0053: bge.un => Label2
IL_0058: ldc.i4.1
IL_0059: br => Label10
IL_005E: Label1
IL_005E: Label2
IL_005E: ldarg.2
IL_005F: call static TaleWorlds.CampaignSystem.PerkObject
TaleWorlds.CampaignSystem.Crafting::get_MasterSmith()
IL_0064: callvirt System.Boolean
TaleWorlds.CampaignSystem.Hero::GetPerkValue(TaleWorlds.CampaignSystem.PerkObject
perk)
IL_0069: brfalse => Label3
IL_006E: ldloc.2
IL_006F: ldc.r4 0.2
IL_0074: blt.un => Label4
IL_0079: ldloc.2
IL_007A: ldc.r4 0.35
IL_007F: bge.un => Label5
IL_0084: ldc.i4.2
IL_0085: br => Label11
IL_008A: Label3
IL_008A: Label4
IL_008A: Label5
IL_008A: ldarg.2
IL_008B: call static TaleWorlds.CampaignSystem.PerkObject
TaleWorlds.CampaignSystem.Crafting::get_LegendarySmith()
IL_0090: callvirt System.Boolean
TaleWorlds.CampaignSystem.Hero::GetPerkValue(TaleWorlds.CampaignSystem.PerkObject
perk)
IL_0095: brfalse => Label6
IL_009A: ldc.r4 0.05
IL_009F: ldc.r4 0
IL_00A4: ldarg.2
IL_00A5: call static TaleWorlds.Core.SkillObject
TaleWorlds.Core.DefaultSkills::get_Crafting()
IL_00AA: callvirt System.Int32
TaleWorlds.CampaignSystem.Hero::GetSkillValue(TaleWorlds.Core.SkillObject skill)
IL_00AF: ldc.i4 300
IL_00B4: sub
IL_00B5: conv.r4
IL_00B6: call static System.Single System.Math::Max(System.Single val1,
System.Single val2)
IL_00BB: ldc.r4 0.01
IL_00C0: mul
IL_00C1: add
IL_00C2: stloc.3
IL_00C3: ldloc.2
IL_00C4: ldc.r4 0.5
IL_00C9: ble.un => Label7
IL_00CE: ldloc.2
IL_00CF: ldc.r4 0.5
IL_00D4: ldloc.3
IL_00D5: add
IL_00D6: bge.un => Label8
IL_00DB: ldc.i4.3
IL_00DC: br => Label12
IL_00E1: Label6
IL_00E1: Label7
IL_00E1: Label8
IL_00E1: ldc.i4.0
IL_00E2: // end original
IL_00E2: Label9
IL_00E2: Label10
IL_00E2: Label11
IL_00E2: Label12
IL_00E2: stloc 4 (System.Int32)
IL_00E6: ldarg.0
IL_00E7: ldarg 1
IL_00EB: ldarg 2
IL_00EF: ldloca 4 (System.Int32)
IL_00F3: call static System.Void
ImprovedSmithing.AddModifierTierPatch::Postfix(TaleWorlds.CampaignSystem.SandBox.Ga
meComponents.Map.DefaultSmithingModel __instance, TaleWorlds.Core.WeaponDesign
weaponDesign, TaleWorlds.CampaignSystem.Hero hero, System.Int32& __result)
IL_00F8: ldloc 4 (System.Int32)
IL_00FC: ret
DONE

### Patch: virtual TaleWorlds.Core.OverrideData


TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetModif
ierChanges(System.Int32 modifierTier)
### Replacement: static TaleWorlds.Core.OverrideData
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetModif
ierChanges_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmith
ingModel this, System.Int32 modifierTier)
IL_0000: Local var 0: System.Int32
IL_0000: Local var 1: TaleWorlds.Core.Crafting/OverrideData
IL_0000: ldnull
IL_0001: stloc 1 (TaleWorlds.Core.Crafting+OverrideData)
IL_0005: // start original
IL_0005: ldarg.0
IL_0006: ldarg.1
IL_0007: call System.Int32
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetPoint
sToModify(System.Int32 modifierTier)
IL_000C: stloc.0
IL_000D: ldloc.0
IL_000E: brfalse => Label0
IL_0013: ldarg.0
IL_0014: ldloc.0
IL_0015: call TaleWorlds.Core.OverrideData
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::ModifyWe
aponDesign(System.Int32 numPoints)
IL_001A: br => Label1
IL_001F: Label0
IL_001F: ldc.r4 0
IL_0024: ldc.i4.0
IL_0025: ldc.i4.0
IL_0026: ldc.i4.0
IL_0027: ldc.i4.0
IL_0028: newobj System.Void TaleWorlds.Core.OverrideData::.ctor(System.Single
weightOverriden, System.Int32 swingSpeedOverriden, System.Int32
thrustSpeedOverriden, System.Int32 swingDamageOverriden, System.Int32
thrustDamageOverriden)
IL_002D: // end original
IL_002D: Label1
IL_002D: stloc 1 (TaleWorlds.Core.Crafting+OverrideData)
IL_0031: ldarg.0
IL_0032: ldarg 1
IL_0036: ldloca 1 (TaleWorlds.Core.Crafting+OverrideData)
IL_003A: call static System.Void
ImprovedSmithing.AddModifierChangesPatch::Postfix(TaleWorlds.CampaignSystem.SandBox
.GameComponents.Map.DefaultSmithingModel __instance, System.Int32 modifierTier,
TaleWorlds.Core.OverrideData& __result)
IL_003F: ldloc 1 (TaleWorlds.Core.Crafting+OverrideData)
IL_0043: ret
DONE
### Patch: virtual
System.Collections.Generic.IEnumerable`1<TaleWorlds.Core.RefiningFormula>
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetRefin
ingFormulas(TaleWorlds.CampaignSystem.Hero weaponsmith)
### Replacement: static
System.Collections.Generic.IEnumerable`1<TaleWorlds.Core.RefiningFormula>
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmithingModel::GetRefin
ingFormulas_Patch1(TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.DefaultSmit
hingModel this, TaleWorlds.CampaignSystem.Hero weaponsmith)
IL_0000: Local var 0:
System.Collections.Generic.IEnumerable`1<TaleWorlds.Core.Crafting/RefiningFormula>
IL_0000: ldnull
IL_0001: stloc 0
(System.Collections.Generic.IEnumerable`1[TaleWorlds.Core.Crafting+RefiningFormula]
)
IL_0005: // start original
IL_0005: ldc.i4.s -2
IL_0007: newobj System.Void
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.<GetRefiningFormulas>d__8::.ct
or(System.Int32 <>1__state)
IL_000C: dup
IL_000D: ldarg.1
IL_000E: stfld TaleWorlds.CampaignSystem.Hero
TaleWorlds.CampaignSystem.SandBox.GameComponents.Map.<GetRefiningFormulas>d__8::<>3
__weaponsmith
IL_0013: // end original
IL_0013: stloc 0
(System.Collections.Generic.IEnumerable`1[TaleWorlds.Core.Crafting+RefiningFormula]
)
IL_0017: ldarg.0
IL_0018: ldarg 1
IL_001C: ldloca 0
(System.Collections.Generic.IEnumerable`1[TaleWorlds.Core.Crafting+RefiningFormula]
)
IL_0020: call static System.Void
ImprovedSmithing.RecipePatch::Postfix(TaleWorlds.CampaignSystem.SandBox.GameCompone
nts.Map.DefaultSmithingModel __instance, TaleWorlds.CampaignSystem.Hero
weaponsmith, System.Collections.Generic.IEnumerable`1& __result)
IL_0025: ldloc 0
(System.Collections.Generic.IEnumerable`1[TaleWorlds.Core.Crafting+RefiningFormula]
)
IL_0029: ret
DONE

### Harmony id=bannerlord.mboptionscreen.defaultmapscreeninjection_v1,


version=2.0.0.9, location=C:\Program Files (x86)\Steam\steamapps\common\Mount &
Blade II Bannerlord\bin\Win64_Shipping_Client\0Harmony.dll
### Started from static System.Void
MBOptionScreen.MBOptionScreenSubModule::EndInitialization(), location C:\Program
Files (x86)\Steam\steamapps\common\Mount & Blade II
Bannerlord\Modules\zzzBuyPatrols\bin\Win64_Shipping_Client\MBOptionScreen.dll
### At 2020-04-23 07.55.11
### Patch:
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM> SandBox.View.Map.MapScreen::GetEscapeMenuItems()
### Replacement: static
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>
SandBox.View.Map.MapScreen::GetEscapeMenuItems_Patch1(SandBox.View.Map.MapScreen
this)
IL_0000: Local var 0:
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>
IL_0000: ldnull
IL_0001: stloc 0
(System.Collections.Generic.List`1[TaleWorlds.MountAndBlade.ViewModelCollection.Esc
apeMenuItemVM])
IL_0005: // start original
IL_0005: newobj System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::.ctor()
IL_000A: dup
IL_000B: ldstr "{=XzZFhRwr}Return To The Game"
IL_0010: ldnull
IL_0011: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_0016: ldarg.0
IL_0017: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_0(System.Object o)
IL_001D: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_0022: ldnull
IL_0023: ldc.i4.0
IL_0024: ldc.i4.1
IL_0025: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_002A: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_002F: dup
IL_0030: ldstr "{=PXT6aA4J}Campaign Options"
IL_0035: ldnull
IL_0036: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_003B: ldarg.0
IL_003C: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_1(System.Object o)
IL_0042: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_0047: ldnull
IL_0048: ldc.i4.0
IL_0049: ldc.i4.0
IL_004A: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_004F: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_0054: dup
IL_0055: ldstr "{=NqarFr4P}Options"
IL_005A: ldnull
IL_005B: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_0060: ldarg.0
IL_0061: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_2(System.Object o)
IL_0067: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_006C: ldnull
IL_006D: ldc.i4.0
IL_006E: ldc.i4.0
IL_006F: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_0074: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_0079: dup
IL_007A: ldstr "{=bV75iwKa}Save"
IL_007F: ldnull
IL_0080: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_0085: ldarg.0
IL_0086: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_3(System.Object o)
IL_008C: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_0091: ldnull
IL_0092: ldc.i4.0
IL_0093: ldc.i4.0
IL_0094: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_0099: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_009E: dup
IL_009F: ldstr "{=e0KdfaNe}Save As"
IL_00A4: ldnull
IL_00A5: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_00AA: ldarg.0
IL_00AB: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_4(System.Object o)
IL_00B1: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_00B6: ldnull
IL_00B7: ldc.i4.0
IL_00B8: ldc.i4.0
IL_00B9: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_00BE: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_00C3: dup
IL_00C4: ldstr "{=9NuttOBC}Load"
IL_00C9: ldnull
IL_00CA: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_00CF: ldarg.0
IL_00D0: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_5(System.Object o)
IL_00D6: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_00DB: ldnull
IL_00DC: ldc.i4.0
IL_00DD: ldc.i4.0
IL_00DE: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_00E3: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_00E8: dup
IL_00E9: ldstr "{=AbEh2y8o}Save And Exit"
IL_00EE: ldnull
IL_00EF: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_00F4: ldarg.0
IL_00F5: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_6(System.Object o)
IL_00FB: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_0100: ldnull
IL_0101: ldc.i4.0
IL_0102: ldc.i4.0
IL_0103: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_0108: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_010D: dup
IL_010E: ldstr "{=RamV6yLM}Exit to Main Menu"
IL_0113: ldnull
IL_0114: newobj System.Void
TaleWorlds.Localization.TextObject::.ctor(System.String value,
System.Collections.Generic.Dictionary`2<System.String,
TaleWorlds.Localization.TextObject> attributes)
IL_0119: ldarg.0
IL_011A: ldftn System.Void
SandBox.View.Map.MapScreen::<GetEscapeMenuItems>b__301_7(System.Object o)
IL_0120: newobj System.Void System.Action`1<System.Object>::.ctor(System.Object
object, System.IntPtr method)
IL_0125: ldnull
IL_0126: ldc.i4.0
IL_0127: ldc.i4.0
IL_0128: newobj System.Void
TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM::.ctor(TaleWorlds.Loc
alization.TextObject item, System.Action`1<System.Object> onExecute, System.Object
identifier, System.Boolean isDisabled, System.Boolean isPositiveBehavioured)
IL_012D: callvirt virtual System.Void
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM>::Add(TaleWorlds.MountAndBlade.ViewModelCollection.EscapeMenuItemVM
item)
IL_0132: // end original
IL_0132: stloc 0
(System.Collections.Generic.List`1[TaleWorlds.MountAndBlade.ViewModelCollection.Esc
apeMenuItemVM])
IL_0136: ldarg.0
IL_0137: ldloc 0
(System.Collections.Generic.List`1[TaleWorlds.MountAndBlade.ViewModelCollection.Esc
apeMenuItemVM])
IL_013B: call static System.Void
MBOptionScreen.MBOptionScreenSubModule::GetEscapeMenuItemsPostfix(SandBox.View.Map.
MapScreen __instance,
System.Collections.Generic.List`1<TaleWorlds.MountAndBlade.ViewModelCollection.Esca
peMenuItemVM> __result)
IL_0140: ldloc 0
(System.Collections.Generic.List`1[TaleWorlds.MountAndBlade.ViewModelCollection.Esc
apeMenuItemVM])
IL_0144: ret
DONE

### Harmony id=WorkshopStashMod.patcher, version=2.0.0.9, location=C:\Program Files


(x86)\Steam\steamapps\common\Mount & Blade II
Bannerlord\bin\Win64_Shipping_Client\0Harmony.dll
### Started from virtual System.Void
WorkshopStashMod.WorkshopStashSubModule::OnGameStart(TaleWorlds.Core.Game game,
TaleWorlds.Core.IGameStarter gameStarterObject), location C:\Program Files
(x86)\Steam\steamapps\common\Mount & Blade II
Bannerlord\Modules\WorkshopStashMod\bin\Win64_Shipping_Client\WorkshopStashMod.dll
### At 2020-04-23 07.55.27
### Patch: System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::RefreshList()
### Replacement: static System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::RefreshList_Patch0(TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.
Categories.ClanIncomeVM this)
IL_0000: Local var 0:
System.Collections.Generic.List`1/Enumerator<TaleWorlds.CampaignSystem.Settlement>
IL_0000: Local var 1: TaleWorlds.CampaignSystem.Settlement
IL_0000: Local var 2: TaleWorlds.CampaignSystem.Workshop[]
IL_0000: Local var 3: System.Int32
IL_0000: Local var 4: TaleWorlds.CampaignSystem.Workshop
IL_0000: Local var 5:
System.Collections.Generic.List`1/Enumerator<TaleWorlds.CampaignSystem.CommonArea>
IL_0000: Local var 6: TaleWorlds.CampaignSystem.CommonArea
IL_0000: // start original
IL_0000: ldarg.0
IL_0001: call
TaleWorlds.Library.MBBindingList`1<TaleWorlds.CampaignSystem.ViewModelCollection.Cl
anManagement.ClanFinanceIncomeItemBaseVM>
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::get_Incomes()
IL_0006: callvirt virtual System.Void
System.Collections.ObjectModel.Collection`1<TaleWorlds.CampaignSystem.ViewModelColl
ection.ClanManagement.ClanFinanceIncomeItemBaseVM>::Clear()
IL_000B: call static
TaleWorlds.Library.MBReadOnlyList`1<TaleWorlds.CampaignSystem.Settlement>
TaleWorlds.CampaignSystem.Settlement::get_All()
IL_0010: callvirt
System.Collections.Generic.Enumerator<TaleWorlds.CampaignSystem.Settlement>
TaleWorlds.Library.MBReadOnlyList`1<TaleWorlds.CampaignSystem.Settlement>::GetEnume
rator()
IL_0015: stloc.0
.try
{
IL_0016: br => Label0
IL_001B: Label11
IL_001B: ldloca.s 0
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.Settlement]
)
IL_001D: call virtual TaleWorlds.CampaignSystem.Settlement
System.Collections.Generic.Enumerator<TaleWorlds.CampaignSystem.Settlement>::get_Cu
rrent()
IL_0022: stloc.1
IL_0023: ldloc.1
IL_0024: callvirt System.Boolean
TaleWorlds.CampaignSystem.Settlement::get_IsTown()
IL_0029: brfalse => Label1
IL_002E: ldloc.1
IL_002F: ldfld TaleWorlds.CampaignSystem.Town
TaleWorlds.CampaignSystem.Settlement::Town
IL_0034: callvirt TaleWorlds.CampaignSystem.Workshop[]
TaleWorlds.CampaignSystem.Town::get_Workshops()
IL_0039: stloc.2
IL_003A: ldc.i4.0
IL_003B: stloc.3
IL_003C: br => Label2
IL_0041: Label4
IL_0041: ldloc.2
IL_0042: ldloc.3
IL_0043: ldelem.ref
IL_0044: stloc.s 4 (TaleWorlds.CampaignSystem.Workshop)
IL_0046: ldloc.s 4 (TaleWorlds.CampaignSystem.Workshop)
IL_0048: callvirt abstract virtual TaleWorlds.CampaignSystem.Hero
TaleWorlds.CampaignSystem.SettlementArea::get_Owner()
IL_004D: call static TaleWorlds.CampaignSystem.Hero
TaleWorlds.CampaignSystem.Hero::get_MainHero()
IL_0052: bne.un => Label3
IL_0057: ldarg.0
IL_0058: call
TaleWorlds.Library.MBBindingList`1<TaleWorlds.CampaignSystem.ViewModelCollection.Cl
anManagement.ClanFinanceIncomeItemBaseVM>
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::get_Incomes()
IL_005D: ldloc.s 4 (TaleWorlds.CampaignSystem.Workshop)
IL_005F: ldarg.0
IL_0060: ldftn System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::OnIncomeSelection(TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.C
lanFinanceIncomeItemBaseVM income)
IL_0066: newobj System.Void
System.Action`1<TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.ClanFi
nanceIncomeItemBaseVM>::.ctor(System.Object object, System.IntPtr method)
IL_006B: ldarg.0
IL_006C: ldftn System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::OnRefresh()
IL_0072: newobj System.Void System.Action::.ctor(System.Object object,
System.IntPtr method)
IL_0077: newobj System.Void
WorkshopStashMod.ClanFinanceWorkshopItemExpandedVM::.ctor(TaleWorlds.CampaignSystem
.Workshop workshop,
System.Action`1<TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.ClanFi
nanceIncomeItemBaseVM> onSelection, System.Action onRefresh)
IL_007C: callvirt virtual System.Void
System.Collections.ObjectModel.Collection`1<TaleWorlds.CampaignSystem.ViewModelColl
ection.ClanManagement.ClanFinanceIncomeItemBaseVM>::Add(TaleWorlds.CampaignSystem.V
iewModelCollection.ClanManagement.ClanFinanceIncomeItemBaseVM item)
IL_0081: Label3
IL_0081: ldloc.3
IL_0082: ldc.i4.1
IL_0083: add
IL_0084: stloc.3
IL_0085: Label2
IL_0085: ldloc.3
IL_0086: ldloc.2
IL_0087: ldlen
IL_0088: conv.i4
IL_0089: blt => Label4
IL_008E: Label1
IL_008E: ldloc.1
IL_008F: callvirt System.Boolean
TaleWorlds.CampaignSystem.Settlement::get_IsTown()
IL_0094: brtrue => Label5
IL_0099: ldloc.1
IL_009A: callvirt System.Boolean
TaleWorlds.CampaignSystem.Settlement::get_IsVillage()
IL_009F: brfalse => Label6
IL_00A4: Label5
IL_00A4: ldloc.1
IL_00A5: callvirt
System.Collections.Generic.List`1<TaleWorlds.CampaignSystem.CommonArea>
TaleWorlds.CampaignSystem.Settlement::get_CommonAreas()
IL_00AA: callvirt
System.Collections.Generic.Enumerator<TaleWorlds.CampaignSystem.CommonArea>
System.Collections.Generic.List`1<TaleWorlds.CampaignSystem.CommonArea>::GetEnumera
tor()
IL_00AF: stloc.s 5
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.CommonArea]
)
.try
{
IL_00B1: br => Label7
IL_00B6: Label9
IL_00B6: ldloca.s 5
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.CommonArea]
)
IL_00B8: call virtual TaleWorlds.CampaignSystem.CommonArea
System.Collections.Generic.Enumerator<TaleWorlds.CampaignSystem.CommonArea>::get_Cu
rrent()
IL_00BD: stloc.s 6 (TaleWorlds.CampaignSystem.CommonArea)
IL_00BF: ldloc.s 6 (TaleWorlds.CampaignSystem.CommonArea)
IL_00C1: callvirt abstract virtual TaleWorlds.CampaignSystem.Hero
TaleWorlds.CampaignSystem.SettlementArea::get_Owner()
IL_00C6: call static TaleWorlds.CampaignSystem.Hero
TaleWorlds.CampaignSystem.Hero::get_MainHero()
IL_00CB: bne.un => Label8
IL_00D0: ldarg.0
IL_00D1: call
TaleWorlds.Library.MBBindingList`1<TaleWorlds.CampaignSystem.ViewModelCollection.Cl
anManagement.ClanFinanceIncomeItemBaseVM>
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::get_Incomes()
IL_00D6: ldloc.s 6 (TaleWorlds.CampaignSystem.CommonArea)
IL_00D8: ldarg.0
IL_00D9: ldftn System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::OnIncomeSelection(TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.C
lanFinanceIncomeItemBaseVM income)
IL_00DF: newobj System.Void
System.Action`1<TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.ClanFi
nanceIncomeItemBaseVM>::.ctor(System.Object object, System.IntPtr method)
IL_00E4: ldarg.0
IL_00E5: ldftn System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::OnRefresh()
IL_00EB: newobj System.Void System.Action::.ctor(System.Object
object, System.IntPtr method)
IL_00F0: newobj System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.ClanFinance.ClanFinanc
eCommonAreaItemVM::.ctor(TaleWorlds.CampaignSystem.CommonArea commonArea,
System.Action`1<TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.ClanFi
nanceIncomeItemBaseVM> onSelection, System.Action onRefresh)
IL_00F5: callvirt virtual System.Void
System.Collections.ObjectModel.Collection`1<TaleWorlds.CampaignSystem.ViewModelColl
ection.ClanManagement.ClanFinanceIncomeItemBaseVM>::Add(TaleWorlds.CampaignSystem.V
iewModelCollection.ClanManagement.ClanFinanceIncomeItemBaseVM item)
IL_00FA: Label7
IL_00FA: Label8
IL_00FA: ldloca.s 5
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.CommonArea]
)
IL_00FC: call virtual System.Boolean
System.Collections.Generic.Enumerator<TaleWorlds.CampaignSystem.CommonArea>::MoveNe
xt()
IL_0101: brtrue => Label9
IL_0106: leave => Label10
IL_010B: leave => (autogenerated)
} // end try
.finally
{
IL_0110: ldloca.s 5
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.CommonArea]
)
IL_0112: constrained.
System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.CommonArea]
IL_0118: callvirt abstract virtual System.Void
System.IDisposable::Dispose()
IL_011D: endfinally
IL_011E: leave => (autogenerated)
} // end handler
IL_011F: Label0
IL_011F: Label6
IL_011F: Label10
IL_011F: ldloca.s 0
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.Settlement]
)
IL_0121: call virtual System.Boolean
System.Collections.Generic.Enumerator<TaleWorlds.CampaignSystem.Settlement>::MoveNe
xt()
IL_0126: brtrue => Label11
IL_012B: leave => Label12
IL_0130: leave => (autogenerated)
} // end try
.finally
{
IL_0135: ldloca.s 0
(System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.Settlement]
)
IL_0137: constrained.
System.Collections.Generic.List`1+Enumerator[TaleWorlds.CampaignSystem.Settlement]
IL_013D: callvirt abstract virtual System.Void
System.IDisposable::Dispose()
IL_0142: endfinally
IL_0143: leave => (autogenerated)
} // end handler
IL_0144: Label12
IL_0144: ldarg.0
IL_0145: call System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::RefreshTotalIncome()
IL_014A: ldarg.0
IL_014B: ldarg.0
IL_014C: call
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.ClanFinanceIncomeItemB
aseVM
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::GetDefaultIncome()
IL_0151: call System.Void
TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.Categories.ClanIncomeV
M::OnIncomeSelection(TaleWorlds.CampaignSystem.ViewModelCollection.ClanManagement.C
lanFinanceIncomeItemBaseVM income)
IL_0156: ldarg.0
IL_0157: callvirt virtual System.Void
TaleWorlds.Library.ViewModel::RefreshValues()
IL_015C: // end original
IL_015C: ret
DONE

### Patch: static System.Void


TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::Cons
umeInput(TaleWorlds.Core.ItemCategory productionInput,
TaleWorlds.CampaignSystem.Town town, TaleWorlds.CampaignSystem.Workshop workshop,
System.Boolean doNotEffectCapital)
### Replacement: static System.Void
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::Cons
umeInput_Patch1(TaleWorlds.Core.ItemCategory productionInput,
TaleWorlds.CampaignSystem.Town town, TaleWorlds.CampaignSystem.Workshop workshop,
System.Boolean doNotEffectCapital)
IL_0000: Local var 0:
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior/<>c__
DisplayClass38_0
IL_0000: Local var 1: TaleWorlds.CampaignSystem.ItemRoster
IL_0000: Local var 2: System.Int32
IL_0000: Local var 3: TaleWorlds.Core.ItemObject
IL_0000: Local var 4: System.Int32
IL_0000: Local var 5: System.Boolean
IL_0000: ldc.i4 0
IL_0005: stloc 5 (System.Boolean)
IL_0009: ldc.i4.1
IL_000A: stloc 5 (System.Boolean)
IL_000E: ldloc 5 (System.Boolean)
IL_0012: brfalse.s => Label1
IL_0014: ldarg 0
IL_0018: ldarg 1
IL_001C: ldarg 2
IL_0020: ldarg 3
IL_0024: call static System.Boolean
WorkshopStashMod.WorkshopsCampaignBehavior_ConsumeInput_Patch::Prefix(TaleWorlds.Co
re.ItemCategory productionInput, TaleWorlds.CampaignSystem.Town town,
TaleWorlds.CampaignSystem.Workshop workshop, System.Boolean doNotEffectCapital)
IL_0029: stloc 5 (System.Boolean)
IL_002D: nop
IL_002E: ldloc 5 (System.Boolean)
IL_0032: brfalse => Label0
IL_0037: // start original
IL_0037: newobj System.Void
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c__DisplayClass38_0::.ctor()
IL_003C: stloc.0
IL_003D: ldloc.0
IL_003E: ldarg.0
IL_003F: stfld TaleWorlds.Core.ItemCategory
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c__DisplayClass38_0::producti
onInput
IL_0044: ldarg.1
IL_0045: callvirt TaleWorlds.CampaignSystem.PartyBase
TaleWorlds.CampaignSystem.SettlementComponent::get_Owner()
IL_004A: callvirt TaleWorlds.CampaignSystem.ItemRoster
TaleWorlds.CampaignSystem.PartyBase::get_ItemRoster()
IL_004F: stloc.1
IL_0050: ldloc.1
IL_0051: ldloc.0
IL_0052: ldftn System.Boolean
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c__DisplayClass38_0::<Consume
Input>b__0(TaleWorlds.Core.ItemObject x)
IL_0058: newobj System.Void
System.Predicate`1<TaleWorlds.Core.ItemObject>::.ctor(System.Object object,
System.IntPtr method)
IL_005D: callvirt System.Int32
TaleWorlds.CampaignSystem.ItemRoster::FindIndex(System.Predicate`1<TaleWorlds.Core.
ItemObject> predicate)
IL_0062: stloc.2
IL_0063: ldloc.2
IL_0064: ldc.i4.0
IL_0065: blt => Label2
IL_006A: ldloc.1
IL_006B: ldloc.2
IL_006C: callvirt TaleWorlds.Core.ItemObject
TaleWorlds.CampaignSystem.ItemRoster::GetItemAtIndex(System.Int32 index)
IL_0071: stloc.3
IL_0072: ldarg.1
IL_0073: ldloc.3
IL_0074: ldnull
IL_0075: ldc.i4.0
IL_0076: callvirt virtual System.Int32
TaleWorlds.CampaignSystem.SettlementComponent::GetItemPrice(TaleWorlds.Core.ItemObj
ect item, TaleWorlds.CampaignSystem.MobileParty tradingParty, System.Boolean
isSelling)
IL_007B: stloc.s 4 (System.Int32)
IL_007D: ldloc.1
IL_007E: ldloc.2
IL_007F: ldc.i4.m1
IL_0080: ldc.i4.1
IL_0081: callvirt System.Void
TaleWorlds.CampaignSystem.ItemRoster::AddToCountsAtIndex(System.Int32 index,
System.Int32 count, System.Boolean removeDepleted)
IL_0086: ldarg.1
IL_0087: callvirt TaleWorlds.CampaignSystem.TownMarketData
TaleWorlds.CampaignSystem.Town::get_MarketData()
IL_008C: ldloc.3
IL_008D: callvirt TaleWorlds.Core.ItemCategory
TaleWorlds.Core.ItemObject::get_ItemCategory()
IL_0092: ldloc.s 4 (System.Int32)
IL_0094: conv.r4
IL_0095: call static TaleWorlds.CampaignSystem.Campaign
TaleWorlds.CampaignSystem.Campaign::get_Current()
IL_009A: ldfld System.Boolean TaleWorlds.CampaignSystem.Campaign::GameStarted
IL_009F: brfalse => Label3
IL_00A4: ldc.r4 1
IL_00A9: br => Label4
IL_00AE: Label3
IL_00AE: ldc.r4 0.5
IL_00B3: Label4
IL_00B3: mul
IL_00B4: callvirt System.Void
TaleWorlds.CampaignSystem.TownMarketData::AddDemand(TaleWorlds.Core.ItemCategory
itemCategory, System.Single demandAmount)
IL_00B9: call static TaleWorlds.CampaignSystem.Campaign
TaleWorlds.CampaignSystem.Campaign::get_Current()
IL_00BE: ldfld System.Boolean TaleWorlds.CampaignSystem.Campaign::GameStarted
IL_00C3: brfalse => Label5
IL_00C8: ldarg.3
IL_00C9: brtrue => Label6
IL_00CE: ldarg.2
IL_00CF: ldloc.s 4 (System.Int32)
IL_00D1: neg
IL_00D2: callvirt System.Void
TaleWorlds.CampaignSystem.Workshop::ChangeGold(System.Int32 goldChange)
IL_00D7: ldarg.1
IL_00D8: ldloc.s 4 (System.Int32)
IL_00DA: callvirt System.Void
TaleWorlds.CampaignSystem.SettlementComponent::ChangeGold(System.Int32
changeAmount)
IL_00DF: Label5
IL_00DF: Label6
IL_00DF: call static TaleWorlds.CampaignSystem.CampaignEventDispatcher
TaleWorlds.CampaignSystem.CampaignEventDispatcher::get_Instance()
IL_00E4: ldloc.3
IL_00E5: ldarg.1
IL_00E6: callvirt TaleWorlds.CampaignSystem.PartyBase
TaleWorlds.CampaignSystem.SettlementComponent::get_Owner()
IL_00EB: callvirt TaleWorlds.CampaignSystem.Settlement
TaleWorlds.CampaignSystem.PartyBase::get_Settlement()
IL_00F0: ldc.i4.1
IL_00F1: callvirt virtual System.Void
TaleWorlds.CampaignSystem.CampaignEventReceiver::OnItemConsumed(TaleWorlds.Core.Ite
mObject itemObject, TaleWorlds.CampaignSystem.Settlement settlement, System.Int32
count)
IL_00F6: // end original
IL_00F6: Label2
IL_00F6: Label0
IL_00F6: ret
DONE

### Patch: System.Boolean


TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::DoPr
oduction(TaleWorlds.CampaignSystem.Production production,
TaleWorlds.CampaignSystem.Workshop workshop, TaleWorlds.CampaignSystem.Town town)
### Replacement: static System.Boolean
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::DoPr
oduction_Patch0(TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampai
gnBehavior this, TaleWorlds.CampaignSystem.Production production,
TaleWorlds.CampaignSystem.Workshop workshop, TaleWorlds.CampaignSystem.Town town)
IL_0000: Local var 0:
System.Collections.Generic.List`1<System.ValueTuple`2<TaleWorlds.Core.ItemObject,Sy
stem.Int32>>
IL_0000: Local var 1:
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category,System.Int32>>
IL_0000: Local var 2: System.Int32
IL_0000: Local var 3: System.Boolean
IL_0000: Local var 4: System.Int32
IL_0000: Local var 5: System.Int32
IL_0000: Local var 6: System.Boolean
IL_0000: Local var 7: System.Int32
IL_0000: Local var 8: System.Int32
IL_0000: Local var 9: TaleWorlds.Core.ItemModifier
IL_0000: Local var 10: TaleWorlds.Core.ItemObject
IL_0000: Local var 11:
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory,System.Int32>>
IL_0000: Local var 12:
System.ValueTuple`2<TaleWorlds.Core.ItemCategory,System.Int32>
IL_0000: Local var 13:
System.ValueTuple`2<TaleWorlds.Core.ItemCategory,System.Int32>
IL_0000: Local var 14:
System.Collections.Generic.List`1/Enumerator<System.ValueTuple`2<TaleWorlds.Core.It
emObject,System.Int32>>
IL_0000: Local var 15: System.ValueTuple`2<TaleWorlds.Core.ItemObject,System.Int32>
IL_0000: Local var 16: TaleWorlds.CampaignSystem.Town
IL_0000: Local var 17: TaleWorlds.Core.ItemCategory
IL_0000: // start original
IL_0000: newobj System.Void
System.Collections.Generic.List`1<System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>>::.ctor()
IL_0005: stloc.0
IL_0006: ldarga.s 1
IL_0008: call
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>> TaleWorlds.CampaignSystem.Production::get_Inputs()
IL_000D: stloc.1
IL_000E: ldc.i4.0
IL_000F: stloc.2
IL_0010: ldarg.1
IL_0011: ldarg.3
IL_0012: ldloca.s 2 (System.Int32)
IL_0014: ldarg.2
IL_0015: call static System.Boolean
WorkshopStashMod.WorkshopsCampaignBehavior_DoProduction_Patch::DetermineTownHasSuff
icientInputsReplacement(TaleWorlds.CampaignSystem.Production production,
TaleWorlds.CampaignSystem.Town town, System.Int32& inputMaterialCost,
TaleWorlds.CampaignSystem.Workshop workshop)
IL_001A: stloc.3
IL_001B: ldloc.3
IL_001C: brtrue => Label0
IL_0021: ldc.i4.0
IL_0022: br => Label34
IL_0027: Label0
IL_0027: ldloc.3
IL_0028: brfalse => Label1
IL_002D: ldc.i4.0
IL_002E: stloc.s 4 (System.Int32)
IL_0030: ldc.i4.0
IL_0031: stloc.s 5 (System.Int32)
IL_0033: ldc.i4.0
IL_0034: stloc.s 7 (System.Int32)
IL_0036: br => Label2
IL_003B: Label4
IL_003B: ldarga.s 1
IL_003D: call
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>> TaleWorlds.CampaignSystem.Production::get_Outputs()
IL_0042: ldloc.s 7 (System.Int32)
IL_0044: callvirt abstract virtual
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>>::get_Item(System.Int32 index)
IL_0049: ldfld System.Int32 System.ValueTuple`2<TaleWorlds.Core.ItemCategory,
System.Int32>::Item2
IL_004E: stloc.s 8 (System.Int32)
IL_0050: ldloc.s 4 (System.Int32)
IL_0052: ldloc.s 8 (System.Int32)
IL_0054: add
IL_0055: stloc.s 4 (System.Int32)
IL_0057: ldnull
IL_0058: stloc.s 9 (TaleWorlds.Core.ItemModifier)
IL_005A: ldarg.0
IL_005B: ldarga.s 1
IL_005D: call
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>> TaleWorlds.CampaignSystem.Production::get_Outputs()
IL_0062: ldloc.s 7 (System.Int32)
IL_0064: callvirt abstract virtual
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>>::get_Item(System.Int32 index)
IL_0069: ldfld TaleWorlds.Core.ItemCategory
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>::Item1
IL_006E: ldarg.3
IL_006F: call TaleWorlds.Core.ItemObject
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::GetR
andomItem(TaleWorlds.Core.ItemCategory itemGroupBase,
TaleWorlds.CampaignSystem.Town townComponent)
IL_0074: stloc.s 10 (TaleWorlds.Core.ItemObject)
IL_0076: ldloc.s 10 (TaleWorlds.Core.ItemObject)
IL_0078: brfalse => Label3
IL_007D: ldarg.3
IL_007E: ldloc.s 10 (TaleWorlds.Core.ItemObject)
IL_0080: ldloc.s 9 (TaleWorlds.Core.ItemModifier)
IL_0082: newobj System.Void
TaleWorlds.Core.EquipmentElement::.ctor(TaleWorlds.Core.ItemObject item,
TaleWorlds.Core.ItemModifier itemModifier)
IL_0087: ldnull
IL_0088: ldc.i4.1
IL_0089: callvirt virtual System.Int32
TaleWorlds.CampaignSystem.SettlementComponent::GetItemPrice(TaleWorlds.Core.Equipme
ntElement itemRosterElement, TaleWorlds.CampaignSystem.MobileParty tradingParty,
System.Boolean isSelling)
IL_008E: pop
IL_008F: ldloc.0
IL_0090: ldloc.s 10 (TaleWorlds.Core.ItemObject)
IL_0092: ldloc.s 8 (System.Int32)
IL_0094: newobj System.Void System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>::.ctor(TaleWorlds.Core.ItemObject item1, System.Int32 item2)
IL_0099: callvirt virtual System.Void
System.Collections.Generic.List`1<System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>>::Add(System.ValueTuple`2<TaleWorlds.Core.ItemObject, System.Int32>
item)
IL_009E: ldloc.s 5 (System.Int32)
IL_00A0: ldarg.3
IL_00A1: ldloc.s 10 (TaleWorlds.Core.ItemObject)
IL_00A3: ldnull
IL_00A4: ldc.i4.1
IL_00A5: callvirt virtual System.Int32
TaleWorlds.CampaignSystem.SettlementComponent::GetItemPrice(TaleWorlds.Core.ItemObj
ect item, TaleWorlds.CampaignSystem.MobileParty tradingParty, System.Boolean
isSelling)
IL_00AA: ldloc.s 8 (System.Int32)
IL_00AC: mul
IL_00AD: add
IL_00AE: stloc.s 5 (System.Int32)
IL_00B0: Label3
IL_00B0: ldloc.s 7 (System.Int32)
IL_00B2: ldc.i4.1
IL_00B3: add
IL_00B4: stloc.s 7 (System.Int32)
IL_00B6: Label2
IL_00B6: ldloc.s 7 (System.Int32)
IL_00B8: ldarga.s 1
IL_00BA: call
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>> TaleWorlds.CampaignSystem.Production::get_Outputs()
IL_00BF: callvirt abstract virtual System.Int32
System.Collections.Generic.IReadOnlyCollection`1<System.ValueTuple`2<TaleWorlds.Cor
e.ItemCategory, System.Int32>>::get_Count()
IL_00C4: blt => Label4
IL_00C9: call static TaleWorlds.CampaignSystem.Campaign
TaleWorlds.CampaignSystem.Campaign::get_Current()
IL_00CE: ldfld System.Boolean TaleWorlds.CampaignSystem.Campaign::GameStarted
IL_00D3: brfalse => Label5
IL_00D8: ldloc.s 5 (System.Int32)
IL_00DA: ldloc.2
IL_00DB: ble => Label6
IL_00E0: Label5
IL_00E0: ldloc.s 5 (System.Int32)
IL_00E2: ldarg.3
IL_00E3: callvirt System.Int32
TaleWorlds.CampaignSystem.SettlementComponent::get_Gold()
IL_00E8: bgt => Label7
IL_00ED: ldloc.2
IL_00EE: ldarg.2
IL_00EF: callvirt System.Int32 TaleWorlds.CampaignSystem.Workshop::get_Capital()
IL_00F4: ble => Label8
IL_00F9: Label6
IL_00F9: Label7
IL_00F9: ldc.i4.0
IL_00FA: br => Label35
IL_00FF: Label8
IL_00FF: ldc.i4.0
IL_0100: stloc.s 6 (System.Boolean)
IL_0102: ldarg.2
IL_0103: callvirt TaleWorlds.CampaignSystem.WorkshopType
TaleWorlds.CampaignSystem.Workshop::get_WorkshopType()
IL_0108: callvirt
System.Collections.Generic.IReadOnlyList`1<TaleWorlds.CampaignSystem.Production>
TaleWorlds.CampaignSystem.WorkshopType::get_Productions()
IL_010D: callvirt abstract virtual System.Int32
System.Collections.Generic.IReadOnlyCollection`1<TaleWorlds.CampaignSystem.Producti
on>::get_Count()
IL_0112: ldc.i4.2
IL_0113: ble => Label9
IL_0118: ldarga.s 1
IL_011A: call
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>> TaleWorlds.CampaignSystem.Production::get_Inputs()
IL_011F: callvirt abstract virtual
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>
System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>::GetEnumerator()
IL_0124: stloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
.try
{
IL_0126: br => Label10
IL_012B: Label14
IL_012B: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_012D: callvirt abstract virtual
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>::get_Current()
IL_0132: stloc.s 12
(System.ValueTuple`2[TaleWorlds.Core.ItemCategory,System.Int32])
IL_0134: ldloc.s 12
(System.ValueTuple`2[TaleWorlds.Core.ItemCategory,System.Int32])
IL_0136: ldfld TaleWorlds.Core.ItemCategory
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>::Item1
IL_013B: brfalse => Label11
IL_0140: ldloc.s 12
(System.ValueTuple`2[TaleWorlds.Core.ItemCategory,System.Int32])
IL_0142: ldfld TaleWorlds.Core.ItemCategory
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>::Item1
IL_0147: callvirt System.Boolean
TaleWorlds.Core.ItemCategory::get_IsTradeGood()
IL_014C: brtrue => Label12
IL_0151: ldc.i4.1
IL_0152: stloc.s 6 (System.Boolean)
IL_0154: leave => Label13
IL_0159: Label10
IL_0159: Label11
IL_0159: Label12
IL_0159: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_015B: callvirt abstract virtual System.Boolean
System.Collections.IEnumerator::MoveNext()
IL_0160: brtrue => Label14
IL_0165: leave => Label15
IL_016A: leave => (autogenerated)
} // end try
.finally
{
IL_016F: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_0171: brfalse => Label16
IL_0176: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_0178: callvirt abstract virtual System.Void
System.IDisposable::Dispose()
IL_017D: Label16
IL_017D: endfinally
IL_017E: leave => (autogenerated)
} // end handler
IL_017F: Label13
IL_017F: Label15
IL_017F: ldloc.s 6 (System.Boolean)
IL_0181: brtrue => Label17
IL_0186: ldarga.s 1
IL_0188: call
System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<TaleWorlds.Core.Item
Category, System.Int32>> TaleWorlds.CampaignSystem.Production::get_Outputs()
IL_018D: callvirt abstract virtual
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>
System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>::GetEnumerator()
IL_0192: stloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
.try
{
IL_0194: br => Label18
IL_0199: Label22
IL_0199: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_019B: callvirt abstract virtual
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>::get_Current()
IL_01A0: stloc.s 13
(System.ValueTuple`2[TaleWorlds.Core.ItemCategory,System.Int32])
IL_01A2: ldloc.s 13
(System.ValueTuple`2[TaleWorlds.Core.ItemCategory,System.Int32])
IL_01A4: ldfld TaleWorlds.Core.ItemCategory
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>::Item1
IL_01A9: brfalse => Label19
IL_01AE: ldloc.s 13
(System.ValueTuple`2[TaleWorlds.Core.ItemCategory,System.Int32])
IL_01B0: ldfld TaleWorlds.Core.ItemCategory
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>::Item1
IL_01B5: callvirt System.Boolean
TaleWorlds.Core.ItemCategory::get_IsTradeGood()
IL_01BA: brtrue => Label20
IL_01BF: ldc.i4.1
IL_01C0: stloc.s 6 (System.Boolean)
IL_01C2: leave => Label21
IL_01C7: Label18
IL_01C7: Label19
IL_01C7: Label20
IL_01C7: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_01C9: callvirt abstract virtual System.Boolean
System.Collections.IEnumerator::MoveNext()
IL_01CE: brtrue => Label22
IL_01D3: leave => Label23
IL_01D8: leave => (autogenerated)
} // end try
.finally
{
IL_01DD: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_01DF: brfalse => Label24
IL_01E4: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_01E6: callvirt abstract virtual System.Void
System.IDisposable::Dispose()
IL_01EB: Label24
IL_01EB: endfinally
IL_01EC: leave => (autogenerated)
} // end handler
IL_01ED: Label9
IL_01ED: Label17
IL_01ED: Label21
IL_01ED: Label23
IL_01ED: ldloc.0
IL_01EE: ldsfld System.Func`2<System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>, System.Int32>
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c::<>9__36_0
IL_01F3: dup
IL_01F4: brtrue => Label25
IL_01F9: pop
IL_01FA: ldsfld TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c::<>9
IL_01FF: ldftn System.Int32
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c::<DoProduction>b__36_0(Syst
em.ValueTuple`2<TaleWorlds.Core.ItemObject, System.Int32> t)
IL_0205: newobj System.Void
System.Func`2<System.ValueTuple`2<TaleWorlds.Core.ItemObject, System.Int32>,
System.Int32>::.ctor(System.Object object, System.IntPtr method)
IL_020A: dup
IL_020B: stsfld System.Func`2<System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>, System.Int32>
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.<>c::<>9__36_0
IL_0210: Label25
IL_0210: call static System.Int32
System.Linq.Enumerable::Sum(System.Collections.Generic.IEnumerable`1<System.ValueTu
ple`2<TaleWorlds.Core.ItemObject, System.Int32>> source,
System.Func`2<System.ValueTuple`2<TaleWorlds.Core.ItemObject, System.Int32>,
System.Int32> selector)
IL_0215: ldloc.s 4 (System.Int32)
IL_0217: bne.un => Label26
IL_021C: ldloc.0
IL_021D: callvirt
System.Collections.Generic.Enumerator<System.ValueTuple`2<TaleWorlds.Core.ItemObjec
t, System.Int32>>
System.Collections.Generic.List`1<System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>>::GetEnumerator()
IL_0222: stloc.s 14
(System.Collections.Generic.List`1+Enumerator[System.ValueTuple`2[TaleWorlds.Core.I
temObject,System.Int32]])
.try
{
IL_0224: br => Label27
IL_0229: Label28
IL_0229: ldloca.s 14
(System.Collections.Generic.List`1+Enumerator[System.ValueTuple`2[TaleWorlds.Core.I
temObject,System.Int32]])
IL_022B: call virtual System.ValueTuple`2<TaleWorlds.Core.ItemObject,
System.Int32>
System.Collections.Generic.Enumerator<System.ValueTuple`2<TaleWorlds.Core.ItemObjec
t, System.Int32>>::get_Current()
IL_0230: stloc.s 15
(System.ValueTuple`2[TaleWorlds.Core.ItemObject,System.Int32])
IL_0232: ldarg.3
IL_0233: stloc.s 16 (TaleWorlds.CampaignSystem.Town)
IL_0235: ldloc.s 15
(System.ValueTuple`2[TaleWorlds.Core.ItemObject,System.Int32])
IL_0237: ldfld TaleWorlds.Core.ItemObject
System.ValueTuple`2<TaleWorlds.Core.ItemObject, System.Int32>::Item1
IL_023C: ldloc.s 16 (TaleWorlds.CampaignSystem.Town)
IL_023E: ldarg.2
IL_023F: ldloc.s 15
(System.ValueTuple`2[TaleWorlds.Core.ItemObject,System.Int32])
IL_0241: ldfld System.Int32
System.ValueTuple`2<TaleWorlds.Core.ItemObject, System.Int32>::Item2
IL_0246: ldloc.s 6 (System.Boolean)
IL_0248: call static System.Void
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::Prod
uceOutput(TaleWorlds.Core.ItemObject outputItem, TaleWorlds.CampaignSystem.Town
town, TaleWorlds.CampaignSystem.Workshop workshop, System.Int32 count,
System.Boolean doNotEffectCapital)
IL_024D: Label27
IL_024D: ldloca.s 14
(System.Collections.Generic.List`1+Enumerator[System.ValueTuple`2[TaleWorlds.Core.I
temObject,System.Int32]])
IL_024F: call virtual System.Boolean
System.Collections.Generic.Enumerator<System.ValueTuple`2<TaleWorlds.Core.ItemObjec
t, System.Int32>>::MoveNext()
IL_0254: brtrue => Label28
IL_0259: leave => Label29
IL_025E: leave => (autogenerated)
} // end try
.finally
{
IL_0263: ldloca.s 14
(System.Collections.Generic.List`1+Enumerator[System.ValueTuple`2[TaleWorlds.Core.I
temObject,System.Int32]])
IL_0265: constrained.
System.Collections.Generic.List`1+Enumerator[System.ValueTuple`2[TaleWorlds.Core.It
emObject,System.Int32]]
IL_026B: callvirt abstract virtual System.Void
System.IDisposable::Dispose()
IL_0270: endfinally
IL_0271: leave => (autogenerated)
} // end handler
IL_0272: Label29
IL_0272: ldloc.1
IL_0273: callvirt abstract virtual
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>
System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>::GetEnumerator()
IL_0278: stloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
.try
{
IL_027A: br => Label30
IL_027F: Label31
IL_027F: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_0281: callvirt abstract virtual
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>
System.Collections.Generic.IEnumerator`1<System.ValueTuple`2<TaleWorlds.Core.ItemCa
tegory, System.Int32>>::get_Current()
IL_0286: dup
IL_0287: ldfld TaleWorlds.Core.ItemCategory
System.ValueTuple`2<TaleWorlds.Core.ItemCategory, System.Int32>::Item1
IL_028C: stloc.s 17 (TaleWorlds.Core.ItemCategory)
IL_028E: pop
IL_028F: ldloc.s 17 (TaleWorlds.Core.ItemCategory)
IL_0291: ldarg.3
IL_0292: ldarg.2
IL_0293: ldloc.s 6 (System.Boolean)
IL_0295: call static System.Void
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::Cons
umeInput(TaleWorlds.Core.ItemCategory productionInput,
TaleWorlds.CampaignSystem.Town town, TaleWorlds.CampaignSystem.Workshop workshop,
System.Boolean doNotEffectCapital)
IL_029A: Label30
IL_029A: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_029C: callvirt abstract virtual System.Boolean
System.Collections.IEnumerator::MoveNext()
IL_02A1: brtrue => Label31
IL_02A6: leave => Label32
IL_02AB: leave => (autogenerated)
} // end try
.finally
{
IL_02B0: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_02B2: brfalse => Label33
IL_02B7: ldloc.s 11
(System.Collections.Generic.IEnumerator`1[System.ValueTuple`2[TaleWorlds.Core.ItemC
ategory,System.Int32]])
IL_02B9: callvirt abstract virtual System.Void
System.IDisposable::Dispose()
IL_02BE: Label33
IL_02BE: endfinally
IL_02BF: leave => (autogenerated)
} // end handler
IL_02C0: Label32
IL_02C0: ldc.i4.1
IL_02C1: br => Label52
IL_02C6: Label1
IL_02C6: Label26
IL_02C6: ldc.i4.0
IL_02C7: // end original
IL_02C7: Label34
IL_02C7: Label35
IL_02C7: Label52
IL_02C7: ret
DONE

### Patch: static System.Void


TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::Prod
uceOutput(TaleWorlds.Core.ItemObject outputItem, TaleWorlds.CampaignSystem.Town
town, TaleWorlds.CampaignSystem.Workshop workshop, System.Int32 count,
System.Boolean doNotEffectCapital)
### Replacement: static System.Void
TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior::Prod
uceOutput_Patch1(TaleWorlds.Core.ItemObject outputItem,
TaleWorlds.CampaignSystem.Town town, TaleWorlds.CampaignSystem.Workshop workshop,
System.Int32 count, System.Boolean doNotEffectCapital)
IL_0000: Local var 0: System.Int32
IL_0000: Local var 1: System.Int32
IL_0000: Local var 2: System.Boolean
IL_0000: ldc.i4 0
IL_0005: stloc 2 (System.Boolean)
IL_0009: ldc.i4.1
IL_000A: stloc 2 (System.Boolean)
IL_000E: ldloc 2 (System.Boolean)
IL_0012: brfalse.s => Label1
IL_0014: ldarg 0
IL_0018: ldarg 1
IL_001C: ldarg 2
IL_0020: ldarg 3
IL_0024: ldarg 4
IL_0028: call static System.Boolean
WorkshopStashMod.WorkshopsCampaignBehavior_ProduceOutput_Patch::Prefix(TaleWorlds.C
ore.ItemObject outputItem, TaleWorlds.CampaignSystem.Town town,
TaleWorlds.CampaignSystem.Workshop workshop, System.Int32 count, System.Boolean
doNotEffectCapital)
IL_002D: stloc 2 (System.Boolean)
IL_0031: nop
IL_0032: ldloc 2 (System.Boolean)
IL_0036: brfalse => Label0
IL_003B: // start original
IL_003B: ldarg.1
IL_003C: ldarg.0
IL_003D: ldnull
IL_003E: ldc.i4.0
IL_003F: callvirt virtual System.Int32
TaleWorlds.CampaignSystem.SettlementComponent::GetItemPrice(TaleWorlds.Core.ItemObj
ect item, TaleWorlds.CampaignSystem.MobileParty tradingParty, System.Boolean
isSelling)
IL_0044: stloc.0
IL_0045: ldarg.1
IL_0046: callvirt TaleWorlds.CampaignSystem.PartyBase
TaleWorlds.CampaignSystem.SettlementComponent::get_Owner()
IL_004B: callvirt TaleWorlds.CampaignSystem.ItemRoster
TaleWorlds.CampaignSystem.PartyBase::get_ItemRoster()
IL_0050: ldarg.0
IL_0051: ldarg.3
IL_0052: ldc.i4.1
IL_0053: callvirt System.Int32
TaleWorlds.CampaignSystem.ItemRoster::AddToCounts(TaleWorlds.Core.ItemObject item,
System.Int32 number, System.Boolean removeDepleted)
IL_0058: pop
IL_0059: call static TaleWorlds.CampaignSystem.Campaign
TaleWorlds.CampaignSystem.Campaign::get_Current()
IL_005E: ldfld System.Boolean TaleWorlds.CampaignSystem.Campaign::GameStarted
IL_0063: brfalse => Label2
IL_0068: ldarg.s 4
IL_006A: brtrue => Label3
IL_006F: ldc.i4 1000
IL_0074: ldloc.0
IL_0075: call static System.Int32 System.Math::Min(System.Int32 val1,
System.Int32 val2)
IL_007A: ldarg.3
IL_007B: mul
IL_007C: stloc.1
IL_007D: ldarg.2
IL_007E: ldloc.1
IL_007F: callvirt System.Void
TaleWorlds.CampaignSystem.Workshop::ChangeGold(System.Int32 goldChange)
IL_0084: ldarg.1
IL_0085: ldloc.1
IL_0086: neg
IL_0087: callvirt System.Void
TaleWorlds.CampaignSystem.SettlementComponent::ChangeGold(System.Int32
changeAmount)
IL_008C: Label2
IL_008C: Label3
IL_008C: call static TaleWorlds.CampaignSystem.CampaignEventDispatcher
TaleWorlds.CampaignSystem.CampaignEventDispatcher::get_Instance()
IL_0091: ldarg.0
IL_0092: ldarg.1
IL_0093: callvirt TaleWorlds.CampaignSystem.PartyBase
TaleWorlds.CampaignSystem.SettlementComponent::get_Owner()
IL_0098: callvirt TaleWorlds.CampaignSystem.Settlement
TaleWorlds.CampaignSystem.PartyBase::get_Settlement()
IL_009D: ldarg.3
IL_009E: callvirt virtual System.Void
TaleWorlds.CampaignSystem.CampaignEventReceiver::OnItemProduced(TaleWorlds.Core.Ite
mObject itemObject, TaleWorlds.CampaignSystem.Settlement settlement, System.Int32
count)
IL_00A3: // end original
IL_00A3: Label0
IL_00A3: ret
DONE

Vous aimerez peut-être aussi