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:
parent
d4d8c3c155
commit
f0e1990cbd
2 changed files with 6 additions and 0 deletions
|
@ -836,6 +836,7 @@ Entity::BNpcPtr Territory::createBNpcFromLayoutId( uint32_t layoutId, uint32_t h
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto pBNpc = std::make_shared< Entity::BNpc >( getNextActorId(), infoPtr->second, *this, hp, bnpcType );
|
auto pBNpc = std::make_shared< Entity::BNpc >( getNextActorId(), infoPtr->second, *this, hp, bnpcType );
|
||||||
|
pBNpc->init();
|
||||||
pBNpc->setTriggerOwnerId( triggerOwnerId );
|
pBNpc->setTriggerOwnerId( triggerOwnerId );
|
||||||
pushActor( pBNpc );
|
pushActor( pBNpc );
|
||||||
return pBNpc;
|
return pBNpc;
|
||||||
|
|
|
@ -144,6 +144,11 @@ std::string readFileToString( const std::string& filename )
|
||||||
// Close the file
|
// Close the file
|
||||||
file.close();
|
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 the file contents as a string
|
||||||
return fileContents;
|
return fileContents;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue