BasicItems.cpp 400 B

123456789101112131415161718
  1. #include "BasicItems.h"
  2. #include "ModelInfo.h"
  3. NoBlockItemType::NoBlockItemType(int id,
  4. const char* name,
  5. ItemSkillLevelUpRule* levelUp,
  6. int brokenTypeId,
  7. ModelInfo model,
  8. std::function<Item*()> createItemImp)
  9. : ItemType(id, name, levelUp, brokenTypeId, model),
  10. createItemImp(createItemImp)
  11. {}
  12. Item* NoBlockItemType::createItem() const
  13. {
  14. return createItemImp();
  15. }