1. .text:007C078D Script_UnitAffectingCombat proc near ; DATA XREF: .data:010B91FCo
  2. .text:007C078D
  3. .text:007C078D arg_0 = dword ptr 8
  4. .text:007C078D
  5. .text:007C078D 55 push ebp
  6. .text:007C078E 8B EC mov ebp, esp
  7. .text:007C0790 56 push esi
  8. .text:007C0791 8B 75 08 mov esi, [ebp+arg_0]
  9. .text:007C0794 6A 01 push 1
  10. .text:007C0796 56 push esi
  11. .text:007C0797 E8 12 50 CF FF call lua_isstring
  12. .text:007C079C 59 pop ecx
  13. .text:007C079D 59 pop ecx
  14. .text:007C079E 85 C0 test eax, eax
  15. .text:007C07A0 75 0F jnz short loc_7C07B1
  16. .text:007C07A2 68 00 CF E3 00 push offset aUsageUnitaffec ; "Usage: UnitAffectingCombat(\"unit\")"
  17. .text:007C07A7 56 push esi
  18. .text:007C07A8 E8 8F 61 CF FF call LuaL_error
  19. .text:007C07AD 33 C0 xor eax, eax
  20. .text:007C07AF EB 3B jmp short loc_7C07EC
  21. .text:007C07B1 ; ---------------------------------------------------------------------------
  22. .text:007C07B1
  23. .text:007C07B1 loc_7C07B1: ; CODE XREF: Script_UnitAffectingCombat+13j
  24. .text:007C07B1 6A 00 push 0
  25. .text:007C07B3 6A 01 push 1
  26. .text:007C07B5 56 push esi
  27. .text:007C07B6 E8 48 51 CF FF call lua_tolstring
  28. .text:007C07BB 50 push eax
  29. .text:007C07BC E8 FF D9 FF FF call Script_GetGUIDFromToken2
  30. .text:007C07C1 83 C4 10 add esp, 10h
  31. .text:007C07C4 85 C0 test eax, eax
  32. .text:007C07C6 74 18 jz short loc_7C07E0
  33. .text:007C07C8 8B 80 24 01 00 00 mov eax, [eax+124h]
  34. .text:007C07CE 8B 80 4C 01 00 00 mov eax, [eax+14Ch]
  35. .text:007C07D4 C1 E8 13 shr eax, 13h
  36. .text:007C07D7 A8 01 test al, 1
  37. .text:007C07D9 74 05 jz short loc_7C07E0
  38. .text:007C07DB 33 C0 xor eax, eax
  39. .text:007C07DD 40 inc eax
  40. .text:007C07DE EB 02 jmp short loc_7C07E2
  41. .text:007C07E0 ; ---------------------------------------------------------------------------
  42. .text:007C07E0
  43. .text:007C07E0 loc_7C07E0: ; CODE XREF: Script_UnitAffectingCombat+39j
  44. .text:007C07E0 ; Script_UnitAffectingCombat+4Cj
  45. .text:007C07E0 33 C0 xor eax, eax
  46. .text:007C07E2
  47. .text:007C07E2 loc_7C07E2: ; CODE XREF: Script_UnitAffectingCombat+51j
  48. .text:007C07E2 50 push eax
  49. .text:007C07E3 56 push esi
  50. .text:007C07E4 E8 5C 54 CF FF call lua_pushboolean
  51. .text:007C07E9 33 C0 xor eax, eax
  52. .text:007C07EB 40 inc eax
  53. .text:007C07EC
  54. .text:007C07EC loc_7C07EC: ; CODE XREF: Script_UnitAffectingCombat+22j
  55. .text:007C07EC 59 pop ecx
  56. .text:007C07ED 59 pop ecx
  57. .text:007C07EE 5E pop esi
  58. .text:007C07EF 5D pop ebp
  59. .text:007C07F0 C3 retn
  60. .text:007C07F0 Script_UnitAffectingCombat endp