123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #pragma once
- #include <Text.h>
- #include <JSON.h>
- #include <Trie.h>
- #include <Writer.h>
- #include "Effect.h"
- #include "StaticRegistry.h"
- class Item;
- class ItemStack;
- class ItemSkill;
- class ItemSkillLevelUpRule;
- class ItemType : public virtual Framework::ReferenceCounter
- {
- protected:
- const int id;
- ItemSkillLevelUpRule* levelUpRule;
- const ItemType* zBrokenType;
- ItemType( int id, ItemSkillLevelUpRule* levelUpRule, const ItemType* zBrokenType );
- virtual void loadSuperItem( Item* zItem, Framework::StreamReader* zReader ) const;
- virtual void saveSuperItem( const Item* zItem, Framework::StreamWriter* zWriter ) const;
- virtual void loadSuperItemSkill( ItemSkill* zSkill, Framework::StreamReader* zReader ) const;
- virtual void saveSuperItemSkill( const ItemSkill* zSkill, Framework::StreamWriter* zWriter ) const;
- public:
- ~ItemType();
- int getId() const;
- const ItemType* zBrokenItemType() const;
- virtual Item* createItem() const = 0;
- virtual ItemStack* createItemStack( int size ) const;
- virtual ItemSkill* createDefaultItemSkill() const;
- virtual void levelUpItemSkill( ItemSkill* zSkill ) const;
- virtual Item* loadItem( Framework::StreamReader* zReader ) const;
- virtual void saveItem( const Item* zItem, Framework::StreamWriter* zWriter ) const;
- virtual ItemSkill* loadItemSkill( Framework::StreamReader* zReader ) const;
- virtual void saveItemSkill( const ItemSkill* zSkill, Framework::StreamWriter* zWriter ) const;
- virtual Item* cloneItem( Item* zItem ) const;
- virtual Item* breakItem( Item* zItem ) const;
- };
|