mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Store and load territoryID
This commit is contained in:
parent
9f7500ba75
commit
43a9124ce7
3 changed files with 9 additions and 5 deletions
|
@ -998,6 +998,7 @@ namespace Core::Entity
|
|||
bool m_bAutoattack;
|
||||
|
||||
Common::ZoneingType m_zoningType;
|
||||
uint16_t m_territoryId;
|
||||
|
||||
bool m_bMarkedForZoning;
|
||||
bool m_bNewAdventurer;
|
||||
|
|
|
@ -50,6 +50,7 @@ bool Core::Entity::Player::load( uint32_t charId, SessionPtr pSession )
|
|||
strcpy( m_name, name.c_str() );
|
||||
|
||||
auto zoneId = res->getUInt( "TerritoryType" );
|
||||
m_territoryId = res->getUInt( "TerritoryId" );
|
||||
m_prevZoneId = res->getUInt( "OTerritoryType" );
|
||||
|
||||
// Position
|
||||
|
@ -365,7 +366,7 @@ void Core::Entity::Player::updateSql()
|
|||
stmt->setInt( 17, static_cast< uint32_t >( m_bNewAdventurer ) );
|
||||
|
||||
stmt->setInt( 18, m_zoneId ); // TerritoryType
|
||||
stmt->setInt( 19, 0 ); // TerritoryId
|
||||
stmt->setInt( 19, m_territoryId ); // TerritoryId
|
||||
stmt->setDouble( 20, m_pos.x );
|
||||
stmt->setDouble( 21, m_pos.y );
|
||||
stmt->setDouble( 22, m_pos.z );
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Core {
|
||||
namespace Core
|
||||
{
|
||||
|
||||
class Session;
|
||||
|
||||
|
@ -25,7 +26,8 @@ class ZonePosition;
|
|||
using SessionSet = std::set< SessionPtr >;
|
||||
using FestivalPair = std::pair< uint16_t, uint16_t >;
|
||||
|
||||
namespace Data {
|
||||
namespace Data
|
||||
{
|
||||
struct InstanceContent;
|
||||
struct TerritoryType;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue