2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _PLAYERMINIMAL_H
|
|
|
|
#define _PLAYERMINIMAL_H
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2017-08-08 13:53:47 +02:00
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
class PlayerMinimal
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PlayerMinimal( void );
|
|
|
|
|
|
|
|
~PlayerMinimal( void );
|
|
|
|
|
|
|
|
// write player to the database
|
|
|
|
void write();
|
|
|
|
|
|
|
|
// load player from db, by id
|
|
|
|
void load( uint32_t charId );
|
|
|
|
|
|
|
|
void saveAsNew();
|
|
|
|
|
|
|
|
std::string getLookString();
|
|
|
|
|
|
|
|
std::string getInfoJson();
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
std::string getModelString();
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
std::string getClassString();
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-09-21 03:26:02 +10:00
|
|
|
uint8_t getClassLevel();
|
2018-09-21 01:59:45 +10:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
// return the id of the actor
|
|
|
|
uint32_t getId() const
|
|
|
|
{
|
|
|
|
return m_id;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setId( uint32_t id )
|
|
|
|
{
|
|
|
|
m_id = id;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setContentId( uint64_t id )
|
|
|
|
{
|
|
|
|
m_contentId = id;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint64_t getContentId() const
|
|
|
|
{
|
|
|
|
return m_contentId;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint32_t getAccountId() const
|
|
|
|
{
|
|
|
|
return m_accountId;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setAccountId( uint32_t accountId )
|
|
|
|
{
|
|
|
|
m_accountId = accountId;
|
|
|
|
}
|
|
|
|
|
|
|
|
// return the actors name
|
|
|
|
char* getName()
|
|
|
|
{
|
|
|
|
return m_name;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setLook( uint8_t index, uint32_t value )
|
|
|
|
{
|
|
|
|
m_lookMap[ index ] = value;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
// return the actors name
|
|
|
|
void setName( const char* name )
|
|
|
|
{
|
|
|
|
strcpy( m_name, name );
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setClass( uint8_t classId )
|
|
|
|
{
|
|
|
|
m_class = classId;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t getClass() const
|
|
|
|
{
|
|
|
|
return m_class;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t getGuardianDeity() const
|
|
|
|
{
|
|
|
|
return m_guardianDeity;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setGuardianDeity( uint8_t guardianId )
|
|
|
|
{
|
|
|
|
m_guardianDeity = guardianId;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setBirthDay( uint8_t day, uint8_t month )
|
|
|
|
{
|
|
|
|
m_birthDay = day;
|
|
|
|
m_birthMonth = month;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t getBirthDay() const
|
|
|
|
{
|
|
|
|
return m_birthDay;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t getBirthMonth() const
|
|
|
|
{
|
|
|
|
return m_birthMonth;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t getVoice() const
|
|
|
|
{
|
|
|
|
return m_birthMonth;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void setVoice( uint8_t voice )
|
|
|
|
{
|
|
|
|
m_voice = voice;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t getZoneId() const
|
|
|
|
{
|
|
|
|
return m_zoneId;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t getTribe() const
|
|
|
|
{
|
|
|
|
return m_tribe;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setTribe( uint8_t tribe )
|
|
|
|
{
|
|
|
|
m_tribe = tribe;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t getGmRank() const
|
|
|
|
{
|
|
|
|
return m_gmRank;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setGmRank( uint8_t rank )
|
|
|
|
{
|
|
|
|
m_gmRank = rank;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool getGmInvis() const
|
|
|
|
{
|
|
|
|
return m_gmInvis;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setGmInvis( bool invis )
|
|
|
|
{
|
|
|
|
m_gmInvis = invis;
|
|
|
|
}
|
|
|
|
|
|
|
|
void createInvDbContainer( uint16_t slot ) const;
|
|
|
|
|
|
|
|
uint32_t m_modelEquip[10];
|
|
|
|
|
|
|
|
uint64_t getNextUId64() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint32_t m_accountId;
|
|
|
|
uint32_t m_id;
|
|
|
|
uint64_t m_contentId;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t m_guardianDeity;
|
|
|
|
uint8_t m_birthMonth;
|
|
|
|
uint8_t m_birthDay;
|
|
|
|
uint8_t m_class;
|
2018-09-21 01:59:45 +10:00
|
|
|
uint8_t m_classLevel;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
|
|
|
uint8_t m_voice;
|
|
|
|
|
|
|
|
uint8_t m_tribe;
|
|
|
|
|
|
|
|
uint16_t m_zoneId;
|
|
|
|
|
2018-09-21 01:59:45 +10:00
|
|
|
uint64_t m_modelMainWeapon;
|
|
|
|
uint64_t m_modelSubWeapon;
|
|
|
|
uint8_t m_equipDisplayFlags;
|
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
std::map< uint8_t, uint8_t > m_lookMap;
|
|
|
|
std::map< uint8_t, uint16_t > m_classMap;
|
|
|
|
uint8_t m_look[26];
|
|
|
|
|
2018-09-21 01:59:45 +10:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
uint8_t m_gmRank;
|
|
|
|
bool m_gmInvis;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
char m_name[34];
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
void insertDbGlobalItem( uint32_t itemId, uint64_t uniqueId ) const;
|
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|