1. diff --git a/src/game/LuaEngine/LuaFunctions.cpp b/src/game/LuaEngine/LuaFunctions.cpp
  2. index 6729fea..cd2d047 100644
  3. --- a/src/game/LuaEngine/LuaFunctions.cpp
  4. +++ b/src/game/LuaEngine/LuaFunctions.cpp
  5. @@ -256,6 +256,7 @@ ElunaRegister<Unit> UnitMethods[] =
  6. {"SetPetGUID", &LuaUnit::SetPetGUID}, // :SetPetGUID(uint64 guid) - Sets the pet's guid
  7. // {"SetCritterGUID", &LuaUnit::SetCritterGUID}, // :SetCritterGUID(uint64 guid) - Sets the critter's guid
  8. {"SetWaterWalk", &LuaUnit::SetWaterWalk}, // :SetWaterWalk([enable]) - Sets WaterWalk on or off
  9. + {"SetStandState", &LuaUnit::SetStandState}, // :SetStandState(state)
  10. // Boolean
  11. {"IsAlive", &LuaUnit::IsAlive}, // :IsAlive()
  12. @@ -299,6 +300,7 @@ ElunaRegister<Unit> UnitMethods[] =
  13. // {"IsRooted", &LuaUnit::IsRooted}, // :IsRooted()
  14. {"IsFullHealth", &LuaUnit::IsFullHealth}, // :IsFullHealth() - Returns if the unit is full health
  15. {"HasAura", &LuaUnit::HasAura}, // :HasAura(spellId) - Returns true if the unit has the aura from the spell
  16. + {"IsStandState", &LuaUnit::IsStandState}, // :IsStandState()
  17. // Other
  18. {"RegisterEvent", &LuaUnit::RegisterEvent}, // :RegisterEvent(function, delay, calls)
  19. diff --git a/src/game/LuaEngine/UnitMethods.h b/src/game/LuaEngine/UnitMethods.h
  20. index 0e08cd8..7d77f06 100644
  21. --- a/src/game/LuaEngine/UnitMethods.h
  22. +++ b/src/game/LuaEngine/UnitMethods.h
  23. @@ -1030,6 +1030,13 @@ namespace LuaUnit
  24. unit->SetWaterWalk(enable);
  25. return 0;
  26. }
  27. +
  28. + int SetStandState(lua_State* L, Unit* unit)
  29. + {
  30. + uint8 state = sEluna.CHECK_ULONG(L, 1);
  31. + unit->SetStandState(state);
  32. + return 0;
  33. + }
  34. int IsAlive(lua_State* L, Unit* unit)
  35. {
  36. @@ -1263,6 +1270,12 @@ namespace LuaUnit
  37. return 1;
  38. }
  39. + int IsStandState(lua_State* L, Unit* unit)
  40. + {
  41. + sEluna.Push(L, unit->IsStandState());
  42. + return 1;
  43. + }
  44. +
  45. int RemoveAura(lua_State* L, Unit* unit)
  46. {
  47. uint32 spellId = luaL_checkunsigned(L, 1);