1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Some bug fixes

This commit is contained in:
Toofy 2023-04-18 17:33:29 +01:00
parent d4d8c3c155
commit f0e1990cbd
2 changed files with 6 additions and 0 deletions

View file

@ -836,6 +836,7 @@ Entity::BNpcPtr Territory::createBNpcFromLayoutId( uint32_t layoutId, uint32_t h
return nullptr;
auto pBNpc = std::make_shared< Entity::BNpc >( getNextActorId(), infoPtr->second, *this, hp, bnpcType );
pBNpc->init();
pBNpc->setTriggerOwnerId( triggerOwnerId );
pushActor( pBNpc );
return pBNpc;

View file

@ -144,6 +144,11 @@ std::string readFileToString( const std::string& filename )
// Close the file
file.close();
// Remove all newlines from the file contents
fileContents.erase(std::remove(fileContents.begin(), fileContents.end(), '\n'), fileContents.end());
fileContents.erase(std::remove(fileContents.begin(), fileContents.end(), '\r'), fileContents.end());
// Return the file contents as a string
return fileContents;
}