ItemType.h 649 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <Text.h>
  3. #include <JSON.h>
  4. #include <Trie.h>
  5. #include <Writer.h>
  6. #include "StaticRegistry.h"
  7. class Item;
  8. class ItemStack;
  9. class ItemSkill;
  10. class ItemSkillLevelUpRule;
  11. class ItemType : public virtual Framework::ReferenceCounter
  12. {
  13. protected:
  14. const int id;
  15. ItemType( int id );
  16. virtual void loadSuperItem( Item *zItem, Framework::StreamReader *zReader ) const;
  17. public:
  18. ~ItemType();
  19. int getId() const;
  20. virtual Item *createItem() const = 0;
  21. virtual ItemStack *createItemStack( int size ) const;
  22. virtual Item *loadItem( Framework::StreamReader *zReader ) const;
  23. };