mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
remove unused header, fix monsternote crashing world if class has none
This commit is contained in:
parent
ce1a58a7f7
commit
d5f01363ca
2 changed files with 10 additions and 2 deletions
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
#include <Common.h>
|
#include <Common.h>
|
||||||
#include "ForwardsZone.h"
|
#include "ForwardsZone.h"
|
||||||
#include <array>
|
|
||||||
|
|
||||||
namespace Sapphire::Data
|
namespace Sapphire::Data
|
||||||
{
|
{
|
||||||
|
|
|
@ -2051,6 +2051,11 @@ void Sapphire::Entity::Player::updateHuntingLog( uint16_t id )
|
||||||
bool sectionChanged = false;
|
bool sectionChanged = false;
|
||||||
uint32_t monsterNoteId = static_cast< uint32_t >( ( static_cast< uint8_t >( getClass() ) ) * 10000 + logEntry.rank * 10 + i );
|
uint32_t monsterNoteId = static_cast< uint32_t >( ( static_cast< uint8_t >( getClass() ) ) * 10000 + logEntry.rank * 10 + i );
|
||||||
auto note = pExdData->get< Sapphire::Data::MonsterNote >( monsterNoteId );
|
auto note = pExdData->get< Sapphire::Data::MonsterNote >( monsterNoteId );
|
||||||
|
|
||||||
|
// for classes that don't have entries, if the first fails the rest will fail
|
||||||
|
if( !note )
|
||||||
|
break;
|
||||||
|
|
||||||
for( auto x = 0; x < 4; ++x )
|
for( auto x = 0; x < 4; ++x )
|
||||||
{
|
{
|
||||||
auto note1 = pExdData->get< Sapphire::Data::MonsterNoteTarget >( note->monsterNoteTarget[ x ] );
|
auto note1 = pExdData->get< Sapphire::Data::MonsterNoteTarget >( note->monsterNoteTarget[ x ] );
|
||||||
|
@ -2086,6 +2091,10 @@ void Sapphire::Entity::Player::updateHuntingLog( uint16_t id )
|
||||||
static_cast< uint8_t >( getClass() ), logEntry.rank + 1, 0 ) );
|
static_cast< uint8_t >( getClass() ), logEntry.rank + 1, 0 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendHuntingLog();
|
|
||||||
|
if( logChanged )
|
||||||
|
{
|
||||||
|
sendHuntingLog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue