mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 18:47:35 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9477ff72ac | |||
| 6d8e80b1e5 | |||
| ebeaef598b | |||
| 60b65da7f2 | |||
| 100e6698ea | |||
| 2bd94ab7a2 |
@@ -1,3 +1,23 @@
|
|||||||
|
## [22.34.2] - 11/23/2023
|
||||||
|
|
||||||
|
### Admin
|
||||||
|
|
||||||
|
* Update date in changelog ([#3698](https://github.com/EQEmu/Server/pull/3698)) @joligario 2023-11-19
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
* Fix typo in #giveitem ([#3704](https://github.com/EQEmu/Server/pull/3704)) @Kinglykrab 2023-11-22
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Add "IgnoreLevelBasedHasteCaps" rule to GetHaste() ([#3705](https://github.com/EQEmu/Server/pull/3705)) @jcr4990 2023-11-23
|
||||||
|
* Fix bots/Mercenaries being removed from hatelist ([#3708](https://github.com/EQEmu/Server/pull/3708)) @Kinglykrab 2023-11-23
|
||||||
|
* Fix some spell types failing IsValidSpellRange check ([#3707](https://github.com/EQEmu/Server/pull/3707)) @nytmyr 2023-11-23
|
||||||
|
|
||||||
|
### Loginserver
|
||||||
|
|
||||||
|
* Update ticket login table structure ([#3703](https://github.com/EQEmu/Server/pull/3703)) @KimLS 2023-11-22
|
||||||
|
|
||||||
## [22.34.1] - 11/20/2023
|
## [22.34.1] - 11/20/2023
|
||||||
|
|
||||||
### EQTime
|
### EQTime
|
||||||
|
|||||||
+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.34.1-dev" // always append -dev to the current version for custom-builds
|
#define CURRENT_VERSION "22.34.2-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__
|
||||||
|
|||||||
@@ -121,43 +121,25 @@ bool Database::GetLoginTokenDataFromToken(
|
|||||||
std::string &user
|
std::string &user
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
auto query = fmt::format(
|
auto query = fmt::format("SELECT login_server, username, account_id FROM login_tickets WHERE expires > NOW()"
|
||||||
"SELECT tbllogintokens.Id, tbllogintokens.IpAddress, tbllogintokenclaims.Name, tbllogintokenclaims.Value FROM tbllogintokens "
|
" AND id='{0}' AND ip_address='{1}' LIMIT 1",
|
||||||
"JOIN tbllogintokenclaims ON tbllogintokens.Id = tbllogintokenclaims.TokenId WHERE tbllogintokens.Expires > NOW() "
|
|
||||||
"AND tbllogintokens.Id='{0}' AND tbllogintokens.IpAddress='{1}'",
|
|
||||||
Strings::Escape(token),
|
Strings::Escape(token),
|
||||||
Strings::Escape(ip)
|
Strings::Escape(ip));
|
||||||
);
|
|
||||||
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (results.RowCount() == 0 || !results.Success()) {
|
if (results.RowCount() == 0 || !results.Success()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool found_username = false;
|
|
||||||
bool found_login_id = false;
|
|
||||||
bool found_login_server_name = false;
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
if (strcmp(row[2], "username") == 0) {
|
db_loginserver = row[0];
|
||||||
user = row[3];
|
user = row[1];
|
||||||
found_username = true;
|
db_account_id = Strings::ToUnsignedInt(row[2]);
|
||||||
continue;
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(row[2], "login_server_id") == 0) {
|
return false;
|
||||||
db_account_id = Strings::ToUnsignedInt(row[3]);
|
|
||||||
found_login_id = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(row[2], "login_server_name") == 0) {
|
|
||||||
db_loginserver = row[3];
|
|
||||||
found_login_server_name = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return found_username && found_login_id && found_login_server_name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
DROP TABLE IF EXISTS `login_tickets`;
|
||||||
|
CREATE TABLE `login_tickets` (
|
||||||
|
`id` VARCHAR(128) NOT NULL,
|
||||||
|
`login_server` TEXT NOT NULL,
|
||||||
|
`username` TEXT NOT NULL,
|
||||||
|
`account_id` INT(10) UNSIGNED NOT NULL,
|
||||||
|
`ip_address` VARCHAR(45) NOT NULL,
|
||||||
|
`expires` DATETIME NOT NULL,
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB;
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eqemu-server",
|
"name": "eqemu-server",
|
||||||
"version": "22.34.1",
|
"version": "22.34.2",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EQEmu/Server.git"
|
"url": "https://github.com/EQEmu/Server.git"
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ bool Bot::BotCastHateReduction(Mob* tar, uint8 botLevel, const BotSpell& botSpel
|
|||||||
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
if (IsValidSpellRange(iter.SpellId, tar)) {
|
||||||
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
||||||
}
|
}
|
||||||
if (casted_spell) {
|
if (casted_spell) {
|
||||||
@@ -328,7 +328,7 @@ bool Bot::BotCastSlow(Mob* tar, uint8 botLevel, uint8 botClass, BotSpell& botSpe
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
if (IsValidSpellRange(iter.SpellId, tar)) {
|
||||||
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
casted_spell = AIDoSpellCast(iter.SpellIndex, tar, iter.ManaCost);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@ bool Bot::BotCastDOT(Mob* tar, uint8 botLevel, const BotSpell& botSpell, const b
|
|||||||
|
|
||||||
uint32 TempDontDotMeBefore = tar->DontDotMeBefore();
|
uint32 TempDontDotMeBefore = tar->DontDotMeBefore();
|
||||||
|
|
||||||
if (IsValidSpellRange(botSpell.SpellId, tar)) {
|
if (IsValidSpellRange(s.SpellId, tar)) {
|
||||||
casted_spell = AIDoSpellCast(s.SpellIndex, tar, s.ManaCost, &TempDontDotMeBefore);
|
casted_spell = AIDoSpellCast(s.SpellIndex, tar, s.ManaCost, &TempDontDotMeBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
void command_giveitem(Client *c, const Seperator *sep)
|
void command_giveitem(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (!c->GetTarget() || !!c->GetTarget()->IsClient()) {
|
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
|
||||||
c->Message(Chat::White, "You must target a player to use this command.");
|
c->Message(Chat::White, "You must target a player to use this command.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-1
@@ -46,7 +46,14 @@ void HateList::WipeHateList(bool npc_only) {
|
|||||||
auto iterator = list.begin();
|
auto iterator = list.begin();
|
||||||
while (iterator != list.end()) {
|
while (iterator != list.end()) {
|
||||||
Mob *m = (*iterator)->entity_on_hatelist;
|
Mob *m = (*iterator)->entity_on_hatelist;
|
||||||
if (m && (m->IsClient() || (m->IsPet() && m->GetOwner()->IsClient())) && npc_only) {
|
if (
|
||||||
|
m &&
|
||||||
|
(
|
||||||
|
m->IsOfClientBotMerc() ||
|
||||||
|
(m->IsPet() && m->GetOwner() && m->GetOwner()->IsOfClientBotMerc())
|
||||||
|
) &&
|
||||||
|
npc_only
|
||||||
|
) {
|
||||||
iterator++;
|
iterator++;
|
||||||
} else {
|
} else {
|
||||||
if (m) {
|
if (m) {
|
||||||
@@ -58,6 +65,7 @@ void HateList::WipeHateList(bool npc_only) {
|
|||||||
m->CastToClient()->DecrementAggroCount();
|
m->CastToClient()->DecrementAggroCount();
|
||||||
m->CastToClient()->RemoveXTarget(hate_owner, true);
|
m->CastToClient()->RemoveXTarget(hate_owner, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete (*iterator);
|
delete (*iterator);
|
||||||
iterator = list.erase(iterator);
|
iterator = list.erase(iterator);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -5315,7 +5315,7 @@ int Mob::GetHaste()
|
|||||||
h += spellbonuses.hastetype2 > 10 ? 10 : spellbonuses.hastetype2;
|
h += spellbonuses.hastetype2 > 10 ? 10 : spellbonuses.hastetype2;
|
||||||
|
|
||||||
// 26+ no cap, 1-25 10
|
// 26+ no cap, 1-25 10
|
||||||
if (level > 25) // 26+
|
if (level > 25 || (IsClient() && RuleB(Character, IgnoreLevelBasedHasteCaps))) // 26+
|
||||||
h += itembonuses.haste;
|
h += itembonuses.haste;
|
||||||
else // 1-25
|
else // 1-25
|
||||||
h += itembonuses.haste > 10 ? 10 : itembonuses.haste;
|
h += itembonuses.haste > 10 ? 10 : itembonuses.haste;
|
||||||
@@ -5337,7 +5337,7 @@ int Mob::GetHaste()
|
|||||||
h = cap;
|
h = cap;
|
||||||
|
|
||||||
// 51+ 25 (despite there being higher spells...), 1-50 10
|
// 51+ 25 (despite there being higher spells...), 1-50 10
|
||||||
if (level > 50) { // 51+
|
if (level > 50 || (IsClient() && RuleB(Character, IgnoreLevelBasedHasteCaps))) { // 51+
|
||||||
cap = RuleI(Character, Hastev3Cap);
|
cap = RuleI(Character, Hastev3Cap);
|
||||||
if (spellbonuses.hastetype3 > cap) {
|
if (spellbonuses.hastetype3 > cap) {
|
||||||
h += cap;
|
h += cap;
|
||||||
|
|||||||
Reference in New Issue
Block a user