mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Fixed a couple compiler warnings
This commit is contained in:
parent
8f9f5893dd
commit
2228979cd1
5 changed files with 8 additions and 6 deletions
|
@ -207,7 +207,7 @@ boost::shared_ptr< Mysql::PreparedStatement > Core::Db::DbConnection::getPrepare
|
||||||
assert( index < m_stmts.size() );
|
assert( index < m_stmts.size() );
|
||||||
auto ret = m_stmts[ index ];
|
auto ret = m_stmts[ index ];
|
||||||
if( !ret )
|
if( !ret )
|
||||||
nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,4 +118,4 @@ uint32_t Core::Entity::BNpc::getBNpcNameId() const
|
||||||
void Core::Entity::BNpc::spawn( PlayerPtr pTarget )
|
void Core::Entity::BNpc::spawn( PlayerPtr pTarget )
|
||||||
{
|
{
|
||||||
pTarget->queuePacket( boost::make_shared< NpcSpawnPacket >( *getAsBNpc(), *pTarget ) );
|
pTarget->queuePacket( boost::make_shared< NpcSpawnPacket >( *getAsBNpc(), *pTarget ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
void spawn( PlayerPtr pTarget ) override;
|
void spawn( PlayerPtr pTarget ) override;
|
||||||
|
|
||||||
uint16_t getModelChara() const;
|
uint16_t getModelChara() const;
|
||||||
uint8_t getLevel() const;
|
uint8_t getLevel() const override;
|
||||||
|
|
||||||
uint32_t getBNpcBaseId() const;
|
uint32_t getBNpcBaseId() const;
|
||||||
uint32_t getBNpcNameId() const;
|
uint32_t getBNpcNameId() const;
|
||||||
|
|
|
@ -458,7 +458,8 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u
|
||||||
|
|
||||||
effectPacket->addEffect( effectEntry );
|
effectPacket->addEffect( effectEntry );
|
||||||
|
|
||||||
if( actionInfoPtr->castType == 1 && actionInfoPtr->effectRange != 0 || actionInfoPtr->castType != 1 )
|
if( ( actionInfoPtr->castType == 1 && actionInfoPtr->effectRange != 0 ) ||
|
||||||
|
( actionInfoPtr->castType != 1 ) )
|
||||||
{
|
{
|
||||||
// If action on this specific target is valid...
|
// If action on this specific target is valid...
|
||||||
if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Enemies ) )
|
if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Enemies ) )
|
||||||
|
@ -518,7 +519,7 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u
|
||||||
|
|
||||||
effectPacket->addEffect( effectEntry );
|
effectPacket->addEffect( effectEntry );
|
||||||
|
|
||||||
if( actionInfoPtr->castType == 1 && actionInfoPtr->effectRange != 0 || actionInfoPtr->castType != 1 )
|
if( ( actionInfoPtr->castType == 1 && actionInfoPtr->effectRange != 0 ) || actionInfoPtr->castType != 1 )
|
||||||
{
|
{
|
||||||
if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Allies ) )
|
if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Allies ) )
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -313,6 +313,7 @@ bool Core::Entity::Player::loadSearchInfo()
|
||||||
|
|
||||||
// todo: internally use an std::string instead of a char[]
|
// todo: internally use an std::string instead of a char[]
|
||||||
auto searchMessage = res->getString( 4 );
|
auto searchMessage = res->getString( 4 );
|
||||||
|
memset( m_searchMessage, 0, sizeof( m_searchMessage ) );
|
||||||
std::copy( searchMessage.begin(), searchMessage.end(), m_searchMessage );
|
std::copy( searchMessage.begin(), searchMessage.end(), m_searchMessage );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -501,7 +502,7 @@ void Core::Entity::Player::updateDbSearchInfo() const
|
||||||
pDb->execute( stmtS1 );
|
pDb->execute( stmtS1 );
|
||||||
|
|
||||||
auto stmtS2 = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SEARCHCOMMENT );
|
auto stmtS2 = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SEARCHCOMMENT );
|
||||||
stmtS2->setString( 1, string( m_searchMessage != nullptr ? m_searchMessage : "" ) );
|
stmtS2->setString( 1, string( m_searchMessage ) );
|
||||||
stmtS2->setInt( 2, m_id );
|
stmtS2->setInt( 2, m_id );
|
||||||
pDb->execute( stmtS2 );
|
pDb->execute( stmtS2 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue