ItemType.h 618 B

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