mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Bug Fix] Fix Untrained Disciplines in Client::SaveDisciplines() (#4472)
* [Bug Fix] Fix Untrained Disciplines in Client::SaveDisciplines() * [Bug Fix] Fix Infinite Loop in Adventure::Finished() (#4473) Fix infinite loop condition when bot encountered * [Bug Fix] Fix Untrained Disciplines in Client::SaveDisciplines() * Change to release --------- Co-authored-by: oddx2k <103136558+oddx2k@users.noreply.github.com>
This commit is contained in:
parent
699d22fc28
commit
1af252466f
@ -1,3 +1,10 @@
|
||||
## [22.56.1] 9/13/2024
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix Untrained Disciplines in Client::SaveDisciplines() ([#4472](https://github.com/EQEmu/Server/pull/4472)) @Kinglykrab 2024-09-13
|
||||
* Fix Infinite Loop in Adventure::Finished() ([#4473](https://github.com/EQEmu/Server/pull/4473)) @oddx2k 2024-09-13
|
||||
|
||||
## [22.56.0] 9/12/2024
|
||||
|
||||
### Code
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
// Build variables
|
||||
// these get injected during the build pipeline
|
||||
#define CURRENT_VERSION "22.56.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define CURRENT_VERSION "22.56.1-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__
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eqemu-server",
|
||||
"version": "22.56.0",
|
||||
"version": "22.56.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EQEmu/Server.git"
|
||||
|
||||
@ -11097,7 +11097,9 @@ void Client::SaveDisciplines()
|
||||
{
|
||||
std::vector<CharacterDisciplinesRepository::CharacterDisciplines> v;
|
||||
|
||||
for (int slot_id = 0; slot_id < MAX_PP_DISCIPLINES; slot_id++) {
|
||||
std::vector<std::string> delete_slots;
|
||||
|
||||
for (uint16 slot_id = 0; slot_id < MAX_PP_DISCIPLINES; slot_id++) {
|
||||
if (IsValidSpell(m_pp.disciplines.values[slot_id])) {
|
||||
auto e = CharacterDisciplinesRepository::NewEntity();
|
||||
|
||||
@ -11106,9 +11108,21 @@ void Client::SaveDisciplines()
|
||||
e.disc_id = m_pp.disciplines.values[slot_id];
|
||||
|
||||
v.emplace_back(e);
|
||||
} else {
|
||||
delete_slots.emplace_back(std::to_string(slot_id));
|
||||
}
|
||||
}
|
||||
|
||||
if (!delete_slots.empty()) {
|
||||
CharacterDisciplinesRepository::DeleteWhere(
|
||||
database,
|
||||
fmt::format(
|
||||
"`slot_id` IN ({})",
|
||||
Strings::Join(delete_slots, ", ")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!v.empty()) {
|
||||
CharacterDisciplinesRepository::ReplaceMany(database, v);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user