mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
Fixed level 0 and no weapon bug
This commit is contained in:
parent
5ccba7ce61
commit
1f10c555f8
4 changed files with 9 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
#define _COMMON_H
|
#define _COMMON_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
|
|
@ -91,6 +91,7 @@ int main()
|
||||||
|
|
||||||
g_log.info( "Database: Connected to " + params.hostname + ":" + std::to_string( params.port ) );
|
g_log.info( "Database: Connected to " + params.hostname + ":" + std::to_string( params.port ) );
|
||||||
g_exdData.loadZoneInfo();
|
g_exdData.loadZoneInfo();
|
||||||
|
g_exdData.loadClassJobInfo();
|
||||||
|
|
||||||
HttpServer server;
|
HttpServer server;
|
||||||
server.config.port = stoi( m_pConfig->getValue< std::string >( "Settings.General.HttpPort", "80" ) );
|
server.config.port = stoi( m_pConfig->getValue< std::string >( "Settings.General.HttpPort", "80" ) );
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include <Server_Common/UtilMath.h>
|
#include <Server_Common/UtilMath.h>
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Forwards.h"
|
#include "Forwards.h"
|
||||||
|
#include "Inventory.h"
|
||||||
|
#include "Item.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Network {
|
namespace Network {
|
||||||
|
@ -45,7 +47,9 @@ namespace Core {
|
||||||
//m_data.tPMax = 3000;
|
//m_data.tPMax = 3000;
|
||||||
m_data.level = pPlayer->getLevel();
|
m_data.level = pPlayer->getLevel();
|
||||||
memcpy( m_data.look, pPlayer->getLookArray(), 26 );
|
memcpy( m_data.look, pPlayer->getLookArray(), 26 );
|
||||||
m_data.mainWeaponModel = pPlayer->getModelMainWeapon();
|
auto item = pPlayer->getInvetory()->getItemAt( Inventory::GearSet0, 0 );
|
||||||
|
if( item )
|
||||||
|
m_data.mainWeaponModel = item->getModelId1();
|
||||||
m_data.secWeaponModel = pPlayer->getModelSubWeapon();
|
m_data.secWeaponModel = pPlayer->getModelSubWeapon();
|
||||||
m_data.models[0] = pPlayer->getModelForSlot( Inventory::EquipSlot::Head );
|
m_data.models[0] = pPlayer->getModelForSlot( Inventory::EquipSlot::Head );
|
||||||
m_data.models[1] = pPlayer->getModelForSlot( Inventory::EquipSlot::Body );
|
m_data.models[1] = pPlayer->getModelForSlot( Inventory::EquipSlot::Body );
|
||||||
|
|
|
@ -129,6 +129,8 @@ bool Core::Entity::Player::load( uint32_t charId, Core::SessionPtr pSession )
|
||||||
|
|
||||||
field[11].getBinary( reinterpret_cast< char* >( m_customize ), 26 );
|
field[11].getBinary( reinterpret_cast< char* >( m_customize ), 26 );
|
||||||
|
|
||||||
|
m_modelMainWeapon = field[12].getUInt64();
|
||||||
|
|
||||||
field[14].getBinary( reinterpret_cast< char* >( m_modelEquip ), 40 );
|
field[14].getBinary( reinterpret_cast< char* >( m_modelEquip ), 40 );
|
||||||
|
|
||||||
m_guardianDeity = field[15].getUInt8();
|
m_guardianDeity = field[15].getUInt8();
|
||||||
|
|
Loading…
Add table
Reference in a new issue