mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
D:
This commit is contained in:
parent
8561967851
commit
363fc3c3ce
3 changed files with 27 additions and 21 deletions
|
@ -1 +1,2 @@
|
|||
ALTER TABLE `land` ADD `Type` SMALLINT(6) NOT NULL DEFAULT '0' AFTER `LandId`;
|
||||
ALTER TABLE `house` ADD `HouseName` binary(23) DEFAULT "" AFTER `Comment`;
|
|
@ -10,15 +10,15 @@
|
|||
|
||||
extern Core::Framework g_fw;
|
||||
|
||||
Core::House::House( uint32_t houseId, uint32_t landSetId, uint8_t landId, uint8_t wardNum, uint16_t zoneId ) :
|
||||
Core::House::House( uint32_t houseId, uint32_t landSetId, uint8_t landId, uint8_t wardNum, uint16_t territoryTypeId ) :
|
||||
m_houseId( houseId ),
|
||||
m_landSetId( landSetId ),
|
||||
m_landId( landId ),
|
||||
m_wardNum( wardNum ),
|
||||
m_zoneId( zoneId )
|
||||
m_territoryTypeId( territoryTypeId )
|
||||
{
|
||||
memset( &m_houseParts, 0x00, 8 );
|
||||
memset( &m_HouseMsg, 0x00, 193 );
|
||||
std::memset( &m_houseParts, 0x00, sizeof( m_houseParts ) );
|
||||
std::memset( &m_commentMsg, 0x00, 193 );
|
||||
}
|
||||
|
||||
Core::House::~House()
|
||||
|
@ -26,27 +26,32 @@ Core::House::~House()
|
|||
|
||||
}
|
||||
|
||||
uint32_t Core::House::getLandSetId()
|
||||
uint32_t Core::House::getLandSetId() const
|
||||
{
|
||||
return m_landSetId;
|
||||
}
|
||||
|
||||
uint8_t Core::House::getLandId()
|
||||
uint8_t Core::House::getLandId() const
|
||||
{
|
||||
return m_landId;
|
||||
}
|
||||
|
||||
uint8_t Core::House::getWardNum()
|
||||
uint8_t Core::House::getWardNum() const
|
||||
{
|
||||
return m_wardNum;
|
||||
}
|
||||
|
||||
uint32_t Core::House::getHouseId()
|
||||
uint16_t Core::House::getTerritoryTypeId() const
|
||||
{
|
||||
return m_territoryTypeId;
|
||||
}
|
||||
|
||||
uint32_t Core::House::getHouseId() const
|
||||
{
|
||||
return m_houseId;
|
||||
}
|
||||
|
||||
uint8_t Core::House::getHousePartColor( Common::HousePartSlot slot )
|
||||
uint8_t Core::House::getHousePartColor( Common::HousePartSlot slot ) const
|
||||
{
|
||||
return m_housePartsColor[ slot ];
|
||||
}
|
||||
|
@ -61,7 +66,7 @@ void Core::House::setHousePartColor( Common::HousePartSlot slot, uint32_t id )
|
|||
m_housePartsColor[ slot ] = id;
|
||||
}
|
||||
|
||||
uint32_t Core::House::getHousePart( Common::HousePartSlot slot )
|
||||
uint32_t Core::House::getHousePart( Common::HousePartSlot slot ) const
|
||||
{
|
||||
return m_houseParts[ slot ];
|
||||
}
|
||||
|
|
|
@ -13,33 +13,33 @@ namespace Core
|
|||
{
|
||||
|
||||
public:
|
||||
House( uint32_t houseId, uint32_t landSetId, uint8_t landId, uint8_t wardNum, uint16_t zoneId );
|
||||
House( uint32_t houseId, uint32_t landSetId, uint8_t landId, uint8_t wardNum, uint16_t territoryTypeId );
|
||||
virtual ~House();
|
||||
|
||||
//gerneral
|
||||
uint32_t getLandSetId();
|
||||
uint8_t getLandId();
|
||||
uint8_t getWardNum();
|
||||
uint16_t getZoneId();
|
||||
uint32_t getHouseId();
|
||||
uint32_t getLandSetId() const;
|
||||
uint8_t getLandId() const;
|
||||
uint8_t getWardNum() const;
|
||||
uint16_t getTerritoryTypeId() const;
|
||||
uint32_t getHouseId() const;
|
||||
|
||||
//functions
|
||||
void setHousePart( Common::HousePartSlot slot, uint32_t id );
|
||||
void setHousePartColor( Common::HousePartSlot slot, uint32_t id );
|
||||
uint32_t getHousePart( Common::HousePartSlot slot );
|
||||
uint8_t getHousePartColor( Common::HousePartSlot slot );
|
||||
uint32_t getHousePart( Common::HousePartSlot slot ) const;
|
||||
uint8_t getHousePartColor( Common::HousePartSlot slot ) const;
|
||||
|
||||
private:
|
||||
uint32_t m_landSetId;
|
||||
uint8_t m_landId;
|
||||
uint8_t m_wardNum;
|
||||
uint16_t m_zoneId;
|
||||
uint16_t m_territoryTypeId;
|
||||
uint32_t m_houseId;
|
||||
|
||||
uint32_t m_houseParts[8];
|
||||
uint8_t m_housePartsColor[8];
|
||||
|
||||
char m_HouseMsg[193];
|
||||
char m_commentMsg[193];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue