mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 02:04:04 +00:00
fix: general crashes (#1336)
* Fix crashes fix crash with chat filter fix ldf_config being empty in database on windows debug * WorldServer: Fix further crashes on windows address multi threaded signal handling on worldservers Remove iterator invalidation code in zone manager
This commit is contained in:
@@ -110,3 +110,7 @@ void User::UserOutOfSync() {
|
||||
Game::server->Disconnect(this->m_SystemAddress, eServerDisconnectIdentifiers::PLAY_SCHEDULE_TIME_DONE);
|
||||
}
|
||||
}
|
||||
|
||||
void User::UpdateBestFriendValue(const std::string_view playerName, const bool newValue) {
|
||||
m_IsBestFriendMap[playerName.data()] = newValue;
|
||||
}
|
||||
|
@@ -43,8 +43,8 @@ public:
|
||||
bool GetLastChatMessageApproved() { return m_LastChatMessageApproved; }
|
||||
void SetLastChatMessageApproved(bool approved) { m_LastChatMessageApproved = approved; }
|
||||
|
||||
std::unordered_map<std::string, bool> GetIsBestFriendMap() { return m_IsBestFriendMap; }
|
||||
void SetIsBestFriendMap(std::unordered_map<std::string, bool> mapToSet) { m_IsBestFriendMap = mapToSet; }
|
||||
const std::unordered_map<std::string, bool>& GetIsBestFriendMap() { return m_IsBestFriendMap; }
|
||||
void UpdateBestFriendValue(const std::string_view playerName, const bool newValue);
|
||||
|
||||
bool GetIsMuted() const;
|
||||
|
||||
|
@@ -5578,7 +5578,7 @@ void GameMessages::HandleModularBuildFinish(RakNet::BitStream* inStream, Entity*
|
||||
|
||||
std::unique_ptr<sql::PreparedStatement> stmt(Database::Get()->CreatePreppedStmt("INSERT INTO ugc_modular_build (ugc_id, ldf_config, character_id) VALUES (?,?,?)"));
|
||||
stmt->setUInt64(1, newIdBig);
|
||||
stmt->setString(2, GeneralUtils::UTF16ToWTF8(modules));
|
||||
stmt->setString(2, GeneralUtils::UTF16ToWTF8(modules).c_str());
|
||||
auto* pCharacter = character->GetCharacter();
|
||||
pCharacter ? stmt->setUInt(3, pCharacter->GetID()) : stmt->setNull(3, sql::DataType::BIGINT);
|
||||
stmt->execute();
|
||||
|
Reference in New Issue
Block a user