2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _ITEM_H_
|
|
|
|
#define _ITEM_H_
|
|
|
|
|
2018-03-06 22:22:19 +01:00
|
|
|
#include <Common.h>
|
2018-12-29 00:53:52 +01:00
|
|
|
#include "ForwardsZone.h"
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-11-29 16:55:48 +01:00
|
|
|
namespace Sapphire
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
class Item
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2018-12-29 12:43:03 +11:00
|
|
|
Item( uint64_t uId, uint32_t catalogId, FrameworkPtr pFw, bool isHq = false );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-12-26 00:43:27 +11:00
|
|
|
virtual ~Item() = default;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint32_t getId() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setId( uint32_t id );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t getUId() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setUId( uint64_t id );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setStackSize( uint32_t size );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint32_t getStackSize() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setCategory( Common::ItemUICategory categoryId );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
Common::ItemUICategory getCategory() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setModelIds( uint64_t model1, uint64_t model2 );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t getModelId1() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t getModelId2() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
bool isHq() const;
|
2017-08-11 00:58:35 -03:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setHq( bool isHq );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getDelay() const;
|
2017-08-11 00:58:35 -03:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getPhysicalDmg() const;
|
2017-08-19 16:50:50 -03:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getMagicalDmg() const;
|
2017-08-19 16:50:50 -03:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getWeaponDmg() const;
|
2017-11-16 20:44:37 -02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
bool isWeapon() const;
|
2017-08-11 00:58:35 -03:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
float getAutoAttackDmg() const;
|
2017-11-16 00:03:36 -02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getItemLevel() const;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint32_t getMaxStackSize() const;
|
2018-07-24 23:58:08 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getDurability() const;
|
|
|
|
void setDurability( uint16_t durability );
|
2018-08-31 23:25:53 +10:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t getStain() const;
|
|
|
|
void setStain( uint16_t stain );
|
2018-08-31 23:25:53 +10:00
|
|
|
|
2018-12-25 23:43:39 +11:00
|
|
|
uint32_t getAdditionalData() const;
|
|
|
|
|
2018-12-28 15:48:13 +11:00
|
|
|
void setSpiritbond( uint16_t spiritbond );
|
|
|
|
uint16_t getSpiritbond() const;
|
|
|
|
|
2018-12-28 17:12:24 +11:00
|
|
|
void setReservedFlag( uint32_t flag );
|
|
|
|
uint32_t getReservedFlag() const;
|
|
|
|
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
protected:
|
|
|
|
uint32_t m_id;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t m_uId;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
Common::ItemUICategory m_category;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint32_t m_stackSize;
|
|
|
|
uint32_t m_maxStackSize;
|
|
|
|
std::vector< uint8_t > m_classJobList;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint64_t m_model1;
|
|
|
|
uint64_t m_model2;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
bool m_isHq;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint16_t m_delayMs;
|
|
|
|
uint16_t m_physicalDmg;
|
|
|
|
uint16_t m_magicalDmg;
|
|
|
|
uint16_t m_weaponDmg;
|
|
|
|
float m_autoAttackDmg;
|
|
|
|
uint16_t m_itemLevel;
|
|
|
|
uint16_t m_durability;
|
|
|
|
uint16_t m_stain;
|
2018-12-28 15:48:13 +11:00
|
|
|
uint16_t m_spiritBond;
|
2018-12-28 17:12:24 +11:00
|
|
|
uint32_t m_reservedFlag;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-12-29 00:53:52 +01:00
|
|
|
FrameworkPtr m_pFw;
|
2018-12-25 23:43:39 +11:00
|
|
|
uint32_t m_additionalData;
|
2018-10-28 21:53:21 +01:00
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-12-08 15:38:25 +01:00
|
|
|
#endif
|