#ifndef STAR_ARMOR_WEARER_HPP #define STAR_ARMOR_WEARER_HPP #include "StarHumanoid.hpp" #include "StarNetElementSystem.hpp" #include "StarEffectEmitter.hpp" #include "StarItemDescriptor.hpp" #include "StarStatusTypes.hpp" #include "StarLightSource.hpp" #include "StarDamage.hpp" namespace Star { STAR_CLASS(ObjectItem); STAR_CLASS(HeadArmor); STAR_CLASS(ChestArmor); STAR_CLASS(LegsArmor); STAR_CLASS(BackArmor); STAR_CLASS(ToolUserEntity); STAR_CLASS(Item); STAR_CLASS(World); STAR_CLASS(ArmorWearer); class ArmorWearer : public NetElementSyncGroup { public: ArmorWearer(); void setupHumanoidClothingDrawables(Humanoid& humanoid, bool forceNude); void effects(EffectEmitter& effectEmitter); List statusEffects() const; void reset(); Json diskStore() const; void diskLoad(Json const& diskStore); void setHeadItem(HeadArmorPtr headItem); void setHeadCosmeticItem(HeadArmorPtr headCosmeticItem); void setChestItem(ChestArmorPtr chestItem); void setChestCosmeticItem(ChestArmorPtr chestCosmeticItem); void setLegsItem(LegsArmorPtr legsItem); void setLegsCosmeticItem(LegsArmorPtr legsCosmeticItem); void setBackItem(BackArmorPtr backItem); void setBackCosmeticItem(BackArmorPtr backCosmeticItem); HeadArmorPtr headItem() const; HeadArmorPtr headCosmeticItem() const; ChestArmorPtr chestItem() const; ChestArmorPtr chestCosmeticItem() const; LegsArmorPtr legsItem() const; LegsArmorPtr legsCosmeticItem() const; BackArmorPtr backItem() const; BackArmorPtr backCosmeticItem() const; ItemDescriptor headItemDescriptor() const; ItemDescriptor headCosmeticItemDescriptor() const; ItemDescriptor chestItemDescriptor() const; ItemDescriptor chestCosmeticItemDescriptor() const; ItemDescriptor legsItemDescriptor() const; ItemDescriptor legsCosmeticItemDescriptor() const; ItemDescriptor backItemDescriptor() const; ItemDescriptor backCosmeticItemDescriptor() const; private: void netElementsNeedLoad(bool full) override; void netElementsNeedStore() override; HeadArmorPtr m_headItem; ChestArmorPtr m_chestItem; LegsArmorPtr m_legsItem; BackArmorPtr m_backItem; HeadArmorPtr m_headCosmeticItem; ChestArmorPtr m_chestCosmeticItem; LegsArmorPtr m_legsCosmeticItem; BackArmorPtr m_backCosmeticItem; NetElementData m_headItemDataNetState; NetElementData m_chestItemDataNetState; NetElementData m_legsItemDataNetState; NetElementData m_backItemDataNetState; NetElementData m_headCosmeticItemDataNetState; NetElementData m_chestCosmeticItemDataNetState; NetElementData m_legsCosmeticItemDataNetState; NetElementData m_backCosmeticItemDataNetState; bool m_lastNude; bool m_headNeedsSync; bool m_chestNeedsSync; bool m_legsNeedsSync; bool m_backNeedsSync; }; } #endif