mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 06:18:21 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c0bdfdc4c | |||
| 6130e10831 | |||
| c3e1c531d2 | |||
| b52719a535 | |||
| 1af252466f | |||
| 699d22fc28 | |||
| 5d1fe68906 | |||
| 52dcf35425 |
@@ -1,3 +1,26 @@
|
|||||||
|
## [22.56.3] 9/23/2024
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Fix issue with Client::SaveDisciplines() not specifying character ID ([#4481](https://github.com/EQEmu/Server/pull/4477)) @Kinglykrab 2024-09-23
|
||||||
|
|
||||||
|
## [22.56.2] 9/20/2024
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Fix Issue with Database::ReserveName ([#4477](https://github.com/EQEmu/Server/pull/4477)) @Kinglykrab 2024-09-20
|
||||||
|
|
||||||
|
### Quest API
|
||||||
|
|
||||||
|
* Add GrantAllAAPoints() Overload To Perl/Lua ([#4474](https://github.com/EQEmu/Server/pull/4474)) @Kinglykrab 2024-09-20
|
||||||
|
|
||||||
|
## [22.56.1] 9/20/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
|
## [22.56.0] 9/12/2024
|
||||||
|
|
||||||
### Code
|
### Code
|
||||||
|
|||||||
+21
-6
@@ -285,16 +285,31 @@ bool Database::SetAccountStatus(const std::string& account_name, int16 status)
|
|||||||
|
|
||||||
bool Database::ReserveName(uint32 account_id, const std::string& name)
|
bool Database::ReserveName(uint32 account_id, const std::string& name)
|
||||||
{
|
{
|
||||||
const auto& l = CharacterDataRepository::GetWhere(
|
const std::string& where_filter = fmt::format(
|
||||||
*this,
|
|
||||||
fmt::format(
|
|
||||||
"`name` = '{}'",
|
"`name` = '{}'",
|
||||||
Strings::Escape(name)
|
Strings::Escape(name)
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!l.empty()) {
|
if (RuleB(Bots, Enabled)) {
|
||||||
LogInfo("Account: [{}] tried to request name: [{}], but it is already taken", account_id, name);
|
const auto& b = BotDataRepository::GetWhere(*this, where_filter);
|
||||||
|
|
||||||
|
if (!b.empty()) {
|
||||||
|
LogInfo("Account [{}] requested name [{}] but name is already taken by a bot", account_id, name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto& c = CharacterDataRepository::GetWhere(*this, where_filter);
|
||||||
|
|
||||||
|
if (!c.empty()) {
|
||||||
|
LogInfo("Account [{}] requested name [{}] but name is already taken by a character", account_id, name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto& n = NpcTypesRepository::GetWhere(*this, where_filter);
|
||||||
|
|
||||||
|
if (!n.empty()) {
|
||||||
|
LogInfo("Account [{}] requested name [{}] but name is already taken by an NPC", account_id, name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+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.56.0-dev" // always append -dev to the current version for custom-builds
|
#define CURRENT_VERSION "22.56.3-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.56.0",
|
"version": "22.56.3",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EQEmu/Server.git"
|
"url": "https://github.com/EQEmu/Server.git"
|
||||||
|
|||||||
@@ -287,6 +287,7 @@ void Adventure::Finished(AdventureWinStatus ws)
|
|||||||
auto character_id = database.GetCharacterID(*iter);
|
auto character_id = database.GetCharacterID(*iter);
|
||||||
|
|
||||||
if (character_id == 0) {
|
if (character_id == 0) {
|
||||||
|
++iter;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -2185,7 +2185,7 @@ void Client::AutoGrantAAPoints() {
|
|||||||
SendAlternateAdvancementStats();
|
SendAlternateAdvancementStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::GrantAllAAPoints(uint8 unlock_level)
|
void Client::GrantAllAAPoints(uint8 unlock_level, bool skip_grant_only)
|
||||||
{
|
{
|
||||||
//iterate through every AA
|
//iterate through every AA
|
||||||
for (auto& aa : zone->aa_abilities) {
|
for (auto& aa : zone->aa_abilities) {
|
||||||
@@ -2195,6 +2195,10 @@ void Client::GrantAllAAPoints(uint8 unlock_level)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ability->grant_only && skip_grant_only) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const uint8 level = unlock_level ? unlock_level : GetLevel();
|
const uint8 level = unlock_level ? unlock_level : GetLevel();
|
||||||
|
|
||||||
AA::Rank* rank = ability->first;
|
AA::Rank* rank = ability->first;
|
||||||
|
|||||||
+16
-1
@@ -11097,7 +11097,9 @@ void Client::SaveDisciplines()
|
|||||||
{
|
{
|
||||||
std::vector<CharacterDisciplinesRepository::CharacterDisciplines> v;
|
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])) {
|
if (IsValidSpell(m_pp.disciplines.values[slot_id])) {
|
||||||
auto e = CharacterDisciplinesRepository::NewEntity();
|
auto e = CharacterDisciplinesRepository::NewEntity();
|
||||||
|
|
||||||
@@ -11106,9 +11108,22 @@ void Client::SaveDisciplines()
|
|||||||
e.disc_id = m_pp.disciplines.values[slot_id];
|
e.disc_id = m_pp.disciplines.values[slot_id];
|
||||||
|
|
||||||
v.emplace_back(e);
|
v.emplace_back(e);
|
||||||
|
} else {
|
||||||
|
delete_slots.emplace_back(std::to_string(slot_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!delete_slots.empty()) {
|
||||||
|
CharacterDisciplinesRepository::DeleteWhere(
|
||||||
|
database,
|
||||||
|
fmt::format(
|
||||||
|
"`id` = {} AND `slot_id` IN ({})",
|
||||||
|
CharacterID(),
|
||||||
|
Strings::Join(delete_slots, ", ")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!v.empty()) {
|
if (!v.empty()) {
|
||||||
CharacterDisciplinesRepository::ReplaceMany(database, v);
|
CharacterDisciplinesRepository::ReplaceMany(database, v);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1025,7 +1025,7 @@ public:
|
|||||||
int GetSpentAA() { return m_pp.aapoints_spent; }
|
int GetSpentAA() { return m_pp.aapoints_spent; }
|
||||||
uint32 GetRequiredAAExperience();
|
uint32 GetRequiredAAExperience();
|
||||||
void AutoGrantAAPoints();
|
void AutoGrantAAPoints();
|
||||||
void GrantAllAAPoints(uint8 unlock_level = 0);
|
void GrantAllAAPoints(uint8 unlock_level = 0, bool skip_grant_only = false);
|
||||||
bool HasAlreadyPurchasedRank(AA::Rank* rank);
|
bool HasAlreadyPurchasedRank(AA::Rank* rank);
|
||||||
void ListPurchasedAAs(Client *to, std::string search_criteria = std::string());
|
void ListPurchasedAAs(Client *to, std::string search_criteria = std::string());
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -542,8 +542,8 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
|
|||||||
if (EQ::ValueWithin(m_open_type, 57, 58) && HasDestinationZone()) {
|
if (EQ::ValueWithin(m_open_type, 57, 58) && HasDestinationZone()) {
|
||||||
bool has_key_required = (required_key_item && required_key_item == player_key);
|
bool has_key_required = (required_key_item && required_key_item == player_key);
|
||||||
|
|
||||||
if (sender->GetGM() && has_key_required) {
|
if (sender->GetGM() && !has_key_required) {
|
||||||
has_key_required = false;
|
has_key_required = true;
|
||||||
sender->Message(Chat::White, "Your GM flag allows you to open this door without a key.");
|
sender->Message(Chat::White, "Your GM flag allows you to open this door without a key.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,15 @@ void command_grantaa(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const uint8 unlock_level = sep->IsNumber(1) ? static_cast<uint8>(Strings::ToUnsignedInt(sep->arg[1])) : 0;
|
const uint8 unlock_level = sep->IsNumber(1) ? static_cast<uint8>(Strings::ToUnsignedInt(sep->arg[1])) : 0;
|
||||||
|
const bool skip_grant_only = sep->IsNumber(2) ? Strings::ToBool(sep->arg[2]) : false;
|
||||||
|
|
||||||
auto t = c->GetTarget()->CastToClient();
|
auto t = c->GetTarget()->CastToClient();
|
||||||
t->GrantAllAAPoints(unlock_level);
|
t->GrantAllAAPoints(unlock_level, skip_grant_only);
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Successfully granted all Alternate Advancements for {}{}.",
|
"Successfully granted all Alternate Advancements for {}{}{}.",
|
||||||
c->GetTargetDescription(t),
|
c->GetTargetDescription(t),
|
||||||
(
|
(
|
||||||
unlock_level ?
|
unlock_level ?
|
||||||
@@ -24,7 +25,8 @@ void command_grantaa(Client *c, const Seperator *sep)
|
|||||||
unlock_level
|
unlock_level
|
||||||
) :
|
) :
|
||||||
""
|
""
|
||||||
)
|
),
|
||||||
|
skip_grant_only ? "except for grant only AAs" : ""
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3216,6 +3216,12 @@ void Lua_Client::GrantAllAAPoints(uint8 unlock_level)
|
|||||||
self->GrantAllAAPoints(unlock_level);
|
self->GrantAllAAPoints(unlock_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Lua_Client::GrantAllAAPoints(uint8 unlock_level, bool skip_grant_only)
|
||||||
|
{
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->GrantAllAAPoints(unlock_level, skip_grant_only);
|
||||||
|
}
|
||||||
|
|
||||||
void Lua_Client::AddEbonCrystals(uint32 amount)
|
void Lua_Client::AddEbonCrystals(uint32 amount)
|
||||||
{
|
{
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
@@ -3699,6 +3705,7 @@ luabind::scope lua_register_client() {
|
|||||||
.def("GoFish", (void(Lua_Client::*)(void))&Lua_Client::GoFish)
|
.def("GoFish", (void(Lua_Client::*)(void))&Lua_Client::GoFish)
|
||||||
.def("GrantAllAAPoints", (void(Lua_Client::*)(void))&Lua_Client::GrantAllAAPoints)
|
.def("GrantAllAAPoints", (void(Lua_Client::*)(void))&Lua_Client::GrantAllAAPoints)
|
||||||
.def("GrantAllAAPoints", (void(Lua_Client::*)(uint8))&Lua_Client::GrantAllAAPoints)
|
.def("GrantAllAAPoints", (void(Lua_Client::*)(uint8))&Lua_Client::GrantAllAAPoints)
|
||||||
|
.def("GrantAllAAPoints", (void(Lua_Client::*)(uint8,bool))&Lua_Client::GrantAllAAPoints)
|
||||||
.def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int))&Lua_Client::GrantAlternateAdvancementAbility)
|
.def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int))&Lua_Client::GrantAlternateAdvancementAbility)
|
||||||
.def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int, bool))&Lua_Client::GrantAlternateAdvancementAbility)
|
.def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int, bool))&Lua_Client::GrantAlternateAdvancementAbility)
|
||||||
.def("GuildID", (uint32(Lua_Client::*)(void))&Lua_Client::GuildID)
|
.def("GuildID", (uint32(Lua_Client::*)(void))&Lua_Client::GuildID)
|
||||||
|
|||||||
@@ -487,6 +487,7 @@ public:
|
|||||||
void SetBucket(std::string bucket_name, std::string bucket_value, std::string expiration);
|
void SetBucket(std::string bucket_name, std::string bucket_value, std::string expiration);
|
||||||
void GrantAllAAPoints();
|
void GrantAllAAPoints();
|
||||||
void GrantAllAAPoints(uint8 unlock_level);
|
void GrantAllAAPoints(uint8 unlock_level);
|
||||||
|
void GrantAllAAPoints(uint8 unlock_level, bool skip_grant_only);
|
||||||
void AddEbonCrystals(uint32 amount);
|
void AddEbonCrystals(uint32 amount);
|
||||||
void AddRadiantCrystals(uint32 amount);
|
void AddRadiantCrystals(uint32 amount);
|
||||||
void RemoveEbonCrystals(uint32 amount);
|
void RemoveEbonCrystals(uint32 amount);
|
||||||
|
|||||||
@@ -3031,6 +3031,11 @@ void Perl_Client_GrantAllAAPoints(Client* self, uint8 unlock_level)
|
|||||||
self->GrantAllAAPoints(unlock_level);
|
self->GrantAllAAPoints(unlock_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Perl_Client_GrantAllAAPoints(Client* self, uint8 unlock_level, bool skip_grant_only)
|
||||||
|
{
|
||||||
|
self->GrantAllAAPoints(unlock_level, skip_grant_only);
|
||||||
|
}
|
||||||
|
|
||||||
void Perl_Client_AddEbonCrystals(Client* self, uint32 amount)
|
void Perl_Client_AddEbonCrystals(Client* self, uint32 amount)
|
||||||
{
|
{
|
||||||
self->AddEbonCrystals(amount);
|
self->AddEbonCrystals(amount);
|
||||||
@@ -3471,6 +3476,7 @@ void perl_register_client()
|
|||||||
package.add("GoFish", &Perl_Client_GoFish);
|
package.add("GoFish", &Perl_Client_GoFish);
|
||||||
package.add("GrantAllAAPoints", (void(*)(Client*))&Perl_Client_GrantAllAAPoints);
|
package.add("GrantAllAAPoints", (void(*)(Client*))&Perl_Client_GrantAllAAPoints);
|
||||||
package.add("GrantAllAAPoints", (void(*)(Client*, uint8))&Perl_Client_GrantAllAAPoints);
|
package.add("GrantAllAAPoints", (void(*)(Client*, uint8))&Perl_Client_GrantAllAAPoints);
|
||||||
|
package.add("GrantAllAAPoints", (void(*)(Client*, uint8, bool))&Perl_Client_GrantAllAAPoints);
|
||||||
package.add("GrantAlternateAdvancementAbility", (bool(*)(Client*, int, int))&Perl_Client_GrantAlternateAdvancementAbility);
|
package.add("GrantAlternateAdvancementAbility", (bool(*)(Client*, int, int))&Perl_Client_GrantAlternateAdvancementAbility);
|
||||||
package.add("GrantAlternateAdvancementAbility", (bool(*)(Client*, int, int, bool))&Perl_Client_GrantAlternateAdvancementAbility);
|
package.add("GrantAlternateAdvancementAbility", (bool(*)(Client*, int, int, bool))&Perl_Client_GrantAlternateAdvancementAbility);
|
||||||
package.add("GuildID", &Perl_Client_GuildID);
|
package.add("GuildID", &Perl_Client_GuildID);
|
||||||
|
|||||||
+1
-1
@@ -3495,7 +3495,7 @@ void Client::BuyTraderItemOutsideBazaar(TraderBuy_Struct *tbs, const EQApplicati
|
|||||||
ps.item_slot = parcel_out.slot_id;
|
ps.item_slot = parcel_out.slot_id;
|
||||||
strn0cpy(ps.send_to, GetCleanName(), sizeof(ps.send_to));
|
strn0cpy(ps.send_to, GetCleanName(), sizeof(ps.send_to));
|
||||||
|
|
||||||
if (trader_item.item_charges == tbs->quantity) {
|
if (trader_item.item_charges <= static_cast<int32>(tbs->quantity)) {
|
||||||
TraderRepository::DeleteOne(database, trader_item.id);
|
TraderRepository::DeleteOne(database, trader_item.id);
|
||||||
} else {
|
} else {
|
||||||
TraderRepository::UpdateQuantity(
|
TraderRepository::UpdateQuantity(
|
||||||
|
|||||||
Reference in New Issue
Block a user