stoneharry

Untitled

Aug 28th, 2011
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.68 KB | None | 0 0
  1. Index: FunctionTables.h
  2. ===================================================================
  3. --- FunctionTables.h    (revision 4496)
  4. +++ FunctionTables.h    (working copy)
  5. @@ -536,6 +536,9 @@
  6.     { "CastSpellAoE", &LuaUnit::CastSpellAoF },
  7.     { "SetFlag", &LuaUnit::SetFlag },
  8.     { "SetSelectedGO", &LuaUnit::SetSelectedGO },
  9. +   { "MoveJump", &LuaUnit::MoveJump },
  10. +   { "MoveKnockback", &LuaUnit::MoveKnockback },
  11. +   { "MoveCharge", &LuaUnit::MoveCharge },
  12.     { NULL, NULL },
  13.  };
  14.  
  15. Index: UnitFunctions.h
  16. ===================================================================
  17. --- UnitFunctions.h (revision 4496)
  18. +++ UnitFunctions.h (working copy)
  19. @@ -5991,5 +5991,46 @@
  20.                 lua_pushnil(L);
  21.             return 1;
  22.         }
  23. +
  24. +       static int MoveJump(lua_State* L, Unit* ptr)
  25. +       {
  26. +           TEST_UNITPLAYER();
  27. +           float x = CHECK_FLOAT(L,1);
  28. +           float y = CHECK_FLOAT(L,2);
  29. +           float z = CHECK_FLOAT(L,3);
  30. +           if (ptr != NULL )
  31. +               ptr->GetAIInterface()->MoveJump(x,y,z);
  32. +           else
  33. +               lua_pushnil(L);
  34. +           return 1;
  35. +       }
  36. +
  37. +       static int MoveKnockback(lua_State* L, Unit* ptr)
  38. +       {
  39. +           TEST_UNITPLAYER();
  40. +           float x = CHECK_FLOAT(L,1);
  41. +           float y = CHECK_FLOAT(L,2);
  42. +           float z = CHECK_FLOAT(L,3);
  43. +           float h = CHECK_FLOAT(L,4);
  44. +           float v = CHECK_FLOAT(L,5);
  45. +           if (ptr != NULL )
  46. +               ptr->GetAIInterface()->MoveKnockback(x,y,z,h,v);
  47. +           else
  48. +               lua_pushnil(L);
  49. +           return 1;
  50. +       }
  51. +
  52. +       static int MoveCharge(lua_State* L, Unit* ptr)
  53. +       {
  54. +           TEST_UNITPLAYER();
  55. +           float x = CHECK_FLOAT(L,1);
  56. +           float y = CHECK_FLOAT(L,2);
  57. +           float z = CHECK_FLOAT(L,3);
  58. +           if (ptr != NULL )
  59. +               ptr->GetAIInterface()->MoveCharge(x,y,z);
  60. +           else
  61. +               lua_pushnil(L);
  62. +           return 1;
  63. +       }
  64.  };
  65.  #endif
Advertisement
Add Comment
Please, Sign In to add comment