mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Added sql table for storing hunting log information
This commit is contained in:
parent
8d7bb478d6
commit
f1514e2a8d
4 changed files with 53 additions and 0 deletions
|
@ -584,3 +584,21 @@ CREATE TABLE `landplaceditems` (
|
|||
)
|
||||
COLLATE='latin1_swedish_ci' ENGINE=InnoDB;
|
||||
|
||||
|
||||
CREATE TABLE `charamonsternote` (
|
||||
`CharacterId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`Category_0` binary(41) DEFAULT NULL,
|
||||
`Category_1` binary(41) DEFAULT NULL,
|
||||
`Category_2` binary(41) DEFAULT NULL,
|
||||
`Category_3` binary(41) DEFAULT NULL,
|
||||
`Category_4` binary(41) DEFAULT NULL,
|
||||
`Category_5` binary(41) DEFAULT NULL,
|
||||
`Category_6` binary(41) DEFAULT NULL,
|
||||
`Category_7` binary(41) DEFAULT NULL,
|
||||
`Category_8` binary(41) DEFAULT NULL,
|
||||
`Category_9` binary(41) DEFAULT NULL,
|
||||
`Category_10` binary(41) DEFAULT NULL,
|
||||
`Category_11` binary(41) DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
@ -187,6 +187,7 @@ void PlayerMinimal::saveAsNew()
|
|||
std::vector< uint8_t > orchestrion( 40 );
|
||||
std::vector< uint8_t > modelEquip( 40 );
|
||||
std::vector< uint8_t > questTracking8( 10 );
|
||||
std::vector< uint8_t > monsterNote( 41 );
|
||||
std::vector< int16_t > questTracking = { -1, -1, -1, -1, -1 };
|
||||
|
||||
memset( questComplete.data(), 0, questComplete.size() );
|
||||
|
@ -328,6 +329,12 @@ void PlayerMinimal::saveAsNew()
|
|||
createInvDbContainer( InventoryType::Currency );
|
||||
createInvDbContainer( InventoryType::Crystal );
|
||||
|
||||
auto stmtMonsterNote = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_MONSTERNOTE_INS );
|
||||
stmtMonsterNote->setInt( 1, m_id );
|
||||
for( uint8_t i = 1; i <= 12; ++i )
|
||||
stmtMonsterNote->setBinary( i + 1, monsterNote );
|
||||
g_charaDb.directExecute( stmtMonsterNote );
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// SETUP EQUIPMENT / STARTING GEAR
|
||||
auto classJobInfo = g_exdDataGen.get< Sapphire::Data::ClassJob >( m_class );
|
||||
|
|
|
@ -175,6 +175,31 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements()
|
|||
"INSERT INTO charaglobalitem ( CharacterId, ItemId, catalogId, stack, UPDATE_DATE ) VALUES ( ?, ?, ?, ?, NOW() );",
|
||||
CONNECTION_SYNC );
|
||||
|
||||
/// CHARA MONSTERNOTE
|
||||
prepareStatement( CHARA_MONSTERNOTE_INS,
|
||||
"INSERT INTO charamonsternote ( CharacterId, Category_0, Category_1, Category_2,"
|
||||
" Category_3, Category_4, Category_5, Category_6,"
|
||||
" Category_7, Category_8, Category_9, Category_10,"
|
||||
" Category_11, UPDATE_DATE ) "
|
||||
" VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW() );",
|
||||
CONNECTION_SYNC );
|
||||
|
||||
prepareStatement( CHARA_MONSTERNOTE_UP, "UPDATE charamonsternote "
|
||||
" SET Category_0 = ?,"
|
||||
" Category_1 = ?,"
|
||||
" Category_2 = ?,"
|
||||
" Category_3 = ?,"
|
||||
" Category_4 = ?,"
|
||||
" Category_5 = ?,"
|
||||
" Category_6 = ?,"
|
||||
" Category_7 = ?,"
|
||||
" Category_8 = ?,"
|
||||
" Category_9 = ?,"
|
||||
" Category_10 = ?,"
|
||||
" Category_11 = ?"
|
||||
" WHERE CharacterId = ?;",
|
||||
CONNECTION_ASYNC );
|
||||
|
||||
/// ZONE QUERIES
|
||||
prepareStatement( ZONE_SEL_BNPCTEMPLATES,
|
||||
"SELECT Id, Name, bNPCBaseId, bNPCNameId, mainWeaponModel, "
|
||||
|
|
|
@ -76,6 +76,9 @@ namespace Sapphire::Db
|
|||
CHARA_ITEMGLOBAL_UP,
|
||||
CHARA_ITEMGLOBAL_DELETE,
|
||||
|
||||
CHARA_MONSTERNOTE_INS,
|
||||
CHARA_MONSTERNOTE_UP,
|
||||
|
||||
ZONE_SEL_BNPCTEMPLATES,
|
||||
ZONE_SEL_SPAWNGROUPS,
|
||||
ZONE_SEL_SPAWNPOINTS,
|
||||
|
|
Loading…
Add table
Reference in a new issue