Advertisement
Sc2ad

dnSpy InputManagerHooks IL

Mar 27th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.79 KB | None | 0 0
  1. // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
  2. .method public hidebysig static
  3. void TriggerClickDownEvent (
  4. class ['Assembly-CSharp']InputManager self,
  5. string eventName,
  6. class [mscorlib]System.Collections.Generic.List`1<class ['Assembly-CSharp-firstpass']ClickDownInfo>& clickInfosContainer
  7. ) cil managed
  8. {
  9. // Header Size: 12 bytes
  10. // Code Size: 349 (0x15D) bytes
  11. // LocalVarSig Token: 0x11000001 RID: 1
  12. .maxstack 4
  13. .locals init (
  14. [0] class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>,
  15. [1] valuetype [UnityEngine]UnityEngine.LayerMask,
  16. [2] valuetype [UnityEngine]UnityEngine.RaycastHit[],
  17. [3] int32,
  18. [4] bool,
  19. [5] valuetype [UnityEngine]UnityEngine.RaycastHit[],
  20. [6] int32,
  21. [7] valuetype [UnityEngine]UnityEngine.RaycastHit,
  22. [8] class ['Assembly-CSharp-firstpass']ClickDownInfo,
  23. [9] valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<class ['Assembly-CSharp-firstpass']ClickDownInfo>,
  24. [10] class ['Assembly-CSharp-firstpass']ClickDownInfo,
  25. [11] bool,
  26. [12] bool
  27. )
  28.  
  29. /* 0x0000025C 00 */ IL_0000: nop
  30. /* 0x0000025D 02 */ IL_0001: ldarg.0
  31. /* 0x0000025E 731700000A */ IL_0002: newobj instance void class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::.ctor(!0)
  32. /* 0x00000263 0A */ IL_0007: stloc.0
  33. /* 0x00000264 06 */ IL_0008: ldloc.0
  34. /* 0x00000265 7201000070 */ IL_0009: ldstr "stopClickEventPropagation"
  35. /* 0x0000026A 16 */ IL_000E: ldc.i4.0
  36. /* 0x0000026B 6F0100002B */ IL_000F: callvirt instance void class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Set<bool>(string, !!0)
  37. /* 0x00000270 00 */ IL_0014: nop
  38. /* 0x00000271 06 */ IL_0015: ldloc.0
  39. /* 0x00000272 7235000070 */ IL_0016: ldstr "gameCameraManager"
  40. /* 0x00000277 6F0200002B */ IL_001B: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<class ['Assembly-CSharp']IGameCameraService>(string)
  41. /* 0x0000027C 6F1A00000A */ IL_0020: callvirt instance bool ['Assembly-CSharp']IGameCameraService::IsTacticalMapActive()
  42. /* 0x00000281 2C0D */ IL_0025: brfalse.s IL_0034
  43.  
  44. /* 0x00000283 06 */ IL_0027: ldloc.0
  45. /* 0x00000284 7259000070 */ IL_0028: ldstr "tacticalMapClickLayerMask"
  46. /* 0x00000289 6F0300002B */ IL_002D: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<valuetype [UnityEngine]UnityEngine.LayerMask>(string)
  47. /* 0x0000028E 2B0B */ IL_0032: br.s IL_003F
  48.  
  49. /* 0x00000290 06 */ IL_0034: ldloc.0
  50. /* 0x00000291 728D000070 */ IL_0035: ldstr "gameMouseClickLayerMask"
  51. /* 0x00000296 6F0300002B */ IL_003A: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<valuetype [UnityEngine]UnityEngine.LayerMask>(string)
  52.  
  53. /* 0x0000029B 0B */ IL_003F: stloc.1
  54. /* 0x0000029C 06 */ IL_0040: ldloc.0
  55. /* 0x0000029D 7235000070 */ IL_0041: ldstr "gameCameraManager"
  56. /* 0x000002A2 6F0200002B */ IL_0046: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<class ['Assembly-CSharp']IGameCameraService>(string)
  57. /* 0x000002A7 281A000006 */ IL_004B: call valuetype [UnityEngine]UnityEngine.Vector3 TASTools_Mod.TASInputPlayer::GetMousePos()
  58. /* 0x000002AC 6F1B00000A */ IL_0050: callvirt instance valuetype [UnityEngine]UnityEngine.Ray ['Assembly-CSharp']IGameCameraService::ScreenPointToRay(valuetype [UnityEngine]UnityEngine.Vector3)
  59. /* 0x000002B1 220000807F */ IL_0055: ldc.r4 (00 00 80 7F)
  60. /* 0x000002B6 07 */ IL_005A: ldloc.1
  61. /* 0x000002B7 281C00000A */ IL_005B: call int32 [UnityEngine]UnityEngine.LayerMask::op_Implicit(valuetype [UnityEngine]UnityEngine.LayerMask)
  62. /* 0x000002BC 281D00000A */ IL_0060: call valuetype [UnityEngine]UnityEngine.RaycastHit[] [UnityEngine]UnityEngine.Physics::RaycastAll(valuetype [UnityEngine]UnityEngine.Ray, float32, int32)
  63. /* 0x000002C1 0C */ IL_0065: stloc.2
  64. /* 0x000002C2 08 */ IL_0066: ldloc.2
  65. /* 0x000002C3 7E29000004 */ IL_0067: ldsfld class [mscorlib]System.Comparison`1<valuetype [UnityEngine]UnityEngine.RaycastHit> TASTools_Mod.InputManagerHooks/'<>c'::'<>9__0_0'
  66. /* 0x000002C8 25 */ IL_006C: dup
  67. /* 0x000002C9 2D17 */ IL_006D: brtrue.s IL_0086
  68.  
  69. /* 0x000002CB 26 */ IL_006F: pop
  70. /* 0x000002CC 7E28000004 */ IL_0070: ldsfld class TASTools_Mod.InputManagerHooks/'<>c' TASTools_Mod.InputManagerHooks/'<>c'::'<>9'
  71. /* 0x000002D1 FE063D000006 */ IL_0075: ldftn instance int32 TASTools_Mod.InputManagerHooks/'<>c'::'<TriggerClickDownEvent>b__0_0'(valuetype [UnityEngine]UnityEngine.RaycastHit, valuetype [UnityEngine]UnityEngine.RaycastHit)
  72. /* 0x000002D7 731E00000A */ IL_007B: newobj instance void class [mscorlib]System.Comparison`1<valuetype [UnityEngine]UnityEngine.RaycastHit>::.ctor(object, native int)
  73. /* 0x000002DC 25 */ IL_0080: dup
  74. /* 0x000002DD 8029000004 */ IL_0081: stsfld class [mscorlib]System.Comparison`1<valuetype [UnityEngine]UnityEngine.RaycastHit> TASTools_Mod.InputManagerHooks/'<>c'::'<>9__0_0'
  75.  
  76. /* 0x000002E2 280400002B */ IL_0086: call void [mscorlib]System.Array::Sort<valuetype [UnityEngine]UnityEngine.RaycastHit>(!!0[], class [mscorlib]System.Comparison`1<!!0>)
  77. /* 0x000002E7 00 */ IL_008B: nop
  78. /* 0x000002E8 06 */ IL_008C: ldloc.0
  79. /* 0x000002E9 72BD000070 */ IL_008D: ldstr "debug"
  80. /* 0x000002EE 6F0500002B */ IL_0092: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<bool>(string)
  81. /* 0x000002F3 1304 */ IL_0097: stloc.s V_4
  82. /* 0x000002F5 1104 */ IL_0099: ldloc.s V_4
  83. /* 0x000002F7 2C02 */ IL_009B: brfalse.s IL_009F
  84.  
  85. /* 0x000002F9 00 */ IL_009D: nop
  86. /* 0x000002FA 00 */ IL_009E: nop
  87.  
  88. /* 0x000002FB 04 */ IL_009F: ldarg.2
  89. /* 0x000002FC 732000000A */ IL_00A0: newobj instance void class [mscorlib]System.Collections.Generic.List`1<class ['Assembly-CSharp-firstpass']ClickDownInfo>::.ctor()
  90. /* 0x00000301 51 */ IL_00A5: stind.ref
  91. /* 0x00000302 16 */ IL_00A6: ldc.i4.0
  92. /* 0x00000303 0D */ IL_00A7: stloc.3
  93. /* 0x00000304 00 */ IL_00A8: nop
  94. /* 0x00000305 08 */ IL_00A9: ldloc.2
  95. /* 0x00000306 1305 */ IL_00AA: stloc.s V_5
  96. /* 0x00000308 16 */ IL_00AC: ldc.i4.0
  97. /* 0x00000309 1306 */ IL_00AD: stloc.s V_6
  98. /* 0x0000030B 2B36 */ IL_00AF: br.s IL_00E7
  99. // loop start (head: IL_00E7)
  100. /* 0x0000030D 1105 */ IL_00B1: ldloc.s V_5
  101. /* 0x0000030F 1106 */ IL_00B3: ldloc.s V_6
  102. /* 0x00000311 A316000001 */ IL_00B5: ldelem [UnityEngine]UnityEngine.RaycastHit
  103. /* 0x00000316 1307 */ IL_00BA: stloc.s V_7
  104. /* 0x00000318 00 */ IL_00BC: nop
  105. /* 0x00000319 1207 */ IL_00BD: ldloca.s V_7
  106. /* 0x0000031B 282100000A */ IL_00BF: call instance class [UnityEngine]UnityEngine.Collider [UnityEngine]UnityEngine.RaycastHit::get_collider()
  107. /* 0x00000320 1207 */ IL_00C4: ldloca.s V_7
  108. /* 0x00000322 282200000A */ IL_00C6: call instance valuetype [UnityEngine]UnityEngine.Vector3 [UnityEngine]UnityEngine.RaycastHit::get_point()
  109. /* 0x00000327 09 */ IL_00CB: ldloc.3
  110. /* 0x00000328 08 */ IL_00CC: ldloc.2
  111. /* 0x00000329 8E */ IL_00CD: ldlen
  112. /* 0x0000032A 69 */ IL_00CE: conv.i4
  113. /* 0x0000032B 732300000A */ IL_00CF: newobj instance void ['Assembly-CSharp-firstpass']ClickDownInfo::.ctor(class [UnityEngine]UnityEngine.Collider, valuetype [UnityEngine]UnityEngine.Vector3, int32, int32)
  114. /* 0x00000330 1308 */ IL_00D4: stloc.s V_8
  115. /* 0x00000332 04 */ IL_00D6: ldarg.2
  116. /* 0x00000333 50 */ IL_00D7: ldind.ref
  117. /* 0x00000334 1108 */ IL_00D8: ldloc.s V_8
  118. /* 0x00000336 6F2400000A */ IL_00DA: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ['Assembly-CSharp-firstpass']ClickDownInfo>::Add(!0)
  119. /* 0x0000033B 00 */ IL_00DF: nop
  120. /* 0x0000033C 00 */ IL_00E0: nop
  121. /* 0x0000033D 1106 */ IL_00E1: ldloc.s V_6
  122. /* 0x0000033F 17 */ IL_00E3: ldc.i4.1
  123. /* 0x00000340 58 */ IL_00E4: add
  124. /* 0x00000341 1306 */ IL_00E5: stloc.s V_6
  125.  
  126. /* 0x00000343 1106 */ IL_00E7: ldloc.s V_6
  127. /* 0x00000345 1105 */ IL_00E9: ldloc.s V_5
  128. /* 0x00000347 8E */ IL_00EB: ldlen
  129. /* 0x00000348 69 */ IL_00EC: conv.i4
  130. /* 0x00000349 32C2 */ IL_00ED: blt.s IL_00B1
  131. // end loop
  132.  
  133. /* 0x0000034B 00 */ IL_00EF: nop
  134. /* 0x0000034C 04 */ IL_00F0: ldarg.2
  135. /* 0x0000034D 50 */ IL_00F1: ldind.ref
  136. /* 0x0000034E 6F2500000A */ IL_00F2: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0> class [mscorlib]System.Collections.Generic.List`1<class ['Assembly-CSharp-firstpass']ClickDownInfo>::GetEnumerator()
  137. /* 0x00000353 1309 */ IL_00F7: stloc.s V_9
  138. .try
  139. {
  140. /* 0x00000355 2B47 */ IL_00F9: br.s IL_0142
  141. // loop start (head: IL_0142)
  142. /* 0x00000357 1209 */ IL_00FB: ldloca.s V_9
  143. /* 0x00000359 282600000A */ IL_00FD: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<class ['Assembly-CSharp-firstpass']ClickDownInfo>::get_Current()
  144. /* 0x0000035E 130A */ IL_0102: stloc.s V_10
  145. /* 0x00000360 00 */ IL_0104: nop
  146. /* 0x00000361 06 */ IL_0105: ldloc.0
  147. /* 0x00000362 72BD000070 */ IL_0106: ldstr "debug"
  148. /* 0x00000367 6F0500002B */ IL_010B: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<bool>(string)
  149. /* 0x0000036C 130B */ IL_0110: stloc.s V_11
  150. /* 0x0000036E 110B */ IL_0112: ldloc.s V_11
  151. /* 0x00000370 2C02 */ IL_0114: brfalse.s IL_0118
  152.  
  153. /* 0x00000372 00 */ IL_0116: nop
  154. /* 0x00000373 00 */ IL_0117: nop
  155.  
  156. /* 0x00000374 110A */ IL_0118: ldloc.s V_10
  157. /* 0x00000376 6F2700000A */ IL_011A: callvirt instance class [UnityEngine]UnityEngine.Collider ['Assembly-CSharp-firstpass']ClickDownInfo::get_HitCollider()
  158. /* 0x0000037B 03 */ IL_011F: ldarg.1
  159. /* 0x0000037C 110A */ IL_0120: ldloc.s V_10
  160. /* 0x0000037E 17 */ IL_0122: ldc.i4.1
  161. /* 0x0000037F 6F2800000A */ IL_0123: callvirt instance void [UnityEngine]UnityEngine.Component::SendMessage(string, object, valuetype [UnityEngine]UnityEngine.SendMessageOptions)
  162. /* 0x00000384 00 */ IL_0128: nop
  163. /* 0x00000385 09 */ IL_0129: ldloc.3
  164. /* 0x00000386 17 */ IL_012A: ldc.i4.1
  165. /* 0x00000387 58 */ IL_012B: add
  166. /* 0x00000388 0D */ IL_012C: stloc.3
  167. /* 0x00000389 06 */ IL_012D: ldloc.0
  168. /* 0x0000038A 7201000070 */ IL_012E: ldstr "stopClickEventPropagation"
  169. /* 0x0000038F 6F0500002B */ IL_0133: callvirt instance !!0 class [MonoMod.Utils]MonoMod.Utils.DynData`1<class ['Assembly-CSharp']InputManager>::Get<bool>(string)
  170. /* 0x00000394 130C */ IL_0138: stloc.s V_12
  171. /* 0x00000396 110C */ IL_013A: ldloc.s V_12
  172. /* 0x00000398 2C03 */ IL_013C: brfalse.s IL_0141
  173.  
  174. /* 0x0000039A 00 */ IL_013E: nop
  175. /* 0x0000039B 2B0A */ IL_013F: br.s IL_014B
  176.  
  177. /* 0x0000039D 00 */ IL_0141: nop
  178.  
  179. /* 0x0000039E 1209 */ IL_0142: ldloca.s V_9
  180. /* 0x000003A0 282900000A */ IL_0144: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<class ['Assembly-CSharp-firstpass']ClickDownInfo>::MoveNext()
  181. /* 0x000003A5 2DB0 */ IL_0149: brtrue.s IL_00FB
  182. // end loop
  183.  
  184. /* 0x000003A7 DE0F */ IL_014B: leave.s IL_015C
  185. } // end .try
  186. finally
  187. {
  188. /* 0x000003A9 1209 */ IL_014D: ldloca.s V_9
  189. /* 0x000003AB FE160500001B */ IL_014F: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<class ['Assembly-CSharp-firstpass']ClickDownInfo>
  190. /* 0x000003B1 6F1100000A */ IL_0155: callvirt instance void [mscorlib]System.IDisposable::Dispose()
  191. /* 0x000003B6 00 */ IL_015A: nop
  192. /* 0x000003B7 DC */ IL_015B: endfinally
  193. } // end handler
  194.  
  195. /* 0x000003B8 2A */ IL_015C: ret
  196. } // end of method InputManagerHooks::TriggerClickDownEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement