mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
Fixing linkshellid to uint64_t
updating methods, internal collection, and sql representation
This commit is contained in:
parent
05e5221f2e
commit
3ae890cc78
3 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `infolinkshell`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE `infolinkshell` (
|
CREATE TABLE `infolinkshell` (
|
||||||
`LinkshellId` int(20) NOT NULL AUTO_INCREMENT,
|
`LinkshellId` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
`MasterCharacterId` int(20) DEFAULT NULL,
|
`MasterCharacterId` int(20) DEFAULT NULL,
|
||||||
`CharacterIdList` blob,
|
`CharacterIdList` blob,
|
||||||
`LinkshellName` varchar(32) DEFAULT NULL,
|
`LinkshellName` varchar(32) DEFAULT NULL,
|
||||||
|
|
|
@ -29,7 +29,7 @@ bool Core::LinkshellMgr::loadLinkshells()
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
uint32_t linkshellId = field[0].get< uint32_t >();
|
uint64_t linkshellId = field[0].get< uint64_t >();
|
||||||
uint32_t masterId = field[1].get< uint32_t >();
|
uint32_t masterId = field[1].get< uint32_t >();
|
||||||
std::string name = field[3].getString();
|
std::string name = field[3].getString();
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ Core::LinkshellPtr Core::LinkshellMgr::getLinkshellByName( const std::string& na
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::LinkshellPtr Core::LinkshellMgr::getLinkshellById( uint32_t lsId )
|
Core::LinkshellPtr Core::LinkshellMgr::getLinkshellById( uint64_t lsId )
|
||||||
{
|
{
|
||||||
auto it = m_linkshellIdMap.find( lsId );
|
auto it = m_linkshellIdMap.find( lsId );
|
||||||
if( it == m_linkshellIdMap.end() )
|
if( it == m_linkshellIdMap.end() )
|
||||||
|
|
|
@ -12,11 +12,11 @@ typedef boost::shared_ptr< Linkshell > LinkshellPtr;
|
||||||
class LinkshellMgr
|
class LinkshellMgr
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::map< uint32_t, LinkshellPtr > m_linkshellIdMap;
|
std::map< uint64_t, LinkshellPtr > m_linkshellIdMap;
|
||||||
std::map< std::string, LinkshellPtr > m_linkshellNameMap;
|
std::map< std::string, LinkshellPtr > m_linkshellNameMap;
|
||||||
|
|
||||||
LinkshellPtr getLinkshellByName( const std::string& name );
|
LinkshellPtr getLinkshellByName( const std::string& name );
|
||||||
LinkshellPtr getLinkshellById( uint32_t lsId );
|
LinkshellPtr getLinkshellById( uint64_t lsId );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LinkshellMgr();
|
LinkshellMgr();
|
||||||
|
|
Loading…
Add table
Reference in a new issue