mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 02:38:45 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c50100fcdb | |||
| 20cdc1e63d | |||
| 43c7523ee1 | |||
| e060d97798 | |||
| 435b6142b8 |
@@ -1,3 +1,21 @@
|
|||||||
|
## [22.44.5] - 2/12/2024
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* [Hotfix] Fix issues where we're using the wrong database pointers @Akkadius
|
||||||
|
|
||||||
|
## [22.44.4] - 2/12/2024
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Fix ClearSpawnTimers() ([#4073](https://github.com/EQEmu/Server/pull/4073)) @Kinglykrab 2024-02-13
|
||||||
|
|
||||||
|
## [22.44.3] - 2/12/2024
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Fix Issue with ClearSpawnTimers() ([#4070](https://github.com/EQEmu/Server/pull/4070)) @Kinglykrab 2024-02-13
|
||||||
|
|
||||||
## [22.44.2] - 2/12/2024
|
## [22.44.2] - 2/12/2024
|
||||||
|
|
||||||
### Bots
|
### Bots
|
||||||
|
|||||||
+12
-2
@@ -75,9 +75,18 @@ class BaseGuildManager
|
|||||||
virtual ~BaseGuildManager();
|
virtual ~BaseGuildManager();
|
||||||
|
|
||||||
//this must be called before doing anything else with this object
|
//this must be called before doing anything else with this object
|
||||||
void SetDatabase(Database *db)
|
BaseGuildManager * SetDatabase(Database *db)
|
||||||
{
|
{
|
||||||
m_db = db;
|
m_db = db;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
BaseGuildManager * SetContentDatabase(Database *db)
|
||||||
|
{
|
||||||
|
m_content_db = db;
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LoadGuilds();
|
bool LoadGuilds();
|
||||||
@@ -194,7 +203,8 @@ class BaseGuildManager
|
|||||||
std::map<uint32, GuildInfo *> m_guilds; //we own the pointers in this map
|
std::map<uint32, GuildInfo *> m_guilds; //we own the pointers in this map
|
||||||
void ClearGuilds(); //clears internal structure
|
void ClearGuilds(); //clears internal structure
|
||||||
|
|
||||||
Database *m_db; //we do not own this
|
Database *m_db;
|
||||||
|
Database *m_content_db;
|
||||||
|
|
||||||
bool _StoreGuildDB(uint32 guild_id);
|
bool _StoreGuildDB(uint32 guild_id);
|
||||||
GuildInfo* _CreateGuild(uint32 guild_id, std::string guild_name, uint32 leader_char_id, uint8 minstatus, std::string guild_motd, std::string motd_setter, std::string Channel, std::string URL, uint32 favour);
|
GuildInfo* _CreateGuild(uint32 guild_id, std::string guild_name, uint32 leader_char_id, uint8 minstatus, std::string guild_motd, std::string motd_setter, std::string Channel, std::string URL, uint32 favour);
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// Build variables
|
// Build variables
|
||||||
// these get injected during the build pipeline
|
// these get injected during the build pipeline
|
||||||
#define CURRENT_VERSION "22.44.2-dev" // always append -dev to the current version for custom-builds
|
#define CURRENT_VERSION "22.44.5-dev" // always append -dev to the current version for custom-builds
|
||||||
#define LOGIN_VERSION "0.8.0"
|
#define LOGIN_VERSION "0.8.0"
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eqemu-server",
|
"name": "eqemu-server",
|
||||||
"version": "22.44.2",
|
"version": "22.44.5",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EQEmu/Server.git"
|
"url": "https://github.com/EQEmu/Server.git"
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ bool WorldGuildManager::LoadTributes()
|
|||||||
|
|
||||||
tribute_list.clear();
|
tribute_list.clear();
|
||||||
|
|
||||||
auto tributes = TributesRepository::All(*m_db);
|
auto tributes = TributesRepository::All(*m_content_db);
|
||||||
for (auto const& t : tributes) {
|
for (auto const& t : tributes) {
|
||||||
td.name = t.name;
|
td.name = t.name;
|
||||||
td.description = t.descr;
|
td.description = t.descr;
|
||||||
@@ -336,7 +336,7 @@ bool WorldGuildManager::LoadTributes()
|
|||||||
|
|
||||||
LogInfo("Loaded [{}] tributes", Strings::Commify(tributes.size()));
|
LogInfo("Loaded [{}] tributes", Strings::Commify(tributes.size()));
|
||||||
|
|
||||||
auto tribute_levels = TributeLevelsRepository::GetWhere(*m_db, "TRUE ORDER BY tribute_id, level");
|
auto tribute_levels = TributeLevelsRepository::GetWhere(*m_content_db, "TRUE ORDER BY tribute_id, level");
|
||||||
|
|
||||||
for (auto const& t : tribute_levels) {
|
for (auto const& t : tribute_levels) {
|
||||||
uint32 id = t.tribute_id;
|
uint32 id = t.tribute_id;
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ bool WorldBoot::DatabaseLoadRoutines(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
guild_mgr.SetDatabase(&database);
|
guild_mgr.SetDatabase(&database)->SetContentDatabase(&content_db);
|
||||||
|
|
||||||
LogInfo("Purging expired data buckets");
|
LogInfo("Purging expired data buckets");
|
||||||
database.PurgeAllDeletedDataBuckets();
|
database.PurgeAllDeletedDataBuckets();
|
||||||
|
|||||||
+1
-1
@@ -318,7 +318,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Guilds */
|
/* Guilds */
|
||||||
guild_mgr.SetDatabase(&database);
|
guild_mgr.SetDatabase(&database)->SetContentDatabase(&content_db);
|
||||||
GuildBanks = nullptr;
|
GuildBanks = nullptr;
|
||||||
|
|
||||||
#ifdef _EQDEBUG
|
#ifdef _EQDEBUG
|
||||||
|
|||||||
+2
-2
@@ -440,14 +440,14 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
|
|||||||
|
|
||||||
std::unordered_map<uint32, uint32> spawn_times;
|
std::unordered_map<uint32, uint32> spawn_times;
|
||||||
|
|
||||||
timeval tv;
|
timeval tv{};
|
||||||
gettimeofday(&tv, nullptr);
|
gettimeofday(&tv, nullptr);
|
||||||
|
|
||||||
/* Bulk Load NPC Types Data into the cache */
|
/* Bulk Load NPC Types Data into the cache */
|
||||||
content_db.LoadNPCTypesData(0, true);
|
content_db.LoadNPCTypesData(0, true);
|
||||||
|
|
||||||
const auto& l = RespawnTimesRepository::GetWhere(
|
const auto& l = RespawnTimesRepository::GetWhere(
|
||||||
*this,
|
database,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"`instance_id` = {}",
|
"`instance_id` = {}",
|
||||||
zone->GetInstanceID()
|
zone->GetInstanceID()
|
||||||
|
|||||||
+9
-7
@@ -1898,6 +1898,10 @@ void Zone::Repop(bool is_forced)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_forced) {
|
||||||
|
ClearSpawnTimers();
|
||||||
|
}
|
||||||
|
|
||||||
LinkedListIterator<Spawn2 *> iterator(spawn2_list);
|
LinkedListIterator<Spawn2 *> iterator(spawn2_list);
|
||||||
|
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
@@ -1905,10 +1909,6 @@ void Zone::Repop(bool is_forced)
|
|||||||
iterator.RemoveCurrent();
|
iterator.RemoveCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_forced) {
|
|
||||||
ClearSpawnTimers();
|
|
||||||
}
|
|
||||||
|
|
||||||
npc_scale_manager->LoadScaleData();
|
npc_scale_manager->LoadScaleData();
|
||||||
|
|
||||||
entity_list.ClearTrapPointers();
|
entity_list.ClearTrapPointers();
|
||||||
@@ -2649,22 +2649,24 @@ void Zone::ClearSpawnTimers()
|
|||||||
|
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
|
|
||||||
std::vector<std::string> respawn_ids;
|
std::vector<uint32> respawn_ids;
|
||||||
|
|
||||||
while (iterator.MoreElements()) {
|
while (iterator.MoreElements()) {
|
||||||
respawn_ids.emplace_back(std::to_string(iterator.GetData()->GetID()));
|
respawn_ids.emplace_back(iterator.GetData()->spawn2_id);
|
||||||
|
|
||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!respawn_ids.empty()) {
|
||||||
RespawnTimesRepository::DeleteWhere(
|
RespawnTimesRepository::DeleteWhere(
|
||||||
database,
|
database,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"`instance_id` = {} AND `id` IN ({})",
|
"`instance_id` = {} AND `id` IN ({})",
|
||||||
GetInstanceID(),
|
GetInstanceID(),
|
||||||
Strings::Implode(", ", respawn_ids)
|
Strings::Join(respawn_ids, ", ")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Zone::GetSpawnKillCount(uint32 in_spawnid) {
|
uint32 Zone::GetSpawnKillCount(uint32 in_spawnid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user