Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signed int __cdecl Script_UnitIsTapped(int pLuaState)
- {
- signed int result; // eax@2
- char *v2; // eax@3
- CGUnit_C *v3; // eax@3
- int v4; // [sp+8h] [bp-4h]@0
- if ( lua_isstring(pLuaState, 1) )
- {
- v2 = lua_tolstring(pLuaState, 1, 0);
- v3 = (CGUnit_C *)GetUnitFromName(v2);
- if ( v3 && v3->UnitData->UNIT_DYNAMIC_FLAGS & 4 )
- {
- lua_pushnumber(pLuaState, 1.0);
- result = 1;
- }
- else
- {
- lua_pushnil(pLuaState);
- result = 1;
- }
- }
- else
- {
- luaL_error(pLuaState, "Usage: UnitIsTapped(\"unit\")", v4);
- result = 0;
- }
- return result;
- }
- signed int __cdecl Script_UnitIsTappedByPlayer(int a1)
- {
- signed int result; // eax@2
- char *v2; // eax@3
- CGUnit_C *v3; // eax@3
- int v4; // [sp+8h] [bp-4h]@0
- if ( lua_isstring(a1, 1) )
- {
- v2 = lua_tolstring(a1, 1, 0);
- v3 = (CGUnit_C *)GetUnitFromName(v2);
- if ( v3 && v3->UnitData->UNIT_DYNAMIC_FLAGS & 8 )
- {
- lua_pushnumber(a1, 1.0);
- result = 1;
- }
- else
- {
- lua_pushnil(a1);
- result = 1;
- }
- }
- else
- {
- luaL_error(a1, "Usage: UnitIsTappedByPlayer(\"unit\")", v4);
- result = 0;
- }
- return result;
- }
- signed int __cdecl Script_UnitIsTappedByAllThreatList(int a1)
- {
- signed int result; // eax@2
- char *v2; // eax@3
- CGUnit_C *v3; // eax@3
- int v4; // [sp+8h] [bp-4h]@0
- if ( lua_isstring(a1, 1) )
- {
- v2 = lua_tolstring(a1, 1, 0);
- v3 = (CGUnit_C *)GetUnitFromName(v2);
- if ( v3 && v3->UnitData->UNIT_DYNAMIC_FLAGS & 0x80 )
- {
- lua_pushnumber(a1, 1.0);
- result = 1;
- }
- else
- {
- lua_pushnil(a1);
- result = 1;
- }
- }
- else
- {
- luaL_error(a1, "Usage: UnitIsTappedByAllThreatList(\"unit\")", v4);
- result = 0;
- }
- return result;
- }
Add Comment
Please, Sign In to add comment