2
0

HeroInstance.cpp 874 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * HeroInstance.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 "HeroInstance.h"
  12. #include "Registry.h"
  13. #include "../LuaStack.h"
  14. #include "../LuaCallWrapper.h"
  15. VCMI_LIB_NAMESPACE_BEGIN
  16. namespace scripting
  17. {
  18. namespace api
  19. {
  20. VCMI_REGISTER_CORE_SCRIPT_API(HeroInstanceProxy, "HeroInstance");
  21. const std::vector<HeroInstanceProxy::CustomRegType> HeroInstanceProxy::REGISTER_CUSTOM =
  22. {
  23. {"getStack", LuaMethodWrapper<CGHeroInstance, decltype(&CCreatureSet::getStackPtr), &CCreatureSet::getStackPtr>::invoke, false},
  24. {"getOwner", LuaMethodWrapper<CGHeroInstance, decltype(&CGObjectInstance::getOwner), &CGObjectInstance::getOwner>::invoke, false},
  25. };
  26. }
  27. }
  28. VCMI_LIB_NAMESPACE_END