mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-27 13:02:28 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6927baef7f | |||
| 52d64781b5 | |||
| 0667fe435f | |||
| 9959070f24 |
@@ -1,3 +1,21 @@
|
||||
## [22.29.0] - 10/20/2023
|
||||
|
||||
### Feature
|
||||
|
||||
* Add Expansion and Content Flag support to Blocked Spells ([#3638](https://github.com/EQEmu/Server/pull/3638)) @Kinglykrab 2023-10-20
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix crash when checking Bot Group/Raid membership ([#3641](https://github.com/EQEmu/Server/pull/3641)) @Aeadoin 2023-10-20
|
||||
|
||||
### Perl
|
||||
|
||||
* Static linker fix on Linux ([#3642](https://github.com/EQEmu/Server/pull/3642)) @Akkadius 2023-10-20
|
||||
|
||||
### Rules
|
||||
|
||||
* Add rule to configure max number of procs per round Combat:MaxProcs ([#3640](https://github.com/EQEmu/Server/pull/3640)) @Akkadius 2023-10-20
|
||||
|
||||
## [22.28.1] - 10/20/2023
|
||||
|
||||
### Build
|
||||
|
||||
+7
-1
@@ -23,7 +23,10 @@ IF (EQEMU_BUILD_STATIC)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a")
|
||||
MESSAGE(STATUS "Building with static linking")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
|
||||
ENDIF(EQEMU_BUILD_STATIC)
|
||||
IF (UNIX)
|
||||
SET(PERL_LIBRARY "/usr/lib/x86_64-linux-gnu/libperl.a")
|
||||
ENDIF ()
|
||||
ENDIF (EQEMU_BUILD_STATIC)
|
||||
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
|
||||
@@ -389,6 +392,9 @@ IF(PERL_LIBRARY_ENABLED)
|
||||
ADD_DEFINITIONS(-DEMBPERL)
|
||||
ADD_DEFINITIONS(-DEMBPERL_PLUGIN)
|
||||
ADD_DEFINITIONS(-DPERLBIND_NO_STRICT_SCALAR_TYPES)
|
||||
IF (UNIX AND EQEMU_BUILD_STATIC)
|
||||
SET(SERVER_LIBS ${SERVER_LIBS} libcrypt.a)
|
||||
ENDIF ()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
@@ -4967,6 +4967,20 @@ ALTER TABLE `items`
|
||||
.sql = R"(
|
||||
ALTER TABLE `tradeskill_recipe`
|
||||
ADD COLUMN `learned_by_item_id` int(11) NOT NULL DEFAULT 0 AFTER `must_learn`;
|
||||
)"
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9239,
|
||||
.description = "2023_10_18_blocked_spells_expansions_content_flags.sql",
|
||||
.check = "SHOW COLUMNS FROM `blocked_spells` LIKE 'min_expansion'",
|
||||
.condition = "",
|
||||
.match = "empty",
|
||||
.sql = R"(
|
||||
ALTER TABLE `blocked_spells`
|
||||
ADD COLUMN `min_expansion` tinyint(4) NOT NULL DEFAULT -1 AFTER `description`,
|
||||
ADD COLUMN `max_expansion` tinyint(4) NOT NULL DEFAULT -1 AFTER `min_expansion`,
|
||||
ADD COLUMN `content_flags` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL AFTER `max_expansion`,
|
||||
ADD COLUMN `content_flags_disabled` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL AFTER `content_flags`;
|
||||
)"
|
||||
},
|
||||
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
|
||||
// Build variables
|
||||
// these get injected during the build pipeline
|
||||
#define CURRENT_VERSION "22.28.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define CURRENT_VERSION "22.29.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define LOGIN_VERSION "0.8.0"
|
||||
#define COMPILE_DATE __DATE__
|
||||
#define COMPILE_TIME __TIME__
|
||||
@@ -42,7 +42,7 @@
|
||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9238
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9239
|
||||
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9040
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eqemu-server",
|
||||
"version": "22.28.1",
|
||||
"version": "22.29.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EQEmu/Server.git"
|
||||
|
||||
+4
-2
@@ -3336,7 +3336,8 @@ bool Bot::Spawn(Client* botCharacterOwner) {
|
||||
|
||||
if (auto raid = entity_list.GetRaidByBotName(GetName())) {
|
||||
// Safety Check to confirm we have a valid raid
|
||||
if (!raid->IsRaidMember(GetBotOwner()->GetName())) {
|
||||
auto owner = GetBotOwner();
|
||||
if (owner && !raid->IsRaidMember(owner->GetCleanName())) {
|
||||
Bot::RemoveBotFromRaid(this);
|
||||
} else {
|
||||
SetRaidGrouped(true);
|
||||
@@ -3346,7 +3347,8 @@ bool Bot::Spawn(Client* botCharacterOwner) {
|
||||
}
|
||||
else if (auto group = entity_list.GetGroupByMobName(GetName())) {
|
||||
// Safety Check to confirm we have a valid group
|
||||
if (!group->IsGroupMember(GetBotOwner()->GetName())) {
|
||||
auto owner = GetBotOwner();
|
||||
if (owner && !group->IsGroupMember(owner->GetCleanName())) {
|
||||
Bot::RemoveBotFromGroup(this, group);
|
||||
} else {
|
||||
SetGrouped(true);
|
||||
|
||||
+11
-2
@@ -2197,12 +2197,21 @@ void Zone::LoadZoneBlockedSpells()
|
||||
if (zone_total_blocked_spells > 0) {
|
||||
blocked_spells = new ZoneSpellsBlocked[zone_total_blocked_spells];
|
||||
if (!content_db.LoadBlockedSpells(zone_total_blocked_spells, blocked_spells, GetZoneID())) {
|
||||
LogError(" Failed to load blocked spells");
|
||||
LogError(
|
||||
"Failed to load blocked spells for {} ({}).",
|
||||
zone_store.GetZoneName(GetZoneID(), true),
|
||||
GetZoneID()
|
||||
);
|
||||
ClearBlockedSpells();
|
||||
}
|
||||
}
|
||||
|
||||
LogInfo("Loaded [{}] blocked spells(s)", Strings::Commify(zone_total_blocked_spells));
|
||||
LogInfo(
|
||||
"Loaded [{}] blocked spells(s) for {} ({}).",
|
||||
Strings::Commify(zone_total_blocked_spells),
|
||||
zone_store.GetZoneName(GetZoneID(), true),
|
||||
GetZoneID()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+42
-35
@@ -11,6 +11,7 @@
|
||||
#include "zone.h"
|
||||
#include "zonedb.h"
|
||||
#include "aura.h"
|
||||
#include "../common/repositories/blocked_spells_repository.h"
|
||||
#include "../common/repositories/character_tribute_repository.h"
|
||||
#include "../common/repositories/character_disciplines_repository.h"
|
||||
#include "../common/repositories/npc_types_repository.h"
|
||||
@@ -19,6 +20,7 @@
|
||||
#include "../common/repositories/character_pet_inventory_repository.h"
|
||||
#include "../common/repositories/character_pet_info_repository.h"
|
||||
#include "../common/repositories/character_buffs_repository.h"
|
||||
#include "../common/repositories/criteria/content_filter_criteria.h"
|
||||
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
@@ -2845,50 +2847,55 @@ uint8 ZoneDatabase::RaidGroupCount(uint32 raidid, uint32 groupid) {
|
||||
return Strings::ToInt(row[0]);
|
||||
}
|
||||
|
||||
int32 ZoneDatabase::GetBlockedSpellsCount(uint32 zoneid)
|
||||
int64 ZoneDatabase::GetBlockedSpellsCount(uint32 zone_id)
|
||||
{
|
||||
std::string query = StringFormat("SELECT count(*) FROM blocked_spells WHERE zoneid = %d", zoneid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (results.RowCount() == 0)
|
||||
return -1;
|
||||
|
||||
auto& row = results.begin();
|
||||
|
||||
return Strings::ToInt(row[0]);
|
||||
return BlockedSpellsRepository::Count(
|
||||
database,
|
||||
fmt::format(
|
||||
"zoneid = {} {}",
|
||||
zone_id,
|
||||
ContentFilterCriteria::apply()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadBlockedSpells(int32 blockedSpellsCount, ZoneSpellsBlocked* into, uint32 zoneid)
|
||||
bool ZoneDatabase::LoadBlockedSpells(int64 blocked_spells_count, ZoneSpellsBlocked* into, uint32 zone_id)
|
||||
{
|
||||
LogInfo("Loading Blocked Spells from database");
|
||||
LogInfo("Loading Blocked Spells from database for {} ({}).", zone_store.GetZoneName(zone_id, true), zone_id);
|
||||
|
||||
std::string query = StringFormat("SELECT id, spellid, type, x, y, z, x_diff, y_diff, z_diff, message "
|
||||
"FROM blocked_spells WHERE zoneid = %d ORDER BY id ASC", zoneid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return false;
|
||||
}
|
||||
const auto& l = BlockedSpellsRepository::GetWhere(
|
||||
database,
|
||||
fmt::format(
|
||||
"zoneid = {} {} ORDER BY id ASC",
|
||||
zone_id,
|
||||
ContentFilterCriteria::apply()
|
||||
)
|
||||
);
|
||||
|
||||
if (results.RowCount() == 0)
|
||||
if (l.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int32 index = 0;
|
||||
for(auto& row = results.begin(); row != results.end(); ++row, ++index) {
|
||||
if(index >= blockedSpellsCount) {
|
||||
std::cerr << "Error, Blocked Spells Count of " << blockedSpellsCount << " exceeded." << std::endl;
|
||||
break;
|
||||
}
|
||||
int64 i = 0;
|
||||
|
||||
memset(&into[index], 0, sizeof(ZoneSpellsBlocked));
|
||||
into[index].spellid = Strings::ToInt(row[1]);
|
||||
into[index].type = Strings::ToInt(row[2]);
|
||||
into[index].m_Location = glm::vec3(Strings::ToFloat(row[3]), Strings::ToFloat(row[4]), Strings::ToFloat(row[5]));
|
||||
into[index].m_Difference = glm::vec3(Strings::ToFloat(row[6]), Strings::ToFloat(row[7]), Strings::ToFloat(row[8]));
|
||||
strn0cpy(into[index].message, row[9], 255);
|
||||
}
|
||||
for (const auto& e : l) {
|
||||
if (i >= blocked_spells_count) {
|
||||
LogError(
|
||||
"Blocked spells count of {} exceeded for {} ({}).",
|
||||
blocked_spells_count,
|
||||
zone_store.GetZoneName(zone_id, true),
|
||||
zone_id
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
memset(&into[i], 0, sizeof(ZoneSpellsBlocked));
|
||||
into[i].spellid = e.spellid;
|
||||
into[i].type = e.type;
|
||||
into[i].m_Location = glm::vec3(e.x, e.y, e.z);
|
||||
into[i].m_Difference = glm::vec3(e.x_diff, e.y_diff, e.z_diff);
|
||||
strn0cpy(into[i].message, e.message.c_str(), sizeof(into[i].message));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -619,8 +619,8 @@ public:
|
||||
int GetDoorsDBCountPlusOne(std::string zone_short_name, int16 version);
|
||||
|
||||
/* Blocked Spells */
|
||||
int32 GetBlockedSpellsCount(uint32 zoneid);
|
||||
bool LoadBlockedSpells(int32 blockedSpellsCount, ZoneSpellsBlocked* into, uint32 zoneid);
|
||||
int64 GetBlockedSpellsCount(uint32 zone_id);
|
||||
bool LoadBlockedSpells(int64 blocked_spells_count, ZoneSpellsBlocked* into, uint32 zone_id);
|
||||
|
||||
/* Traps */
|
||||
bool LoadTraps(const char* zonename, int16 version);
|
||||
|
||||
Reference in New Issue
Block a user