HeroClass.cpp 991 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * api/HeroClass.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "StdInc.h"
  11. #include "HeroClass.h"
  12. #include "Registry.h"
  13. #include "../LuaStack.h"
  14. #include "../LuaCallWrapper.h"
  15. namespace scripting
  16. {
  17. namespace api
  18. {
  19. VCMI_REGISTER_CORE_SCRIPT_API(HeroClassProxy, "HeroClass");
  20. const std::vector<HeroClassProxy::CustomRegType> HeroClassProxy::REGISTER_CUSTOM =
  21. {
  22. {"getIconIndex", LuaMethodWrapper<HeroClass, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
  23. {"getIndex", LuaMethodWrapper<HeroClass, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
  24. {"getJsonKey", LuaMethodWrapper<HeroClass, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
  25. {"getName", LuaMethodWrapper<HeroClass, decltype(&Entity::getName), &Entity::getName>::invoke, false},
  26. };
  27. }
  28. }