mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-25 15:12:28 +00:00
Compare commits
13 Commits
multiquest
...
v22.49.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2538ee7976 | |||
| a7bfc5ec92 | |||
| d7d99152ac | |||
| 0d09edf9aa | |||
| 0a3f1d3c41 | |||
| ac12ba153e | |||
| 989d199908 | |||
| 1bc1f71254 | |||
| 41c5369c18 | |||
| d6b5a9d343 | |||
| a5e8a4c2cd | |||
| 9a09d820a5 | |||
| b1d873d1fc |
@@ -1,3 +1,96 @@
|
||||
## [22.49.0] 4/15/2024
|
||||
|
||||
### Code
|
||||
|
||||
* Avoid unnecessary copies in database functions ([#4220](https://github.com/EQEmu/Server/pull/4220)) @joligario 2024-03-29
|
||||
* Reference type in `GetRaidLeaderName` ([#4218](https://github.com/EQEmu/Server/pull/4218)) @joligario 2024-03-28
|
||||
* Remove unnecessary reference types ([#4212](https://github.com/EQEmu/Server/pull/4212)) @joligario 2024-03-28
|
||||
|
||||
### Crash
|
||||
|
||||
* Check mob pointer before trying to remove it ([#4230](https://github.com/EQEmu/Server/pull/4230)) @Akkadius 2024-04-01
|
||||
|
||||
### Feature
|
||||
|
||||
* Add Character Auto Login ([#4216](https://github.com/EQEmu/Server/pull/4216)) @Kinglykrab 2024-04-15
|
||||
* Add LuaMod functions for CommonDamage and HealDamage ([#4227](https://github.com/EQEmu/Server/pull/4227)) @xackery 2024-03-31
|
||||
* Add RegisterBug LuaMod ([#4209](https://github.com/EQEmu/Server/pull/4209)) @xackery 2024-03-30
|
||||
* Additive Spell Focus from Worn slot with Limit Checks ([#4208](https://github.com/EQEmu/Server/pull/4208)) @KayenEQ 2024-03-30
|
||||
* Fix ignore_default on lua mod damage ([#4228](https://github.com/EQEmu/Server/pull/4228)) @xackery 2024-04-15
|
||||
|
||||
### Fixes
|
||||
|
||||
* Client not updating HP bar when an HP Buff with a Heal is applied. ([#4237](https://github.com/EQEmu/Server/pull/4237)) @KayenEQ 2024-04-02
|
||||
* Fix Account Flags Loading ([#4243](https://github.com/EQEmu/Server/pull/4243)) @Kinglykrab 2024-04-15
|
||||
* Fix Auto Login Issue ([#4213](https://github.com/EQEmu/Server/pull/4213)) @Kinglykrab 2024-03-28
|
||||
* Fix Bot Creation Issue ([#4235](https://github.com/EQEmu/Server/pull/4235)) @Kinglykrab 2024-04-02
|
||||
* Fix Bot/Character ID Overlap in Groups ([#4093](https://github.com/EQEmu/Server/pull/4093)) @Kinglykrab 2024-03-23
|
||||
* Fix Group Leadership ([#4214](https://github.com/EQEmu/Server/pull/4214)) @Kinglykrab 2024-03-28
|
||||
* Fix Issue With Bot Raid Aggro ([#4222](https://github.com/EQEmu/Server/pull/4222)) @Kinglykrab 2024-03-31
|
||||
* Fix Lua Crash with Spell Blocked Event ([#4236](https://github.com/EQEmu/Server/pull/4236)) @Kinglykrab 2024-04-01
|
||||
* Fix Luabind Double Class Register ([#4219](https://github.com/EQEmu/Server/pull/4219)) @Kinglykrab 2024-03-29
|
||||
* Fix crash in SendEnterWorld ([#4204](https://github.com/EQEmu/Server/pull/4204)) @Akkadius 2024-03-24
|
||||
* Fix event_consider any_cast error ([#4210](https://github.com/EQEmu/Server/pull/4210)) @xackery 2024-03-27
|
||||
* Fix fishing chances ([#4203](https://github.com/EQEmu/Server/pull/4203)) @joligario 2024-03-24
|
||||
* Fix manifest for skill caps schema type ([#4231](https://github.com/EQEmu/Server/pull/4231)) @Akkadius 2024-04-02
|
||||
* Hero forge armor bug on login and show helm toggle. ([#4246](https://github.com/EQEmu/Server/pull/4246)) @noudess 2024-04-15
|
||||
* Radiant/Ebon Crystals should only extract to 1000 ([#4195](https://github.com/EQEmu/Server/pull/4195)) @fryguy503 2024-03-23
|
||||
* SPA214 SE_MaxHPChange calculation errors corrected. ([#4238](https://github.com/EQEmu/Server/pull/4238)) @KayenEQ 2024-04-02
|
||||
* Shared Tasks - charid is now character_id ([#4233](https://github.com/EQEmu/Server/pull/4233)) @fryguy503 2024-04-01
|
||||
* Using %T in channel messages on fresh corpse yields mob, not corpse name. ([#4168](https://github.com/EQEmu/Server/pull/4168)) @noudess 2024-04-05
|
||||
|
||||
### Hot Fix
|
||||
|
||||
* Fix Group::AddToGroup ([#4201](https://github.com/EQEmu/Server/pull/4201)) @Kinglykrab 2024-03-23
|
||||
* Hot Fix for Group::AddToGroup Hot Fix ([#4202](https://github.com/EQEmu/Server/pull/4202)) @Kinglykrab 2024-03-23
|
||||
|
||||
### Loot
|
||||
|
||||
* Add content filtering to lootdrop_entries ([#4229](https://github.com/EQEmu/Server/pull/4229)) @Akkadius 2024-04-15
|
||||
|
||||
### Lua
|
||||
|
||||
* Add Zone and Language Constants ([#4211](https://github.com/EQEmu/Server/pull/4211)) @fryguy503 2024-03-28
|
||||
|
||||
### Messages
|
||||
|
||||
* Fix bug where DoT messages stop coming out when mob dies. ([#4249](https://github.com/EQEmu/Server/pull/4249)) @noudess 2024-04-15
|
||||
|
||||
### Performance
|
||||
|
||||
* Change skill_cap from vector to map ([#4252](https://github.com/EQEmu/Server/pull/4252)) @xackery 2024-04-15
|
||||
|
||||
### Pets
|
||||
|
||||
* Fix errors in sync with client of sit/stand ([#4245](https://github.com/EQEmu/Server/pull/4245)) @noudess 2024-04-15
|
||||
|
||||
### Quest API
|
||||
|
||||
* Add Archetype Methods to Perl/Lua ([#4181](https://github.com/EQEmu/Server/pull/4181)) @Kinglykrab 2024-03-23
|
||||
* Add Class/Deity/Race Methods to Perl/Lua ([#4215](https://github.com/EQEmu/Server/pull/4215)) @Kinglykrab 2024-03-28
|
||||
* Add GetConsiderColor() to Perl/Lua ([#4253](https://github.com/EQEmu/Server/pull/4253)) @Kinglykrab 2024-04-15
|
||||
* Add Spell Blocked Event to Perl/Lua ([#4217](https://github.com/EQEmu/Server/pull/4217)) @Kinglykrab 2024-04-01
|
||||
|
||||
### Quests
|
||||
|
||||
* Avoid Player and Bot quests in unloaded zone ([#4232](https://github.com/EQEmu/Server/pull/4232)) @hgtw 2024-04-01
|
||||
|
||||
### Repositories
|
||||
|
||||
* Convert database.cpp to Repositories ([#4054](https://github.com/EQEmu/Server/pull/4054)) @Kinglykrab 2024-03-24
|
||||
|
||||
### Skill Caps
|
||||
|
||||
* Further improvements ([#4205](https://github.com/EQEmu/Server/pull/4205)) @Akkadius 2024-03-24
|
||||
* Remove from shared memory and simplify ([#4069](https://github.com/EQEmu/Server/pull/4069)) @Kinglykrab 2024-03-23
|
||||
|
||||
### Spells
|
||||
|
||||
* Implemented SPA 463 SE_SHIELD_TARGET ([#4224](https://github.com/EQEmu/Server/pull/4224)) @KayenEQ 2024-03-30
|
||||
* Normal Group Spells (non-raid) landed twice on caster ([#4240](https://github.com/EQEmu/Server/pull/4240)) @noudess 2024-04-15
|
||||
* SPA148 Stacking Fix ([#4206](https://github.com/EQEmu/Server/pull/4206)) @KayenEQ 2024-03-27
|
||||
* SPA69 TotalHP can be used in Worn Slot, Fixes/Updates to Max HP related variables. ([#4244](https://github.com/EQEmu/Server/pull/4244)) @KayenEQ 2024-04-15
|
||||
|
||||
## [22.48.0] 3/23/2024
|
||||
|
||||
### Bots
|
||||
|
||||
@@ -5469,6 +5469,31 @@ ADD PRIMARY KEY (`id`) USING BTREE,
|
||||
ADD INDEX `level_skill_cap`(`skill_id`, `class_id`, `level`, `cap`);
|
||||
)",
|
||||
.content_schema_update = true,
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9269,
|
||||
.description = "2024_03_27_account_auto_login_charname.sql",
|
||||
.check = "SHOW COLUMNS FROM `account` LIKE 'auto_login_charname'",
|
||||
.condition = "empty",
|
||||
.match = "",
|
||||
.sql = R"(
|
||||
ALTER TABLE `account`
|
||||
ADD COLUMN `auto_login_charname` varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' AFTER `charname`;
|
||||
)"
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9270,
|
||||
.description = "2024_04_31_content_flagging_lootdrop_entries.sql",
|
||||
.check = "SHOW COLUMNS FROM `lootdrop_entries` LIKE 'content_flags'",
|
||||
.condition = "empty",
|
||||
.match = "",
|
||||
.sql = R"(
|
||||
ALTER TABLE `lootdrop_entries` ADD `min_expansion` tinyint(4) NOT NULL DEFAULT -1;
|
||||
ALTER TABLE `lootdrop_entries` ADD `max_expansion` tinyint(4) NOT NULL DEFAULT -1;
|
||||
ALTER TABLE `lootdrop_entries` ADD `content_flags` varchar(100) NULL;
|
||||
ALTER TABLE `lootdrop_entries` ADD `content_flags_disabled` varchar(100) NULL;
|
||||
)",
|
||||
.content_schema_update = true
|
||||
}
|
||||
// -- template; copy/paste this when you need to create a new entry
|
||||
// ManifestEntry{
|
||||
|
||||
@@ -714,3 +714,25 @@ std::string EQ::constants::GetSpecialAbilityName(uint32 ability_id)
|
||||
|
||||
return std::string();
|
||||
}
|
||||
|
||||
const std::map<uint32, std::string>& EQ::constants::GetConsiderColorMap()
|
||||
{
|
||||
static const std::map<uint32, std::string> consider_color_map = {
|
||||
{ ConsiderColor::Green, "Green" },
|
||||
{ ConsiderColor::DarkBlue, "Dark Blue" },
|
||||
{ ConsiderColor::Gray, "Gray" },
|
||||
{ ConsiderColor::White, "White" },
|
||||
{ ConsiderColor::Red, "Red" },
|
||||
{ ConsiderColor::Yellow, "Yellow" },
|
||||
{ ConsiderColor::LightBlue, "Light Blue" },
|
||||
{ ConsiderColor::WhiteTitanium, "White" },
|
||||
};
|
||||
|
||||
return consider_color_map;
|
||||
}
|
||||
|
||||
std::string EQ::constants::GetConsiderColorName(uint32 consider_color)
|
||||
{
|
||||
const auto& c = EQ::constants::GetConsiderColorMap().find(consider_color);
|
||||
return c != EQ::constants::GetConsiderColorMap().end() ? c->second : std::string();
|
||||
}
|
||||
|
||||
@@ -404,6 +404,9 @@ namespace EQ
|
||||
extern const std::map<uint32, std::string>& GetSpecialAbilityMap();
|
||||
std::string GetSpecialAbilityName(uint32 ability_id);
|
||||
|
||||
extern const std::map<uint32, std::string>& GetConsiderColorMap();
|
||||
std::string GetConsiderColorName(uint32 consider_color);
|
||||
|
||||
const int STANCE_TYPE_FIRST = stancePassive;
|
||||
const int STANCE_TYPE_LAST = stanceBurnAE;
|
||||
const int STANCE_TYPE_COUNT = stanceBurnAE;
|
||||
@@ -559,6 +562,17 @@ enum ConsiderLevel : uint8 {
|
||||
Scowls
|
||||
};
|
||||
|
||||
namespace ConsiderColor {
|
||||
constexpr uint32 Green = 2;
|
||||
constexpr uint32 DarkBlue = 4;
|
||||
constexpr uint32 Gray = 6;
|
||||
constexpr uint32 White = 10;
|
||||
constexpr uint32 Red = 13;
|
||||
constexpr uint32 Yellow = 15;
|
||||
constexpr uint32 LightBlue = 18;
|
||||
constexpr uint32 WhiteTitanium = 20;
|
||||
};
|
||||
|
||||
enum TargetDescriptionType : uint8 {
|
||||
LCSelf,
|
||||
UCSelf,
|
||||
|
||||
@@ -89,6 +89,24 @@ public:
|
||||
|
||||
return results.Success();
|
||||
}
|
||||
|
||||
static std::string GetAutoLoginCharacterNameByAccountID(Database& db, const uint32 account_id)
|
||||
{
|
||||
return AccountRepository::FindOne(db, account_id).auto_login_charname;
|
||||
}
|
||||
|
||||
static bool SetAutoLoginCharacterNameByAccountID(Database& db, const uint32 account_id, const std::string& character_name)
|
||||
{
|
||||
auto e = AccountRepository::FindOne(db, account_id);
|
||||
|
||||
if (!e.id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
e.auto_login_charname = character_name;
|
||||
|
||||
return AccountRepository::UpdateOne(db, e);
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_ACCOUNT_REPOSITORY_H
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
int32_t id;
|
||||
std::string name;
|
||||
std::string charname;
|
||||
std::string auto_login_charname;
|
||||
uint32_t sharedplat;
|
||||
std::string password;
|
||||
int32_t status;
|
||||
@@ -56,6 +57,7 @@ public:
|
||||
"id",
|
||||
"name",
|
||||
"charname",
|
||||
"auto_login_charname",
|
||||
"sharedplat",
|
||||
"password",
|
||||
"status",
|
||||
@@ -86,6 +88,7 @@ public:
|
||||
"id",
|
||||
"name",
|
||||
"charname",
|
||||
"auto_login_charname",
|
||||
"sharedplat",
|
||||
"password",
|
||||
"status",
|
||||
@@ -147,30 +150,31 @@ public:
|
||||
{
|
||||
Account e{};
|
||||
|
||||
e.id = 0;
|
||||
e.name = "";
|
||||
e.charname = "";
|
||||
e.sharedplat = 0;
|
||||
e.password = "";
|
||||
e.status = 0;
|
||||
e.ls_id = "eqemu";
|
||||
e.lsaccount_id = 0;
|
||||
e.gmspeed = 0;
|
||||
e.invulnerable = 0;
|
||||
e.flymode = 0;
|
||||
e.ignore_tells = 0;
|
||||
e.revoked = 0;
|
||||
e.karma = 0;
|
||||
e.minilogin_ip = "";
|
||||
e.hideme = 0;
|
||||
e.rulesflag = 0;
|
||||
e.suspendeduntil = 0;
|
||||
e.time_creation = 0;
|
||||
e.ban_reason = "";
|
||||
e.suspend_reason = "";
|
||||
e.crc_eqgame = "";
|
||||
e.crc_skillcaps = "";
|
||||
e.crc_basedata = "";
|
||||
e.id = 0;
|
||||
e.name = "";
|
||||
e.charname = "";
|
||||
e.auto_login_charname = "";
|
||||
e.sharedplat = 0;
|
||||
e.password = "";
|
||||
e.status = 0;
|
||||
e.ls_id = "eqemu";
|
||||
e.lsaccount_id = 0;
|
||||
e.gmspeed = 0;
|
||||
e.invulnerable = 0;
|
||||
e.flymode = 0;
|
||||
e.ignore_tells = 0;
|
||||
e.revoked = 0;
|
||||
e.karma = 0;
|
||||
e.minilogin_ip = "";
|
||||
e.hideme = 0;
|
||||
e.rulesflag = 0;
|
||||
e.suspendeduntil = 0;
|
||||
e.time_creation = 0;
|
||||
e.ban_reason = "";
|
||||
e.suspend_reason = "";
|
||||
e.crc_eqgame = "";
|
||||
e.crc_skillcaps = "";
|
||||
e.crc_basedata = "";
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -207,30 +211,31 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Account e{};
|
||||
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.sharedplat = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.password = row[4] ? row[4] : "";
|
||||
e.status = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.ls_id = row[6] ? row[6] : "eqemu";
|
||||
e.lsaccount_id = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.invulnerable = row[9] ? static_cast<int8_t>(atoi(row[9])) : 0;
|
||||
e.flymode = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.ignore_tells = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.revoked = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.karma = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[14] ? row[14] : "";
|
||||
e.hideme = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.rulesflag = row[16] ? static_cast<uint8_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||
e.time_creation = row[18] ? static_cast<uint32_t>(strtoul(row[18], nullptr, 10)) : 0;
|
||||
e.ban_reason = row[19] ? row[19] : "";
|
||||
e.suspend_reason = row[20] ? row[20] : "";
|
||||
e.crc_eqgame = row[21] ? row[21] : "";
|
||||
e.crc_skillcaps = row[22] ? row[22] : "";
|
||||
e.crc_basedata = row[23] ? row[23] : "";
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.auto_login_charname = row[3] ? row[3] : "";
|
||||
e.sharedplat = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.password = row[5] ? row[5] : "";
|
||||
e.status = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.ls_id = row[7] ? row[7] : "eqemu";
|
||||
e.lsaccount_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[9] ? static_cast<uint8_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.invulnerable = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.flymode = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.ignore_tells = row[12] ? static_cast<int8_t>(atoi(row[12])) : 0;
|
||||
e.revoked = row[13] ? static_cast<uint8_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.karma = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[15] ? row[15] : "";
|
||||
e.hideme = row[16] ? static_cast<int8_t>(atoi(row[16])) : 0;
|
||||
e.rulesflag = row[17] ? static_cast<uint8_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[18] ? row[18] : "-1", nullptr, 10);
|
||||
e.time_creation = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e.ban_reason = row[20] ? row[20] : "";
|
||||
e.suspend_reason = row[21] ? row[21] : "";
|
||||
e.crc_eqgame = row[22] ? row[22] : "";
|
||||
e.crc_skillcaps = row[23] ? row[23] : "";
|
||||
e.crc_basedata = row[24] ? row[24] : "";
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -266,27 +271,28 @@ public:
|
||||
|
||||
v.push_back(columns[1] + " = '" + Strings::Escape(e.name) + "'");
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.charname) + "'");
|
||||
v.push_back(columns[3] + " = " + std::to_string(e.sharedplat));
|
||||
v.push_back(columns[4] + " = '" + Strings::Escape(e.password) + "'");
|
||||
v.push_back(columns[5] + " = " + std::to_string(e.status));
|
||||
v.push_back(columns[6] + " = '" + Strings::Escape(e.ls_id) + "'");
|
||||
v.push_back(columns[7] + " = " + std::to_string(e.lsaccount_id));
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.gmspeed));
|
||||
v.push_back(columns[9] + " = " + std::to_string(e.invulnerable));
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.flymode));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.ignore_tells));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.revoked));
|
||||
v.push_back(columns[13] + " = " + std::to_string(e.karma));
|
||||
v.push_back(columns[14] + " = '" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(columns[15] + " = " + std::to_string(e.hideme));
|
||||
v.push_back(columns[16] + " = " + std::to_string(e.rulesflag));
|
||||
v.push_back(columns[17] + " = FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back(columns[18] + " = " + std::to_string(e.time_creation));
|
||||
v.push_back(columns[19] + " = '" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back(columns[20] + " = '" + Strings::Escape(e.suspend_reason) + "'");
|
||||
v.push_back(columns[21] + " = '" + Strings::Escape(e.crc_eqgame) + "'");
|
||||
v.push_back(columns[22] + " = '" + Strings::Escape(e.crc_skillcaps) + "'");
|
||||
v.push_back(columns[23] + " = '" + Strings::Escape(e.crc_basedata) + "'");
|
||||
v.push_back(columns[3] + " = '" + Strings::Escape(e.auto_login_charname) + "'");
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.sharedplat));
|
||||
v.push_back(columns[5] + " = '" + Strings::Escape(e.password) + "'");
|
||||
v.push_back(columns[6] + " = " + std::to_string(e.status));
|
||||
v.push_back(columns[7] + " = '" + Strings::Escape(e.ls_id) + "'");
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.lsaccount_id));
|
||||
v.push_back(columns[9] + " = " + std::to_string(e.gmspeed));
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.invulnerable));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.flymode));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.ignore_tells));
|
||||
v.push_back(columns[13] + " = " + std::to_string(e.revoked));
|
||||
v.push_back(columns[14] + " = " + std::to_string(e.karma));
|
||||
v.push_back(columns[15] + " = '" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(columns[16] + " = " + std::to_string(e.hideme));
|
||||
v.push_back(columns[17] + " = " + std::to_string(e.rulesflag));
|
||||
v.push_back(columns[18] + " = FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back(columns[19] + " = " + std::to_string(e.time_creation));
|
||||
v.push_back(columns[20] + " = '" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back(columns[21] + " = '" + Strings::Escape(e.suspend_reason) + "'");
|
||||
v.push_back(columns[22] + " = '" + Strings::Escape(e.crc_eqgame) + "'");
|
||||
v.push_back(columns[23] + " = '" + Strings::Escape(e.crc_skillcaps) + "'");
|
||||
v.push_back(columns[24] + " = '" + Strings::Escape(e.crc_basedata) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -311,6 +317,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.charname) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.auto_login_charname) + "'");
|
||||
v.push_back(std::to_string(e.sharedplat));
|
||||
v.push_back("'" + Strings::Escape(e.password) + "'");
|
||||
v.push_back(std::to_string(e.status));
|
||||
@@ -364,6 +371,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.charname) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.auto_login_charname) + "'");
|
||||
v.push_back(std::to_string(e.sharedplat));
|
||||
v.push_back("'" + Strings::Escape(e.password) + "'");
|
||||
v.push_back(std::to_string(e.status));
|
||||
@@ -418,30 +426,31 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Account e{};
|
||||
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.sharedplat = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.password = row[4] ? row[4] : "";
|
||||
e.status = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.ls_id = row[6] ? row[6] : "eqemu";
|
||||
e.lsaccount_id = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.invulnerable = row[9] ? static_cast<int8_t>(atoi(row[9])) : 0;
|
||||
e.flymode = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.ignore_tells = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.revoked = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.karma = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[14] ? row[14] : "";
|
||||
e.hideme = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.rulesflag = row[16] ? static_cast<uint8_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||
e.time_creation = row[18] ? static_cast<uint32_t>(strtoul(row[18], nullptr, 10)) : 0;
|
||||
e.ban_reason = row[19] ? row[19] : "";
|
||||
e.suspend_reason = row[20] ? row[20] : "";
|
||||
e.crc_eqgame = row[21] ? row[21] : "";
|
||||
e.crc_skillcaps = row[22] ? row[22] : "";
|
||||
e.crc_basedata = row[23] ? row[23] : "";
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.auto_login_charname = row[3] ? row[3] : "";
|
||||
e.sharedplat = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.password = row[5] ? row[5] : "";
|
||||
e.status = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.ls_id = row[7] ? row[7] : "eqemu";
|
||||
e.lsaccount_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[9] ? static_cast<uint8_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.invulnerable = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.flymode = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.ignore_tells = row[12] ? static_cast<int8_t>(atoi(row[12])) : 0;
|
||||
e.revoked = row[13] ? static_cast<uint8_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.karma = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[15] ? row[15] : "";
|
||||
e.hideme = row[16] ? static_cast<int8_t>(atoi(row[16])) : 0;
|
||||
e.rulesflag = row[17] ? static_cast<uint8_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[18] ? row[18] : "-1", nullptr, 10);
|
||||
e.time_creation = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e.ban_reason = row[20] ? row[20] : "";
|
||||
e.suspend_reason = row[21] ? row[21] : "";
|
||||
e.crc_eqgame = row[22] ? row[22] : "";
|
||||
e.crc_skillcaps = row[23] ? row[23] : "";
|
||||
e.crc_basedata = row[24] ? row[24] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -466,30 +475,31 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Account e{};
|
||||
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.sharedplat = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.password = row[4] ? row[4] : "";
|
||||
e.status = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.ls_id = row[6] ? row[6] : "eqemu";
|
||||
e.lsaccount_id = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.invulnerable = row[9] ? static_cast<int8_t>(atoi(row[9])) : 0;
|
||||
e.flymode = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.ignore_tells = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.revoked = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.karma = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[14] ? row[14] : "";
|
||||
e.hideme = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.rulesflag = row[16] ? static_cast<uint8_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||
e.time_creation = row[18] ? static_cast<uint32_t>(strtoul(row[18], nullptr, 10)) : 0;
|
||||
e.ban_reason = row[19] ? row[19] : "";
|
||||
e.suspend_reason = row[20] ? row[20] : "";
|
||||
e.crc_eqgame = row[21] ? row[21] : "";
|
||||
e.crc_skillcaps = row[22] ? row[22] : "";
|
||||
e.crc_basedata = row[23] ? row[23] : "";
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.auto_login_charname = row[3] ? row[3] : "";
|
||||
e.sharedplat = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.password = row[5] ? row[5] : "";
|
||||
e.status = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.ls_id = row[7] ? row[7] : "eqemu";
|
||||
e.lsaccount_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[9] ? static_cast<uint8_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.invulnerable = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.flymode = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.ignore_tells = row[12] ? static_cast<int8_t>(atoi(row[12])) : 0;
|
||||
e.revoked = row[13] ? static_cast<uint8_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.karma = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[15] ? row[15] : "";
|
||||
e.hideme = row[16] ? static_cast<int8_t>(atoi(row[16])) : 0;
|
||||
e.rulesflag = row[17] ? static_cast<uint8_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[18] ? row[18] : "-1", nullptr, 10);
|
||||
e.time_creation = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e.ban_reason = row[20] ? row[20] : "";
|
||||
e.suspend_reason = row[21] ? row[21] : "";
|
||||
e.crc_eqgame = row[22] ? row[22] : "";
|
||||
e.crc_skillcaps = row[23] ? row[23] : "";
|
||||
e.crc_basedata = row[24] ? row[24] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -567,6 +577,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.charname) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.auto_login_charname) + "'");
|
||||
v.push_back(std::to_string(e.sharedplat));
|
||||
v.push_back("'" + Strings::Escape(e.password) + "'");
|
||||
v.push_back(std::to_string(e.status));
|
||||
@@ -613,6 +624,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.charname) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.auto_login_charname) + "'");
|
||||
v.push_back(std::to_string(e.sharedplat));
|
||||
v.push_back("'" + Strings::Escape(e.password) + "'");
|
||||
v.push_back(std::to_string(e.status));
|
||||
|
||||
@@ -19,17 +19,21 @@
|
||||
class BaseLootdropEntriesRepository {
|
||||
public:
|
||||
struct LootdropEntries {
|
||||
uint32_t lootdrop_id;
|
||||
int32_t item_id;
|
||||
uint16_t item_charges;
|
||||
uint8_t equip_item;
|
||||
float chance;
|
||||
float disabled_chance;
|
||||
uint16_t trivial_min_level;
|
||||
uint16_t trivial_max_level;
|
||||
uint8_t multiplier;
|
||||
uint16_t npc_min_level;
|
||||
uint16_t npc_max_level;
|
||||
uint32_t lootdrop_id;
|
||||
int32_t item_id;
|
||||
uint16_t item_charges;
|
||||
uint8_t equip_item;
|
||||
float chance;
|
||||
float disabled_chance;
|
||||
uint16_t trivial_min_level;
|
||||
uint16_t trivial_max_level;
|
||||
uint8_t multiplier;
|
||||
uint16_t npc_min_level;
|
||||
uint16_t npc_max_level;
|
||||
int8_t min_expansion;
|
||||
int8_t max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -51,6 +55,10 @@ public:
|
||||
"multiplier",
|
||||
"npc_min_level",
|
||||
"npc_max_level",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -68,6 +76,10 @@ public:
|
||||
"multiplier",
|
||||
"npc_min_level",
|
||||
"npc_max_level",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -108,17 +120,21 @@ public:
|
||||
{
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = 0;
|
||||
e.item_id = 0;
|
||||
e.item_charges = 1;
|
||||
e.equip_item = 0;
|
||||
e.chance = 1;
|
||||
e.disabled_chance = 0;
|
||||
e.trivial_min_level = 0;
|
||||
e.trivial_max_level = 0;
|
||||
e.multiplier = 1;
|
||||
e.npc_min_level = 0;
|
||||
e.npc_max_level = 0;
|
||||
e.lootdrop_id = 0;
|
||||
e.item_id = 0;
|
||||
e.item_charges = 1;
|
||||
e.equip_item = 0;
|
||||
e.chance = 1;
|
||||
e.disabled_chance = 0;
|
||||
e.trivial_min_level = 0;
|
||||
e.trivial_max_level = 0;
|
||||
e.multiplier = 1;
|
||||
e.npc_min_level = 0;
|
||||
e.npc_max_level = 0;
|
||||
e.min_expansion = -1;
|
||||
e.max_expansion = -1;
|
||||
e.content_flags = "";
|
||||
e.content_flags_disabled = "";
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -155,17 +171,21 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
e.disabled_chance = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.trivial_min_level = row[6] ? static_cast<uint16_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.trivial_max_level = row[7] ? static_cast<uint16_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.multiplier = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 1;
|
||||
e.npc_min_level = row[9] ? static_cast<uint16_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.npc_max_level = row[10] ? static_cast<uint16_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
e.disabled_chance = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.trivial_min_level = row[6] ? static_cast<uint16_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.trivial_max_level = row[7] ? static_cast<uint16_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.multiplier = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 1;
|
||||
e.npc_min_level = row[9] ? static_cast<uint16_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.npc_max_level = row[10] ? static_cast<uint16_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.min_expansion = row[11] ? static_cast<int8_t>(atoi(row[11])) : -1;
|
||||
e.max_expansion = row[12] ? static_cast<int8_t>(atoi(row[12])) : -1;
|
||||
e.content_flags = row[13] ? row[13] : "";
|
||||
e.content_flags_disabled = row[14] ? row[14] : "";
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -210,6 +230,10 @@ public:
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.multiplier));
|
||||
v.push_back(columns[9] + " = " + std::to_string(e.npc_min_level));
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.npc_max_level));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.min_expansion));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.max_expansion));
|
||||
v.push_back(columns[13] + " = '" + Strings::Escape(e.content_flags) + "'");
|
||||
v.push_back(columns[14] + " = '" + Strings::Escape(e.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -242,6 +266,10 @@ public:
|
||||
v.push_back(std::to_string(e.multiplier));
|
||||
v.push_back(std::to_string(e.npc_min_level));
|
||||
v.push_back(std::to_string(e.npc_max_level));
|
||||
v.push_back(std::to_string(e.min_expansion));
|
||||
v.push_back(std::to_string(e.max_expansion));
|
||||
v.push_back("'" + Strings::Escape(e.content_flags) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -282,6 +310,10 @@ public:
|
||||
v.push_back(std::to_string(e.multiplier));
|
||||
v.push_back(std::to_string(e.npc_min_level));
|
||||
v.push_back(std::to_string(e.npc_max_level));
|
||||
v.push_back(std::to_string(e.min_expansion));
|
||||
v.push_back(std::to_string(e.max_expansion));
|
||||
v.push_back("'" + Strings::Escape(e.content_flags) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@@ -315,17 +347,21 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
e.disabled_chance = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.trivial_min_level = row[6] ? static_cast<uint16_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.trivial_max_level = row[7] ? static_cast<uint16_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.multiplier = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 1;
|
||||
e.npc_min_level = row[9] ? static_cast<uint16_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.npc_max_level = row[10] ? static_cast<uint16_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
e.disabled_chance = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.trivial_min_level = row[6] ? static_cast<uint16_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.trivial_max_level = row[7] ? static_cast<uint16_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.multiplier = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 1;
|
||||
e.npc_min_level = row[9] ? static_cast<uint16_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.npc_max_level = row[10] ? static_cast<uint16_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.min_expansion = row[11] ? static_cast<int8_t>(atoi(row[11])) : -1;
|
||||
e.max_expansion = row[12] ? static_cast<int8_t>(atoi(row[12])) : -1;
|
||||
e.content_flags = row[13] ? row[13] : "";
|
||||
e.content_flags_disabled = row[14] ? row[14] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -350,17 +386,21 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
e.disabled_chance = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.trivial_min_level = row[6] ? static_cast<uint16_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.trivial_max_level = row[7] ? static_cast<uint16_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.multiplier = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 1;
|
||||
e.npc_min_level = row[9] ? static_cast<uint16_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.npc_max_level = row[10] ? static_cast<uint16_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
e.disabled_chance = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.trivial_min_level = row[6] ? static_cast<uint16_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.trivial_max_level = row[7] ? static_cast<uint16_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.multiplier = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 1;
|
||||
e.npc_min_level = row[9] ? static_cast<uint16_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.npc_max_level = row[10] ? static_cast<uint16_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.min_expansion = row[11] ? static_cast<int8_t>(atoi(row[11])) : -1;
|
||||
e.max_expansion = row[12] ? static_cast<int8_t>(atoi(row[12])) : -1;
|
||||
e.content_flags = row[13] ? row[13] : "";
|
||||
e.content_flags_disabled = row[14] ? row[14] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -446,6 +486,10 @@ public:
|
||||
v.push_back(std::to_string(e.multiplier));
|
||||
v.push_back(std::to_string(e.npc_min_level));
|
||||
v.push_back(std::to_string(e.npc_max_level));
|
||||
v.push_back(std::to_string(e.min_expansion));
|
||||
v.push_back(std::to_string(e.max_expansion));
|
||||
v.push_back("'" + Strings::Escape(e.content_flags) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -479,6 +523,10 @@ public:
|
||||
v.push_back(std::to_string(e.multiplier));
|
||||
v.push_back(std::to_string(e.npc_min_level));
|
||||
v.push_back(std::to_string(e.npc_max_level));
|
||||
v.push_back(std::to_string(e.min_expansion));
|
||||
v.push_back(std::to_string(e.max_expansion));
|
||||
v.push_back("'" + Strings::Escape(e.content_flags) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
{.parent_command = "set", .sub_command = "alternate_currency", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setaltcurrency"},
|
||||
{.parent_command = "set", .sub_command = "animation", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setanim"},
|
||||
{.parent_command = "set", .sub_command = "anon", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setanon"},
|
||||
{.parent_command = "set", .sub_command = "auto_login", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setautologin"},
|
||||
{.parent_command = "set", .sub_command = "bind", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "bind"},
|
||||
{.parent_command = "set", .sub_command = "checksum", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "updatechecksum"},
|
||||
{.parent_command = "set", .sub_command = "class_permanent", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "permaclass"},
|
||||
@@ -122,6 +123,7 @@ public:
|
||||
{.parent_command = "set", .sub_command = "zone", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "zclip|zcolor|zheader|zonelock|zsafecoords|zsky|zunderworld"},
|
||||
{.parent_command = "show", .sub_command = "aas", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showaas"},
|
||||
{.parent_command = "show", .sub_command = "aa_points", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showaapoints|showaapts"},
|
||||
{.parent_command = "show", .sub_command = "auto_login", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showautologin"},
|
||||
{.parent_command = "show", .sub_command = "aggro", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "aggro"},
|
||||
{.parent_command = "show", .sub_command = "buffs", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showbuffs"},
|
||||
{.parent_command = "show", .sub_command = "buried_corpse_count", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "getplayerburiedcorpsecount"},
|
||||
|
||||
@@ -330,6 +330,7 @@ RULE_BOOL(World, UseOldShadowKnightClassExport, true, "Disable to have Shadowkni
|
||||
RULE_STRING(World, IPExemptionZones, "", "Comma-delimited list of zones to exclude from IP-limit checks. Empty string to disable.")
|
||||
RULE_STRING(World, MOTD, "", "Server MOTD sent on login, change from empty to have this be used instead of variables table 'motd' value")
|
||||
RULE_STRING(World, Rules, "", "Server Rules, change from empty to have this be used instead of variables table 'rules' value, lines are pipe (|) separated, example: A|B|C")
|
||||
RULE_BOOL(World, EnableAutoLogin, false, "Enables or disables auto login of characters, allowing people to log characters in directly from loginserver to ingame")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Zone)
|
||||
|
||||
+10
-16
@@ -13,16 +13,11 @@ SkillCapsRepository::SkillCaps SkillCaps::GetSkillCap(uint8 class_id, EQ::skills
|
||||
return SkillCapsRepository::NewEntity();
|
||||
}
|
||||
|
||||
for (const auto &e: m_skill_caps) {
|
||||
if (
|
||||
e.class_id == class_id &&
|
||||
e.level == level &&
|
||||
static_cast<EQ::skills::SkillType>(e.skill_id) == skill_id
|
||||
) {
|
||||
return e;
|
||||
}
|
||||
uint64_t key = (class_id * 1000000) + (level * 1000) + static_cast<uint32>(skill_id);
|
||||
auto pos = m_skill_caps.find(key);
|
||||
if (pos != m_skill_caps.end()) {
|
||||
return pos->second;
|
||||
}
|
||||
|
||||
return SkillCapsRepository::NewEntity();
|
||||
}
|
||||
|
||||
@@ -46,11 +41,9 @@ uint8 SkillCaps::GetTrainLevel(uint8 class_id, EQ::skills::SkillType skill_id, u
|
||||
|
||||
for (const auto &e: m_skill_caps) {
|
||||
for (uint8 current_level = 1; current_level <= max_level; current_level++) {
|
||||
if (
|
||||
e.class_id == class_id &&
|
||||
static_cast<EQ::skills::SkillType>(e.skill_id) == skill_id &&
|
||||
e.level == current_level
|
||||
) {
|
||||
uint64_t key = (class_id * 1000000) + (level * 1000) + static_cast<uint32>(skill_id);
|
||||
auto pos = m_skill_caps.find(key);
|
||||
if (pos != m_skill_caps.end()) {
|
||||
return current_level;
|
||||
}
|
||||
}
|
||||
@@ -63,7 +56,7 @@ void SkillCaps::LoadSkillCaps()
|
||||
{
|
||||
const auto &l = SkillCapsRepository::All(*m_content_database);
|
||||
|
||||
m_skill_caps.reserve(l.size());
|
||||
m_skill_caps.clear();
|
||||
|
||||
for (const auto &e: l) {
|
||||
if (
|
||||
@@ -74,7 +67,8 @@ void SkillCaps::LoadSkillCaps()
|
||||
continue;
|
||||
}
|
||||
|
||||
m_skill_caps.emplace_back(e);
|
||||
uint64_t key = (e.class_id * 1000000) + (e.level * 1000) + e.skill_id;
|
||||
m_skill_caps[key] = e;
|
||||
}
|
||||
|
||||
LogInfo(
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ public:
|
||||
SkillCaps *SetContentDatabase(Database *db);
|
||||
private:
|
||||
Database *m_content_database{};
|
||||
std::vector<SkillCapsRepository::SkillCaps> m_skill_caps = {};
|
||||
std::map<uint64, SkillCapsRepository::SkillCaps> m_skill_caps = {};
|
||||
};
|
||||
|
||||
extern SkillCaps skill_caps;
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
|
||||
// Build variables
|
||||
// these get injected during the build pipeline
|
||||
#define CURRENT_VERSION "22.48.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define CURRENT_VERSION "22.49.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 9268
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9270
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9043
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eqemu-server",
|
||||
"version": "22.48.0",
|
||||
"version": "22.49.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EQEmu/Server.git"
|
||||
|
||||
+9
-3
@@ -194,14 +194,20 @@ bool Client::CanTradeFVNoDropItem()
|
||||
void Client::SendEnterWorld(std::string name)
|
||||
{
|
||||
std::string live_name {};
|
||||
|
||||
if (is_player_zoning) {
|
||||
live_name = database.GetLiveChar(GetAccountID());
|
||||
if(database.GetAccountIDByChar(live_name) != GetAccountID()) {
|
||||
if (database.GetAccountIDByChar(live_name) != GetAccountID()) {
|
||||
eqs->Close();
|
||||
return;
|
||||
} else {
|
||||
LogInfo("Telling client to continue session");
|
||||
}
|
||||
|
||||
LogInfo("Zoning with live_name [{}] account_id [{}]", live_name, GetAccountID());
|
||||
}
|
||||
|
||||
if (RuleB(World, EnableAutoLogin)) {
|
||||
live_name = AccountRepository::GetAutoLoginCharacterNameByAccountID(database, GetAccountID());
|
||||
LogInfo("Attempting to auto login with live_name [{}] account_id [{}]", live_name, GetAccountID());
|
||||
}
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_EnterWorld, live_name.length() + 1);
|
||||
|
||||
+5
-5
@@ -221,7 +221,7 @@ void NPC::DescribeAggro(Client *to_who, Mob *mob, bool verbose) {
|
||||
if (RuleB(Aggro, UseLevelAggro)) {
|
||||
if (
|
||||
GetLevel() < RuleI(Aggro, MinAggroLevel) &&
|
||||
mob->GetLevelCon(GetLevel()) == CON_GRAY &&
|
||||
mob->GetLevelCon(GetLevel()) == ConsiderColor::Gray &&
|
||||
GetBodyType() != BT_Undead &&
|
||||
!AlwaysAggro()
|
||||
) {
|
||||
@@ -237,7 +237,7 @@ void NPC::DescribeAggro(Client *to_who, Mob *mob, bool verbose) {
|
||||
} else {
|
||||
if (
|
||||
GetINT() > RuleI(Aggro, IntAggroThreshold) &&
|
||||
mob->GetLevelCon(GetLevel()) == CON_GRAY &&
|
||||
mob->GetLevelCon(GetLevel()) == ConsiderColor::Gray &&
|
||||
!AlwaysAggro()
|
||||
) {
|
||||
to_who->Message(
|
||||
@@ -502,7 +502,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
mob->IsClient() &&
|
||||
mob->CastToClient()->IsSitting()
|
||||
) ||
|
||||
mob->GetLevelCon(GetLevel()) != CON_GRAY
|
||||
mob->GetLevelCon(GetLevel()) != ConsiderColor::Gray
|
||||
) &&
|
||||
(
|
||||
faction_value == FACTION_SCOWLS ||
|
||||
@@ -531,7 +531,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
mob->IsClient() &&
|
||||
mob->CastToClient()->IsSitting()
|
||||
) ||
|
||||
mob->GetLevelCon(GetLevel()) != CON_GRAY
|
||||
mob->GetLevelCon(GetLevel()) != ConsiderColor::Gray
|
||||
) &&
|
||||
(
|
||||
faction_value == FACTION_SCOWLS ||
|
||||
@@ -586,7 +586,7 @@ int EntityList::GetHatedCount(Mob *attacker, Mob *exclude, bool inc_gray_con)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!inc_gray_con && attacker->GetLevelCon(mob->GetLevel()) == CON_GRAY) {
|
||||
if (!inc_gray_con && attacker->GetLevelCon(mob->GetLevel()) == ConsiderColor::Gray) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+25
-25
@@ -2500,8 +2500,9 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
d->spell_id = UINT32_MAX;
|
||||
d->attack_skill = SkillDamageTypes[attack_skill];
|
||||
d->damage = damage;
|
||||
d->corpseid = GetID();
|
||||
|
||||
app->priority = 6;
|
||||
app->priority = 1;
|
||||
|
||||
entity_list.QueueClients(killer_mob, app, false);
|
||||
|
||||
@@ -2719,7 +2720,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
if (!is_ldon_treasure && !MerchantType) {
|
||||
const uint32 con_level = give_exp->GetLevelCon(GetLevel());
|
||||
|
||||
if (con_level != CON_GRAY) {
|
||||
if (con_level != ConsiderColor::Gray) {
|
||||
if (!GetOwner() || (GetOwner() && !GetOwner()->IsClient())) {
|
||||
give_exp_client->AddEXP(final_exp, con_level);
|
||||
|
||||
@@ -2833,8 +2834,15 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
}
|
||||
|
||||
entity_list.LimitRemoveNPC(this);
|
||||
|
||||
entity_list.AddCorpse(corpse, GetID());
|
||||
|
||||
// The client sees NPC corpses as name's_corpse. The server uses
|
||||
// name`s_corpse so that %T works on corpses (client workaround)
|
||||
// Rename the new corpse on client side.
|
||||
std::string old_name = Strings::Replace(corpse->GetName(), "`s_corpse", "'s_corpse");
|
||||
SendRename(killer_mob, old_name.c_str(), corpse->GetName());
|
||||
|
||||
entity_list.UnMarkNPC(GetID());
|
||||
entity_list.RemoveNPC(GetID());
|
||||
|
||||
@@ -3968,12 +3976,8 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
int64 lua_ret = 0;
|
||||
bool ignore_default = false;
|
||||
lua_ret = LuaParser::Instance()->CommonDamage(this, attacker, damage, spell_id, static_cast<int>(skill_used), avoidable, buffslot, iBuffTic, static_cast<int>(special), ignore_default);
|
||||
if (lua_ret != 0) {
|
||||
damage = lua_ret;
|
||||
}
|
||||
|
||||
if (ignore_default) {
|
||||
//return lua_ret;
|
||||
damage = lua_ret;
|
||||
}
|
||||
#endif
|
||||
// This method is called with skill_used=ABJURE for Damage Shield damage.
|
||||
@@ -4050,7 +4054,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
Mob *owner = GetOwner();
|
||||
if (owner && owner->IsClient()) {
|
||||
if (GetPetOrder() == SPO_Sit) {
|
||||
SetPetOrder(SPO_Follow);
|
||||
SetPetOrder(GetPreviousPetOrder());
|
||||
}
|
||||
// fix GUI sit button to be unpressed and stop sitting regen
|
||||
owner->CastToClient()->SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
@@ -4080,11 +4084,11 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
!pet->IsHeld()
|
||||
) {
|
||||
LogAggro("Sending pet [{}] into battle due to attack", pet->GetName());
|
||||
if (IsClient()) {
|
||||
// if pet was sitting his new mode is follow
|
||||
// following after the battle (live verified)
|
||||
if (IsClient() && !pet->IsPetStop()) {
|
||||
// if pet was sitting his new mode is previous setting of
|
||||
// follow or guard after the battle (live verified)
|
||||
if (pet->GetPetOrder() == SPO_Sit) {
|
||||
pet->SetPetOrder(SPO_Follow);
|
||||
pet->SetPetOrder(pet->GetPreviousPetOrder());
|
||||
}
|
||||
|
||||
// fix GUI sit button to be unpressed and stop sitting regen
|
||||
@@ -4669,9 +4673,9 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
else {
|
||||
//else, it is a buff tic...
|
||||
// So we can see our dot dmg like live shows it.
|
||||
if (IsValidSpell(spell_id) && damage > 0 && attacker && attacker != this && !attacker->IsCorpse()) {
|
||||
if (IsValidSpell(spell_id) && damage > 0 && attacker && attacker != this) {
|
||||
//might filter on (attack_skill>200 && attack_skill<250), but I dont think we need it
|
||||
if (attacker->IsClient()) {
|
||||
if (!attacker->IsCorpse() && attacker->IsClient()) {
|
||||
attacker->FilteredMessageString(attacker, Chat::DotDamage,
|
||||
FilterDOT, YOUR_HIT_DOT, GetCleanName(), itoa(damage),
|
||||
spells[spell_id].name);
|
||||
@@ -4708,12 +4712,8 @@ void Mob::HealDamage(uint64 amount, Mob* caster, uint16 spell_id)
|
||||
bool ignore_default = false;
|
||||
|
||||
lua_ret = LuaParser::Instance()->HealDamage(this, caster, amount, spell_id, ignore_default);
|
||||
if (lua_ret != 0) {
|
||||
amount = lua_ret;
|
||||
}
|
||||
|
||||
if (ignore_default) {
|
||||
//return lua_ret;
|
||||
amount = lua_ret;
|
||||
}
|
||||
#endif
|
||||
int64 maxhp = GetMaxHP();
|
||||
@@ -6314,10 +6314,10 @@ void Mob::CommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraAttac
|
||||
bool use_shield_ability = true;
|
||||
//If defender is being shielded by an ability AND has a shield spell effect buff use highest mitigation value.
|
||||
if ((defender->GetShieldTargetMitigation() && defender->spellbonuses.ShieldTargetSpa[SBIndex::SHIELD_TARGET_MITIGATION_PERCENT]) &&
|
||||
(defender->spellbonuses.ShieldTargetSpa[SBIndex::SHIELD_TARGET_MITIGATION_PERCENT] >= defender->GetShieldTargetMitigation())){
|
||||
(defender->spellbonuses.ShieldTargetSpa[SBIndex::SHIELD_TARGET_MITIGATION_PERCENT] >= defender->GetShieldTargetMitigation())){
|
||||
bool use_shield_ability = false;
|
||||
}
|
||||
|
||||
|
||||
//use targeted /shield ability values
|
||||
if (defender->GetShielderID() && use_shield_ability) {
|
||||
DoShieldDamageOnShielder(defender, hit.damage_done, hit.skill);
|
||||
@@ -6379,14 +6379,14 @@ void Mob::DoShieldDamageOnShielderSpellEffect(Mob* shield_target, int64 hit_dama
|
||||
}
|
||||
/*
|
||||
SPA 463 SE_SHIELD_TARGET
|
||||
|
||||
Live description: "Shields your target, taking a percentage of their damage".
|
||||
|
||||
Live description: "Shields your target, taking a percentage of their damage".
|
||||
Only example spell on live is an NPC who uses it during a raid event "Laurion's Song" expansion. SPA 54492 'Guardian Stance' Described as 100% Melee Shielding
|
||||
|
||||
|
||||
Example of mechanic. Base value = 70. Caster puts buff on target. Each melee hit Buff Target takes 70% less damage, Buff Caster receives 30% of the melee damage.
|
||||
Added mechanic to cause buff to fade if target or caster are seperated by a distance greater than the casting range of the spell. This allows similiar mechanics
|
||||
to the /shield ability, without a range removal mechanic it would be too easy to abuse if put on a player spell. *can not confirm live does this currently
|
||||
|
||||
|
||||
Can not be cast on self.
|
||||
*/
|
||||
|
||||
|
||||
+10
-11
@@ -938,7 +938,7 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
case SE_IncreaseRange:
|
||||
break;
|
||||
case SE_MaxHPChange:
|
||||
newbon->MaxHP += base_value;
|
||||
newbon->PercentMaxHPChange += base_value;
|
||||
break;
|
||||
case SE_Packrat:
|
||||
newbon->Packrat += base_value;
|
||||
@@ -997,7 +997,7 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
newbon->BuffSlotIncrease += base_value;
|
||||
break;
|
||||
case SE_TotalHP:
|
||||
newbon->HP += base_value;
|
||||
newbon->FlatMaxHPChange += base_value;
|
||||
break;
|
||||
case SE_StunResist:
|
||||
newbon->StunResist += base_value;
|
||||
@@ -2237,7 +2237,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
||||
|
||||
case SE_TotalHP:
|
||||
{
|
||||
new_bonus->HP += effect_value;
|
||||
new_bonus->FlatMaxHPChange += effect_value;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2919,7 +2919,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
||||
}
|
||||
|
||||
case SE_MaxHPChange:
|
||||
new_bonus->MaxHPChange += effect_value;
|
||||
new_bonus->PercentMaxHPChange += effect_value;
|
||||
break;
|
||||
|
||||
case SE_EndurancePool:
|
||||
@@ -4515,9 +4515,9 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id)
|
||||
break;
|
||||
|
||||
case SE_TotalHP:
|
||||
if (negate_spellbonus) { spellbonuses.HP = effect_value; }
|
||||
if (negate_aabonus) { aabonuses.HP = effect_value; }
|
||||
if (negate_itembonus) { itembonuses.HP = effect_value; }
|
||||
if (negate_spellbonus) { spellbonuses.FlatMaxHPChange = effect_value; }
|
||||
if (negate_aabonus) { aabonuses.FlatMaxHPChange = effect_value; }
|
||||
if (negate_itembonus) { itembonuses.FlatMaxHPChange = effect_value; }
|
||||
break;
|
||||
|
||||
case SE_ManaRegen_v2:
|
||||
@@ -4999,10 +4999,9 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id)
|
||||
}
|
||||
|
||||
case SE_MaxHPChange:
|
||||
if (negate_spellbonus) { spellbonuses.MaxHPChange = effect_value; }
|
||||
if (negate_aabonus) { aabonuses.MaxHPChange = effect_value; }
|
||||
if (negate_aabonus) { aabonuses.MaxHP = effect_value; }
|
||||
if (negate_itembonus) { itembonuses.MaxHPChange = effect_value; }
|
||||
if (negate_spellbonus) { spellbonuses.PercentMaxHPChange = effect_value; }
|
||||
if (negate_aabonus) { aabonuses.PercentMaxHPChange = effect_value; }
|
||||
if (negate_itembonus) { itembonuses.PercentMaxHPChange = effect_value; }
|
||||
break;
|
||||
|
||||
case SE_EndurancePool:
|
||||
|
||||
+7
-7
@@ -6235,9 +6235,9 @@ int64 Bot::CalcMaxHP() {
|
||||
uint32 nd = 10000;
|
||||
bot_hp += (GenerateBaseHitPoints() + itembonuses.HP);
|
||||
bot_hp += itembonuses.heroic_max_hp;
|
||||
nd += aabonuses.MaxHP + spellbonuses.MaxHPChange + itembonuses.MaxHPChange;
|
||||
nd += aabonuses.PercentMaxHPChange + spellbonuses.PercentMaxHPChange + itembonuses.PercentMaxHPChange;
|
||||
bot_hp = ((float)bot_hp * (float)nd / (float)10000);
|
||||
bot_hp += (spellbonuses.HP + aabonuses.HP);
|
||||
bot_hp += (spellbonuses.FlatMaxHPChange + aabonuses.FlatMaxHPChange + itembonuses.FlatMaxHPChange);
|
||||
bot_hp += GroupLeadershipAAHealthEnhancement();
|
||||
max_hp = bot_hp;
|
||||
if (current_hp > max_hp)
|
||||
@@ -7366,23 +7366,23 @@ void EntityList::ShowSpawnWindow(Client* client, int Distance, bool NamedOnly) {
|
||||
|
||||
LastCon = CurrentCon;
|
||||
switch(CurrentCon) {
|
||||
case CON_GREEN: {
|
||||
case ConsiderColor::Green: {
|
||||
WindowText += "<c \"#00FF00\">";
|
||||
break;
|
||||
}
|
||||
case CON_LIGHTBLUE: {
|
||||
case ConsiderColor::LightBlue: {
|
||||
WindowText += "<c \"#8080FF\">";
|
||||
break;
|
||||
}
|
||||
case CON_BLUE: {
|
||||
case ConsiderColor::DarkBlue: {
|
||||
WindowText += "<c \"#2020FF\">";
|
||||
break;
|
||||
}
|
||||
case CON_YELLOW: {
|
||||
case ConsiderColor::Yellow: {
|
||||
WindowText += "<c \"#FFFF00\">";
|
||||
break;
|
||||
}
|
||||
case CON_RED: {
|
||||
case ConsiderColor::Red: {
|
||||
WindowText += "<c \"#FF0000\">";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -893,7 +893,6 @@ private:
|
||||
bool m_pulling_flag;
|
||||
bool m_returning_flag;
|
||||
bool is_using_item_click;
|
||||
eStandingPetOrder m_previous_pet_order;
|
||||
uint32 m_bot_caster_range;
|
||||
BotCastingRoles m_CastingRoles;
|
||||
|
||||
|
||||
+1
-4
@@ -278,8 +278,6 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
|
||||
if (RuleI(World, PVPMinLevel) > 0 && level >= RuleI(World, PVPMinLevel) && m_pp.pvp == 0) SetPVP(true, false);
|
||||
dynamiczone_removal_timer.Disable();
|
||||
|
||||
heroforge_wearchange_timer.Disable();
|
||||
|
||||
//for good measure:
|
||||
memset(&m_pp, 0, sizeof(m_pp));
|
||||
memset(&m_epp, 0, sizeof(m_epp));
|
||||
@@ -343,7 +341,6 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
|
||||
XTargetAutoAddHaters = true;
|
||||
m_autohatermgr.SetOwner(this, nullptr, nullptr);
|
||||
m_activeautohatermgr = &m_autohatermgr;
|
||||
LoadAccountFlags();
|
||||
|
||||
initial_respawn_selection = 0;
|
||||
alternate_currency_loaded = false;
|
||||
@@ -2660,7 +2657,7 @@ bool Client::CheckIncreaseSkill(EQ::skills::SkillType skillid, Mob *against_who,
|
||||
against_who->GetSpecialAbility(IMMUNE_AGGRO) ||
|
||||
against_who->GetSpecialAbility(IMMUNE_AGGRO_CLIENT) ||
|
||||
against_who->IsClient() ||
|
||||
GetLevelCon(against_who->GetLevel()) == CON_GRAY
|
||||
GetLevelCon(against_who->GetLevel()) == ConsiderColor::Gray
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+3
-2
@@ -1130,6 +1130,9 @@ public:
|
||||
const bool GetGMInvul() const { return gminvul; }
|
||||
bool CanUseReport;
|
||||
|
||||
const std::string GetAutoLoginCharacterName();
|
||||
bool SetAutoLoginCharacterName(const std::string& character_name);
|
||||
|
||||
//This is used to later set the buff duration of the spell, in slot to duration.
|
||||
//Doesn't appear to work directly after the client recieves an action packet.
|
||||
void SendBuffDurationPacket(Buffs_Struct &buff, int slot);
|
||||
@@ -1953,8 +1956,6 @@ private:
|
||||
Timer task_request_timer;
|
||||
Timer pick_lock_timer;
|
||||
|
||||
Timer heroforge_wearchange_timer;
|
||||
|
||||
glm::vec3 m_Proximity;
|
||||
glm::vec4 last_position_before_bulk_update;
|
||||
|
||||
|
||||
@@ -323,9 +323,9 @@ int64 Client::CalcMaxHP()
|
||||
//to apply it to (basehp + itemhp).. I will oblige to the client's whims over
|
||||
//the aa description
|
||||
|
||||
nd += aabonuses.MaxHP + spellbonuses.MaxHPChange + itembonuses.MaxHPChange; //Natural Durability, Physical Enhancement, Planar Durability (MaxHP and MaxHPChange are SPA214)
|
||||
nd += aabonuses.PercentMaxHPChange + spellbonuses.PercentMaxHPChange + itembonuses.PercentMaxHPChange; //Natural Durability, Physical Enhancement, Planar Durability
|
||||
max_hp = (float)max_hp * (float)nd / (float)10000; //this is to fix the HP-above-495k issue
|
||||
max_hp += spellbonuses.HP + aabonuses.HP;
|
||||
max_hp += spellbonuses.FlatMaxHPChange + aabonuses.FlatMaxHPChange + itembonuses.FlatMaxHPChange;
|
||||
|
||||
max_hp += GroupLeadershipAAHealthEnhancement();
|
||||
if (current_hp > max_hp) {
|
||||
|
||||
+37
-30
@@ -538,6 +538,7 @@ void Client::CompleteConnect()
|
||||
EnteringMessages(this);
|
||||
LoadPEQZoneFlags();
|
||||
LoadZoneFlags();
|
||||
LoadAccountFlags();
|
||||
|
||||
/* Sets GM Flag if needed & Sends Petition Queue */
|
||||
UpdateAdmin(false);
|
||||
@@ -757,8 +758,10 @@ void Client::CompleteConnect()
|
||||
|
||||
entity_list.SendTraders(this);
|
||||
|
||||
Mob *pet = GetPet();
|
||||
SendWearChangeAndLighting(EQ::textures::LastTexture);
|
||||
Mob* pet = GetPet();
|
||||
if (pet) {
|
||||
pet->SendWearChangeAndLighting(EQ::textures::LastTexture);
|
||||
pet->SendPetBuffsToClient();
|
||||
}
|
||||
|
||||
@@ -951,8 +954,6 @@ void Client::CompleteConnect()
|
||||
safe_delete(p);
|
||||
}
|
||||
|
||||
heroforge_wearchange_timer.Start(250);
|
||||
|
||||
RecordStats();
|
||||
AutoGrantAAPoints();
|
||||
|
||||
@@ -5189,10 +5190,10 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
|
||||
con->level = GetLevelCon(t->GetLevel());
|
||||
|
||||
if (ClientVersion() <= EQ::versions::ClientVersion::Titanium) {
|
||||
if (con->level == CON_GRAY) {
|
||||
con->level = CON_GREEN;
|
||||
} else if (con->level == CON_WHITE) {
|
||||
con->level = CON_WHITE_TITANIUM;
|
||||
if (con->level == ConsiderColor::Gray) {
|
||||
con->level = ConsiderColor::Green;
|
||||
} else if (con->level == ConsiderColor::White) {
|
||||
con->level = ConsiderColor::WhiteTitanium;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5233,26 +5234,26 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
|
||||
if (t->IsRaidTarget()) {
|
||||
uint32 color = 0;
|
||||
switch (con->level) {
|
||||
case CON_GREEN:
|
||||
case ConsiderColor::Green:
|
||||
color = 2;
|
||||
break;
|
||||
case CON_LIGHTBLUE:
|
||||
case ConsiderColor::LightBlue:
|
||||
color = 10;
|
||||
break;
|
||||
case CON_BLUE:
|
||||
case ConsiderColor::DarkBlue:
|
||||
color = 4;
|
||||
break;
|
||||
case CON_WHITE_TITANIUM:
|
||||
case CON_WHITE:
|
||||
case ConsiderColor::WhiteTitanium:
|
||||
case ConsiderColor::White:
|
||||
color = 10;
|
||||
break;
|
||||
case CON_YELLOW:
|
||||
case ConsiderColor::Yellow:
|
||||
color = 15;
|
||||
break;
|
||||
case CON_RED:
|
||||
case ConsiderColor::Red:
|
||||
color = 13;
|
||||
break;
|
||||
case CON_GRAY:
|
||||
case ConsiderColor::Gray:
|
||||
color = 6;
|
||||
break;
|
||||
}
|
||||
@@ -11034,7 +11035,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
|
||||
// fix GUI sit button to be unpressed and stop sitting regen
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
mypet->SetAppearance(eaStanding);
|
||||
if (mypet->GetPetOrder() == SPO_Sit || mypet->GetPetOrder() == SPO_FeignDeath) {
|
||||
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
|
||||
mypet->SetAppearance(eaStanding);
|
||||
}
|
||||
|
||||
zone->AddAggroMob();
|
||||
// classic acts like qattack
|
||||
@@ -11081,7 +11085,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
|
||||
// fix GUI sit button to be unpressed and stop sitting regen
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
mypet->SetAppearance(eaStanding);
|
||||
if (mypet->GetPetOrder() == SPO_Sit || mypet->GetPetOrder() == SPO_FeignDeath) {
|
||||
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
|
||||
mypet->SetAppearance(eaStanding);
|
||||
}
|
||||
|
||||
zone->AddAggroMob();
|
||||
mypet->AddToHateList(GetTarget(), 1, 0, true, false, false, SPELL_UNKNOWN, true);
|
||||
@@ -11147,7 +11154,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
// Set Sit button to unpressed - send stand anim/end hpregen
|
||||
mypet->SetFeigned(false);
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
|
||||
mypet->SetAppearance(eaStanding);
|
||||
|
||||
mypet->SayString(this, Chat::PetResponse, PET_GUARDINGLIFE);
|
||||
mypet->SetPetOrder(SPO_Guard);
|
||||
@@ -11172,7 +11179,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
|
||||
// fix GUI sit button to be unpressed - send stand anim/end hpregen
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
|
||||
mypet->SetAppearance(eaStanding);
|
||||
|
||||
if (mypet->IsPetStop()) {
|
||||
mypet->SetPetStop(false);
|
||||
@@ -11220,7 +11227,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
|
||||
// Set Sit button to unpressed - send stand anim/end hpregen
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
|
||||
mypet->SetAppearance(eaStanding);
|
||||
|
||||
if (mypet->IsPetStop()) {
|
||||
mypet->SetPetStop(false);
|
||||
@@ -11237,8 +11244,8 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
{
|
||||
mypet->SetFeigned(false);
|
||||
mypet->SayString(this, Chat::PetResponse, PET_SIT_STRING);
|
||||
mypet->SetPetOrder(SPO_Follow);
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
|
||||
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
|
||||
mypet->SetAppearance(eaStanding);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -11248,7 +11255,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetRunAnimSpeed(0);
|
||||
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
|
||||
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Sitting);
|
||||
mypet->SetAppearance(eaSitting);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -11260,8 +11267,8 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetFeigned(false);
|
||||
mypet->SayString(this, Chat::PetResponse, PET_SIT_STRING);
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
mypet->SetPetOrder(SPO_Follow);
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
|
||||
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
|
||||
mypet->SetAppearance(eaStanding);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -11276,7 +11283,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetRunAnimSpeed(0);
|
||||
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
|
||||
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Sitting);
|
||||
mypet->SetAppearance(eaSitting);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -11481,7 +11488,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetPetOrder(SPO_FeignDeath);
|
||||
mypet->SetRunAnimSpeed(0);
|
||||
mypet->StopNavigation();
|
||||
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Lying);
|
||||
mypet->SetAppearance(eaDead);
|
||||
mypet->SetFeigned(true);
|
||||
mypet->SetTarget(nullptr);
|
||||
if (!mypet->UseBardSpellLogic()) {
|
||||
@@ -16011,11 +16018,11 @@ void Client::Handle_OP_WearChange(const EQApplicationPacket *app)
|
||||
return;
|
||||
|
||||
// Hero Forge ID needs to be fixed here as RoF2 appears to send an incorrect value.
|
||||
if (wc->hero_forge_model != 0 && wc->wear_slot_id >= 0 && wc->wear_slot_id < EQ::textures::weaponPrimary)
|
||||
if (wc->wear_slot_id >= 0 && wc->wear_slot_id < EQ::textures::weaponPrimary)
|
||||
wc->hero_forge_model = GetHerosForgeModel(wc->wear_slot_id);
|
||||
|
||||
// we could maybe ignore this and just send our own from moveitem
|
||||
entity_list.QueueClients(this, app, true);
|
||||
entity_list.QueueClients(this, app, false);
|
||||
}
|
||||
|
||||
void Client::Handle_OP_WhoAllRequest(const EQApplicationPacket *app)
|
||||
@@ -16773,7 +16780,7 @@ void Client::RecordStats()
|
||||
r.level = GetLevel();
|
||||
r.class_ = GetBaseClass();
|
||||
r.race = GetBaseRace();
|
||||
r.hp = GetMaxHP() - GetSpellBonuses().HP;
|
||||
r.hp = GetMaxHP() - GetSpellBonuses().FlatMaxHPChange;
|
||||
r.mana = GetMaxMana() - GetSpellBonuses().Mana;
|
||||
r.endurance = GetMaxEndurance() - GetSpellBonuses().Endurance;
|
||||
r.ac = GetDisplayAC() - GetSpellBonuses().AC;
|
||||
|
||||
@@ -213,25 +213,6 @@ bool Client::Process() {
|
||||
instalog = true;
|
||||
}
|
||||
|
||||
if (heroforge_wearchange_timer.Check()) {
|
||||
/*
|
||||
This addresses bug where on zone in heroforge models would not be sent to other clients when this was
|
||||
in Client::CompleteConnect(). Sending after a small 250 ms delay after that function resolves the issue.
|
||||
Unclear the underlying reason for this, if a better solution can be found then can move this back.
|
||||
*/
|
||||
if (queue_wearchange_slot >= 0) { //Resend slot from Client::SwapItem if heroforge item is swapped.
|
||||
SendWearChange(static_cast<uint8>(queue_wearchange_slot));
|
||||
}
|
||||
else { //Send from Client::CompleteConnect()
|
||||
SendWearChangeAndLighting(EQ::textures::LastTexture);
|
||||
Mob *pet = GetPet();
|
||||
if (pet) {
|
||||
pet->SendWearChangeAndLighting(EQ::textures::LastTexture);
|
||||
}
|
||||
}
|
||||
heroforge_wearchange_timer.Disable();
|
||||
}
|
||||
|
||||
if (IsStunned() && stunned_timer.Check())
|
||||
Mob::UnStun();
|
||||
|
||||
|
||||
+2
-11
@@ -25,15 +25,6 @@ namespace Archetype {
|
||||
constexpr uint8 Melee = 3;
|
||||
};
|
||||
|
||||
#define CON_GREEN 2
|
||||
#define CON_LIGHTBLUE 18
|
||||
#define CON_BLUE 4
|
||||
#define CON_WHITE 10
|
||||
#define CON_WHITE_TITANIUM 20
|
||||
#define CON_YELLOW 15
|
||||
#define CON_RED 13
|
||||
#define CON_GRAY 6
|
||||
|
||||
#define DMG_BLOCKED -1
|
||||
#define DMG_PARRIED -2
|
||||
#define DMG_RIPOSTED -3
|
||||
@@ -287,7 +278,6 @@ struct StatBonuses {
|
||||
int32 AC;
|
||||
int64 HP;
|
||||
int64 HPRegen;
|
||||
int64 MaxHP; //same bonus as MaxHPChange when applied to spells and item bonuses
|
||||
int64 ManaRegen;
|
||||
int64 EnduranceRegen;
|
||||
int64 Mana;
|
||||
@@ -413,7 +403,7 @@ struct StatBonuses {
|
||||
int32 MeleeLifetap; //i
|
||||
int32 Vampirism; //i
|
||||
int32 HealRate; // Spell effect that influences effectiveness of heals
|
||||
int32 MaxHPChange; // percent change in hit points (aabonuses use variable MaxHP)
|
||||
int64 PercentMaxHPChange; // base: Max HP change by percentage value from spell effect/item worn effect/aa
|
||||
int16 SkillDmgTaken[EQ::skills::HIGHEST_SKILL + 2]; // All Skills + -1
|
||||
int32 HealAmt; // Item Effect
|
||||
int32 SpellDmg; // Item Effect
|
||||
@@ -513,6 +503,7 @@ struct StatBonuses {
|
||||
uint8 invisibility_verse_undead; // IVU level
|
||||
uint8 invisibility_verse_animal; // IVA level
|
||||
int32 ShieldTargetSpa[2]; // [0] base = % mitigation amount, [1] buff slot
|
||||
int64 FlatMaxHPChange; // base: Max HP change by a flat amount value from spell effect/item worn effect/aa
|
||||
|
||||
// AAs
|
||||
int32 TrapCircumvention; // reduce chance to trigger a trap.
|
||||
|
||||
@@ -5855,6 +5855,16 @@ uint16 Perl__get_race_bitmask(uint16 race_id)
|
||||
return GetPlayerRaceBit(race_id);
|
||||
}
|
||||
|
||||
std::string Perl__GetAutoLoginCharacterNameByAccountID(uint32 account_id)
|
||||
{
|
||||
return quest_manager.GetAutoLoginCharacterNameByAccountID(account_id);
|
||||
}
|
||||
|
||||
bool Perl__SetAutoLoginCharacterNameByAccountID(uint32 account_id, std::string character_name)
|
||||
{
|
||||
return quest_manager.SetAutoLoginCharacterNameByAccountID(account_id, character_name);
|
||||
}
|
||||
|
||||
void perl_register_quest()
|
||||
{
|
||||
perl::interpreter perl(PERL_GET_THX);
|
||||
@@ -5885,6 +5895,7 @@ void perl_register_quest()
|
||||
package.add("FlagInstanceByGroupLeader", &Perl__FlagInstanceByGroupLeader);
|
||||
package.add("FlagInstanceByRaidLeader", &Perl__FlagInstanceByRaidLeader);
|
||||
package.add("FlyMode", &Perl__FlyMode);
|
||||
package.add("GetAutoLoginCharacterNameByAccountID", &Perl__GetAutoLoginCharacterNameByAccountID);
|
||||
package.add("GetBotClassByID", &Perl__GetBotClassByID);
|
||||
package.add("GetBotGenderByID", &Perl__GetBotGenderByID);
|
||||
package.add("GetBotIDsByCharacterID", (perl::array(*)(uint32))&Perl__GetBotIDsByCharacterID);
|
||||
@@ -6159,6 +6170,7 @@ void perl_register_quest()
|
||||
package.add("RemoveFromInstanceByCharID", &Perl__RemoveFromInstanceByCharID);
|
||||
package.add("CheckInstanceByCharID", &Perl__CheckInstanceByCharID);
|
||||
package.add("SendMail", &Perl__SendMail);
|
||||
package.add("SetAutoLoginCharacterNameByAccountID", &Perl__SetAutoLoginCharacterNameByAccountID);
|
||||
package.add("SetRunning", &Perl__SetRunning);
|
||||
package.add("activespeakactivity", &Perl__activespeakactivity);
|
||||
package.add("activespeaktask", &Perl__activespeaktask);
|
||||
|
||||
+20
-20
@@ -146,25 +146,25 @@ uint64 Client::CalcEXP(uint8 consider_level, bool ignore_modifiers) {
|
||||
if (RuleB(Character,UseXPConScaling)) {
|
||||
if (consider_level != 0xFF) {
|
||||
switch (consider_level) {
|
||||
case CON_GRAY:
|
||||
case ConsiderColor::Gray:
|
||||
in_add_exp = 0;
|
||||
return 0;
|
||||
case CON_GREEN:
|
||||
case ConsiderColor::Green:
|
||||
in_add_exp = in_add_exp * RuleI(Character, GreenModifier) / 100;
|
||||
break;
|
||||
case CON_LIGHTBLUE:
|
||||
case ConsiderColor::LightBlue:
|
||||
in_add_exp = in_add_exp * RuleI(Character, LightBlueModifier) / 100;
|
||||
break;
|
||||
case CON_BLUE:
|
||||
case ConsiderColor::DarkBlue:
|
||||
in_add_exp = in_add_exp * RuleI(Character, BlueModifier) / 100;
|
||||
break;
|
||||
case CON_WHITE:
|
||||
case ConsiderColor::White:
|
||||
in_add_exp = in_add_exp * RuleI(Character, WhiteModifier) / 100;
|
||||
break;
|
||||
case CON_YELLOW:
|
||||
case ConsiderColor::Yellow:
|
||||
in_add_exp = in_add_exp * RuleI(Character, YellowModifier) / 100;
|
||||
break;
|
||||
case CON_RED:
|
||||
case ConsiderColor::Red:
|
||||
in_add_exp = in_add_exp * RuleI(Character, RedModifier) / 100;
|
||||
break;
|
||||
}
|
||||
@@ -222,22 +222,22 @@ float static GetConLevelModifierPercent(uint8 conlevel)
|
||||
{
|
||||
switch (conlevel)
|
||||
{
|
||||
case CON_GREEN:
|
||||
case ConsiderColor::Green:
|
||||
return (float)RuleI(Character, GreenModifier) / 100;
|
||||
break;
|
||||
case CON_LIGHTBLUE:
|
||||
case ConsiderColor::LightBlue:
|
||||
return (float)RuleI(Character, LightBlueModifier) / 100;
|
||||
break;
|
||||
case CON_BLUE:
|
||||
case ConsiderColor::DarkBlue:
|
||||
return (float)RuleI(Character, BlueModifier) / 100;
|
||||
break;
|
||||
case CON_WHITE:
|
||||
case ConsiderColor::White:
|
||||
return (float)RuleI(Character, WhiteModifier) / 100;
|
||||
break;
|
||||
case CON_YELLOW:
|
||||
case ConsiderColor::Yellow:
|
||||
return (float)RuleI(Character, YellowModifier) / 100;
|
||||
break;
|
||||
case CON_RED:
|
||||
case ConsiderColor::Red:
|
||||
return (float)RuleI(Character, RedModifier) / 100;
|
||||
break;
|
||||
default:
|
||||
@@ -249,7 +249,7 @@ void Client::CalculateNormalizedAAExp(uint64 &add_aaxp, uint8 conlevel, bool res
|
||||
{
|
||||
// Functionally this is the same as having the case in the switch, but this is
|
||||
// cleaner to read.
|
||||
if (CON_GRAY == conlevel || resexp)
|
||||
if (ConsiderColor::Gray == conlevel || resexp)
|
||||
{
|
||||
add_aaxp = 0;
|
||||
return;
|
||||
@@ -325,7 +325,7 @@ void Client::CalculateStandardAAExp(uint64 &add_aaxp, uint8 conlevel, bool resex
|
||||
|
||||
void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
|
||||
{
|
||||
if (IsLeadershipEXPOn() && (conlevel == CON_BLUE || conlevel == CON_WHITE || conlevel == CON_YELLOW || conlevel == CON_RED))
|
||||
if (IsLeadershipEXPOn() && (conlevel == ConsiderColor::DarkBlue || conlevel == ConsiderColor::White || conlevel == ConsiderColor::Yellow || conlevel == ConsiderColor::Red))
|
||||
{
|
||||
add_exp = static_cast<uint64>(static_cast<float>(add_exp) * 0.8f);
|
||||
|
||||
@@ -627,7 +627,7 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) {
|
||||
if (membercount > 1) {
|
||||
if (RuleI(Character, ShowExpValues) > 0) {
|
||||
Message(Chat::Experience, "You have gained %s party experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
} else if (zone->IsHotzone()) {
|
||||
} else if (zone->IsHotzone()) {
|
||||
Message(Chat::Experience, "You gain party experience (with a bonus)!");
|
||||
} else {
|
||||
MessageString(Chat::Experience, GAIN_GROUPXP);
|
||||
@@ -635,7 +635,7 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) {
|
||||
} else if (IsRaidGrouped()) {
|
||||
if (RuleI(Character, ShowExpValues) > 0) {
|
||||
Message(Chat::Experience, "You have gained %s raid experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
} else if (zone->IsHotzone()) {
|
||||
} else if (zone->IsHotzone()) {
|
||||
Message(Chat::Experience, "You gained raid experience (with a bonus)!");
|
||||
} else {
|
||||
MessageString(Chat::Experience, GAIN_RAIDEXP);
|
||||
@@ -643,7 +643,7 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) {
|
||||
} else {
|
||||
if (RuleI(Character, ShowExpValues) > 0) {
|
||||
Message(Chat::Experience, "You have gained %s experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
} else if (zone->IsHotzone()) {
|
||||
} else if (zone->IsHotzone()) {
|
||||
Message(Chat::Experience, "You gain experience (with a bonus)!");
|
||||
} else {
|
||||
MessageString(Chat::Experience, GAIN_XP);
|
||||
@@ -1158,7 +1158,7 @@ void Group::SplitExp(const uint64 exp, Mob* other) {
|
||||
}
|
||||
|
||||
const uint8 consider_level = Mob::GetLevelCon(highest_level, other->GetLevel());
|
||||
if (consider_level == CON_GRAY) {
|
||||
if (consider_level == ConsiderColor::Gray) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1204,7 +1204,7 @@ void Raid::SplitExp(const uint64 exp, Mob* other) {
|
||||
raid_experience = static_cast<uint64>(static_cast<float>(raid_experience) * RuleR(Character, FinalRaidExpMultiplier));
|
||||
|
||||
const auto consider_level = Mob::GetLevelCon(highest_level, other->GetLevel());
|
||||
if (consider_level == CON_GRAY) {
|
||||
if (consider_level == ConsiderColor::Gray) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -71,7 +71,7 @@ void Mob::CheckFlee()
|
||||
}
|
||||
|
||||
// If no special flee_percent check for Gray or Other con rates
|
||||
if (GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && flee_ratio == 0 && RuleB(Combat, FleeGray) &&
|
||||
if (GetLevelCon(hate_top->GetLevel(), GetLevel()) == ConsiderColor::Gray && flee_ratio == 0 && RuleB(Combat, FleeGray) &&
|
||||
GetLevel() <= RuleI(Combat, FleeGrayMaxLevel)) {
|
||||
flee_ratio = RuleI(Combat, FleeGrayHPRatio);
|
||||
LogFlee("Mob [{}] using combat flee gray hp_ratio [{}] flee_ratio [{}]", GetCleanName(), hp_ratio, flee_ratio);
|
||||
@@ -110,16 +110,16 @@ void Mob::CheckFlee()
|
||||
int flee_chance;
|
||||
switch (con) {
|
||||
//these values are not 100% researched
|
||||
case CON_GRAY:
|
||||
case ConsiderColor::Gray:
|
||||
flee_chance = 100;
|
||||
break;
|
||||
case CON_GREEN:
|
||||
case ConsiderColor::Green:
|
||||
flee_chance = 90;
|
||||
break;
|
||||
case CON_LIGHTBLUE:
|
||||
case ConsiderColor::LightBlue:
|
||||
flee_chance = 90;
|
||||
break;
|
||||
case CON_BLUE:
|
||||
case ConsiderColor::DarkBlue:
|
||||
flee_chance = 80;
|
||||
break;
|
||||
default:
|
||||
@@ -175,7 +175,7 @@ void Mob::ProcessFlee()
|
||||
Mob *hate_top = GetHateTop();
|
||||
|
||||
// If no special flee_percent check for Gray or Other con rates
|
||||
if(hate_top != nullptr && GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) {
|
||||
if(hate_top != nullptr && GetLevelCon(hate_top->GetLevel(), GetLevel()) == ConsiderColor::Gray && fleeratio == 0 && RuleB(Combat, FleeGray)) {
|
||||
fleeratio = RuleI(Combat, FleeGrayHPRatio);
|
||||
} else if(fleeratio == 0) {
|
||||
fleeratio = RuleI(Combat, FleeHPRatio );
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "set/alternate_currency.cpp"
|
||||
#include "set/animation.cpp"
|
||||
#include "set/anon.cpp"
|
||||
#include "set/auto_login.cpp"
|
||||
#include "set/bind_point.cpp"
|
||||
#include "set/checksum.cpp"
|
||||
#include "set/class_permanent.cpp"
|
||||
@@ -71,6 +72,7 @@ void command_set(Client *c, const Seperator *sep)
|
||||
Cmd{.cmd = "alternate_currency", .u = "alternate_currency [Currency ID] [Amount]", .fn = SetAlternateCurrency, .a = {"#setaltcurrency"}},
|
||||
Cmd{.cmd = "animation", .u = "animation [Animation ID]", .fn = SetAnimation, .a = {"#setanim"}},
|
||||
Cmd{.cmd = "anon", .u = "anon [Character ID] [Anonymous Flag] or #set anon [Anonymous Flag]", .fn = SetAnon, .a = {"#setanon"}},
|
||||
Cmd{.cmd = "auto_login", .u = "auto_login [0|1]", .fn = SetAutoLogin, .a = {"#setautologin"}},
|
||||
Cmd{.cmd = "bind_point", .u = "bind_point", .fn = SetBindPoint, .a = {"#setbind"}},
|
||||
Cmd{.cmd = "checksum", .u = "checksum", .fn = SetChecksum, .a = {"#updatechecksum"}},
|
||||
Cmd{.cmd = "class_permanent", .u = "class_permanent [Class ID]", .fn = SetClassPermanent, .a = {"#permaclass"}},
|
||||
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#include "../../client.h"
|
||||
#include "../../groups.h"
|
||||
#include "../../raids.h"
|
||||
#include "../../raids.h"
|
||||
#include "../../common/repositories/account_repository.h"
|
||||
|
||||
void SetAutoLogin(Client* c, const Seperator* sep)
|
||||
{
|
||||
if (!RuleB(World, EnableAutoLogin)) {
|
||||
c->Message(Chat::White, "Auto login is disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
const uint16 arguments = sep->argnum;
|
||||
if (arguments < 2 || !sep->IsNumber(2)) {
|
||||
c->Message(Chat::White, "Usage: #set auto_login [0|1]");
|
||||
c->Message(Chat::White, "0 = Disable auto login for your account");
|
||||
c->Message(Chat::White, "1 = Set auto login character to your current character");
|
||||
return;
|
||||
}
|
||||
|
||||
Client* t = c;
|
||||
if (c->GetGM() && c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
t = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
auto e = AccountRepository::FindOne(database, t->AccountID());
|
||||
|
||||
if (!e.id) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Failed to find an account entry for {}.",
|
||||
c->GetTargetDescription(t)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const bool set_login = Strings::ToBool(sep->arg[2]);
|
||||
|
||||
e.auto_login_charname = set_login ? t->GetCleanName() : std::string();
|
||||
|
||||
AccountRepository::UpdateOne(database, e);
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Auto login character has been set to '{}' for {}.",
|
||||
e.auto_login_charname,
|
||||
c->GetTargetDescription(t)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "show/aas.cpp"
|
||||
#include "show/aa_points.cpp"
|
||||
#include "show/aggro.cpp"
|
||||
#include "show/auto_login.cpp"
|
||||
#include "show/buffs.cpp"
|
||||
#include "show/buried_corpse_count.cpp"
|
||||
#include "show/client_version_summary.cpp"
|
||||
@@ -62,6 +63,7 @@ void command_show(Client *c, const Seperator *sep)
|
||||
Cmd{.cmd = "aas", .u = "aas", .fn = ShowAAs, .a = {"#showaas"}},
|
||||
Cmd{.cmd = "aa_points", .u = "aa_points", .fn = ShowAAPoints, .a = {"#showaapoints", "#showaapts"}},
|
||||
Cmd{.cmd = "aggro", .u = "aggro [Distance] [-v] (-v is verbose Faction Information)", .fn = ShowAggro, .a = {"#aggro"}},
|
||||
Cmd{.cmd = "auto_login", .u = "auto_login", .fn = ShowAutoLogin, .a = {"#showautologin"}},
|
||||
Cmd{.cmd = "buffs", .u = "buffs", .fn = ShowBuffs, .a = {"#showbuffs"}},
|
||||
Cmd{.cmd = "buried_corpse_count", .u = "buried_corpse_count", .fn = ShowBuriedCorpseCount, .a = {"#getplayerburiedcorpsecount"}},
|
||||
Cmd{.cmd = "client_version_summary", .u = "client_version_summary", .fn = ShowClientVersionSummary, .a = {"#cvs"}},
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#include "../../client.h"
|
||||
#include "../../common/repositories/account_repository.h"
|
||||
|
||||
void ShowAutoLogin(Client* c, const Seperator* sep)
|
||||
{
|
||||
if (!RuleB(World, EnableAutoLogin)) {
|
||||
c->Message(Chat::White, "Auto login is disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
Client* t = c;
|
||||
if (c->GetGM() && c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
t = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
const auto& e = AccountRepository::FindOne(database, t->AccountID());
|
||||
|
||||
if (!e.id) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Failed to find an account entry for {}.",
|
||||
c->GetTargetDescription(t)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Auto login character for {} is set to '{}'.",
|
||||
c->GetTargetDescription(t),
|
||||
e.auto_login_charname
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
@@ -793,7 +793,6 @@ bool Group::DelMember(Mob* oldmember, bool ignoresender)
|
||||
return true;
|
||||
}
|
||||
|
||||
// does the caster + group
|
||||
void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
|
||||
uint32 z;
|
||||
float range, distance;
|
||||
@@ -807,8 +806,6 @@ void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
|
||||
float range2 = range*range;
|
||||
float min_range2 = spells[spell_id].min_range * spells[spell_id].min_range;
|
||||
|
||||
// caster->SpellOnTarget(spell_id, caster);
|
||||
|
||||
for(z=0; z < MAX_GROUP_MEMBERS; z++)
|
||||
{
|
||||
if(members[z] == caster) {
|
||||
|
||||
@@ -2258,10 +2258,6 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if (dst_slot_id <= EQ::invslot::EQUIPMENT_END) {// on Titanium and ROF2 /showhelm works even if sending helm slot
|
||||
SendWearChange(matslot);
|
||||
}
|
||||
// This is part of a bug fix to ensure heroforge graphics display to other clients in zone.
|
||||
if (queue_wearchange_slot >= 0) {
|
||||
heroforge_wearchange_timer.Start(100);
|
||||
}
|
||||
|
||||
// Step 7: Save change to the database
|
||||
if (src_slot_id == EQ::invslot::slotCursor) {
|
||||
|
||||
+39
-2
@@ -22,7 +22,7 @@ void NPC::AddLootTable(uint32 loottable_id, bool is_global)
|
||||
if (!npctype_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!is_global) {
|
||||
m_loot_copper = 0;
|
||||
m_loot_silver = 0;
|
||||
@@ -145,11 +145,30 @@ void NPC::AddLootDropTable(uint32 lootdrop_id, uint8 drop_limit, uint8 min_drop)
|
||||
"-- NPC [{}] Lootdrop [{}] Item [{}] ({}_ Chance [{}] Multiplier [{}]",
|
||||
GetCleanName(),
|
||||
lootdrop_id,
|
||||
database.GetItem(e.item_id)->Name,
|
||||
database.GetItem(e.item_id) ? database.GetItem(e.item_id)->Name : "Unknown",
|
||||
e.item_id,
|
||||
e.chance,
|
||||
e.multiplier
|
||||
);
|
||||
|
||||
if (!content_service.DoesPassContentFiltering(
|
||||
ContentFlags{
|
||||
.min_expansion = e.min_expansion,
|
||||
.max_expansion = e.max_expansion,
|
||||
.content_flags = e.content_flags,
|
||||
.content_flags_disabled = e.content_flags_disabled
|
||||
}
|
||||
)) {
|
||||
LogLoot(
|
||||
"-- NPC [{}] Lootdrop [{}] Item [{}] ({}) does not pass content filtering",
|
||||
GetCleanName(),
|
||||
lootdrop_id,
|
||||
e.item_id,
|
||||
database.GetItem(e.item_id) ? database.GetItem(e.item_id)->Name : "Unknown"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int j = 0; j < e.multiplier; ++j) {
|
||||
if (zone->random.Real(0.0, 100.0) <= e.chance && MeetsLootDropLevelRequirements(e, true)) {
|
||||
const EQ::ItemData *database_item = database.GetItem(e.item_id);
|
||||
@@ -215,6 +234,24 @@ void NPC::AddLootDropTable(uint32 lootdrop_id, uint8 drop_limit, uint8 min_drop)
|
||||
if (drops < min_drop || roll_table_chance_bypass || (float) zone->random.Real(0.0, 1.0) >= no_loot_prob) {
|
||||
float roll = (float) zone->random.Real(0.0, roll_t);
|
||||
for (const auto &e: le) {
|
||||
if (!content_service.DoesPassContentFiltering(
|
||||
ContentFlags{
|
||||
.min_expansion = e.min_expansion,
|
||||
.max_expansion = e.max_expansion,
|
||||
.content_flags = e.content_flags,
|
||||
.content_flags_disabled = e.content_flags_disabled
|
||||
}
|
||||
)) {
|
||||
LogLoot(
|
||||
"-- NPC [{}] Lootdrop [{}] Item [{}] ({}) does not pass content filtering",
|
||||
GetCleanName(),
|
||||
lootdrop_id,
|
||||
e.item_id,
|
||||
database.GetItem(e.item_id) ? database.GetItem(e.item_id)->Name : "Unknown"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto *db_item = database.GetItem(e.item_id);
|
||||
if (db_item) {
|
||||
// if it doesn't meet the requirements do nothing
|
||||
|
||||
@@ -3345,6 +3345,24 @@ luabind::object Lua_Client::GetRaidOrGroupOrSelf(lua_State* L, bool clients_only
|
||||
return t;
|
||||
}
|
||||
|
||||
std::string Lua_Client::GetAutoLoginCharacterName()
|
||||
{
|
||||
Lua_Safe_Call_String();
|
||||
return quest_manager.GetAutoLoginCharacterNameByAccountID(self->AccountID());
|
||||
}
|
||||
|
||||
bool Lua_Client::SetAutoLoginCharacterName()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return quest_manager.SetAutoLoginCharacterNameByAccountID(self->AccountID(), self->GetCleanName());
|
||||
}
|
||||
|
||||
bool Lua_Client::SetAutoLoginCharacterName(std::string character_name)
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return quest_manager.SetAutoLoginCharacterNameByAccountID(self->AccountID(), character_name);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_client() {
|
||||
return luabind::class_<Lua_Client, Lua_Mob>("Client")
|
||||
.def(luabind::constructor<>())
|
||||
@@ -3481,6 +3499,7 @@ luabind::scope lua_register_client() {
|
||||
.def("GetAnon", (int(Lua_Client::*)(void))&Lua_Client::GetAnon)
|
||||
.def("GetAugmentIDAt", (int(Lua_Client::*)(int,int))&Lua_Client::GetAugmentIDAt)
|
||||
.def("GetAugmentIDsBySlotID", (luabind::object(Lua_Client::*)(lua_State* L,int16))&Lua_Client::GetAugmentIDsBySlotID)
|
||||
.def("GetAutoLoginCharacterName", (std::string(Lua_Client::*)(void))&Lua_Client::GetAutoLoginCharacterName)
|
||||
.def("GetBaseAGI", (int(Lua_Client::*)(void))&Lua_Client::GetBaseAGI)
|
||||
.def("GetBaseCHA", (int(Lua_Client::*)(void))&Lua_Client::GetBaseCHA)
|
||||
.def("GetBaseDEX", (int(Lua_Client::*)(void))&Lua_Client::GetBaseDEX)
|
||||
@@ -3774,6 +3793,8 @@ luabind::scope lua_register_client() {
|
||||
.def("SetAccountFlag", (void(Lua_Client::*)(const std::string&,const std::string&))&Lua_Client::SetAccountFlag)
|
||||
.def("SetAlternateCurrencyValue", (void(Lua_Client::*)(uint32,uint32))&Lua_Client::SetAlternateCurrencyValue)
|
||||
.def("SetAnon", (void(Lua_Client::*)(uint8))&Lua_Client::SetAnon)
|
||||
.def("SetAutoLoginCharacterName", (bool(Lua_Client::*)(void))&Lua_Client::SetAutoLoginCharacterName)
|
||||
.def("SetAutoLoginCharacterName", (bool(Lua_Client::*)(std::string))&Lua_Client::SetAutoLoginCharacterName)
|
||||
.def("SetBaseClass", (void(Lua_Client::*)(int))&Lua_Client::SetBaseClass)
|
||||
.def("SetBaseGender", (void(Lua_Client::*)(int))&Lua_Client::SetBaseGender)
|
||||
.def("SetBaseRace", (void(Lua_Client::*)(int))&Lua_Client::SetBaseRace)
|
||||
|
||||
@@ -499,6 +499,9 @@ public:
|
||||
bool IsInAGuild();
|
||||
luabind::object GetRaidOrGroupOrSelf(lua_State* L);
|
||||
luabind::object GetRaidOrGroupOrSelf(lua_State* L, bool clients_only);
|
||||
std::string GetAutoLoginCharacterName();
|
||||
bool SetAutoLoginCharacterName();
|
||||
bool SetAutoLoginCharacterName(std::string character_name);
|
||||
|
||||
void ApplySpell(int spell_id);
|
||||
void ApplySpell(int spell_id, int duration);
|
||||
|
||||
@@ -5488,6 +5488,14 @@ uint16 lua_get_race_bitmask(uint16 race_id) {
|
||||
return GetPlayerRaceBit(race_id);
|
||||
}
|
||||
|
||||
std::string lua_get_auto_login_character_name_by_account_id(uint32 account_id) {
|
||||
return quest_manager.GetAutoLoginCharacterNameByAccountID(account_id);
|
||||
}
|
||||
|
||||
bool lua_set_auto_login_character_name_by_account_id(uint32 account_id, std::string character_name) {
|
||||
return quest_manager.SetAutoLoginCharacterNameByAccountID(account_id, character_name);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -6287,6 +6295,8 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("get_class_bitmask", &lua_get_class_bitmask),
|
||||
luabind::def("get_deity_bitmask", &lua_get_deity_bitmask),
|
||||
luabind::def("get_race_bitmask", &lua_get_race_bitmask),
|
||||
luabind::def("get_auto_login_character_name_by_account_id", &lua_get_auto_login_character_name_by_account_id),
|
||||
luabind::def("set_auto_login_character_name_by_account_id", &lua_set_auto_login_character_name_by_account_id),
|
||||
/*
|
||||
Cross Zone
|
||||
*/
|
||||
|
||||
@@ -3357,6 +3357,18 @@ bool Lua_Mob::IsWisdomCasterClass()
|
||||
return self->IsWisdomCasterClass();
|
||||
}
|
||||
|
||||
std::string Lua_Mob::GetConsiderColor(Lua_Mob other)
|
||||
{
|
||||
Lua_Safe_Call_String();
|
||||
return EQ::constants::GetConsiderColorName(self->GetLevelCon(other.GetLevel()));
|
||||
}
|
||||
|
||||
std::string Lua_Mob::GetConsiderColor(uint8 other_level)
|
||||
{
|
||||
Lua_Safe_Call_String();
|
||||
return EQ::constants::GetConsiderColorName(self->GetLevelCon(other_level));
|
||||
}
|
||||
|
||||
luabind::scope lua_register_mob() {
|
||||
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
|
||||
.def(luabind::constructor<>())
|
||||
@@ -3576,6 +3588,8 @@ luabind::scope lua_register_mob() {
|
||||
.def("GetCloseMobList", (Lua_Mob_List(Lua_Mob::*)(void))&Lua_Mob::GetCloseMobList)
|
||||
.def("GetCloseMobList", (Lua_Mob_List(Lua_Mob::*)(float))&Lua_Mob::GetCloseMobList)
|
||||
.def("GetCloseMobList", (Lua_Mob_List(Lua_Mob::*)(float,bool))&Lua_Mob::GetCloseMobList)
|
||||
.def("GetConsiderColor", (std::string(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetConsiderColor)
|
||||
.def("GetConsiderColor", (std::string(Lua_Mob::*)(uint8))&Lua_Mob::GetConsiderColor)
|
||||
.def("GetCorruption", &Lua_Mob::GetCorruption)
|
||||
.def("GetDEX", &Lua_Mob::GetDEX)
|
||||
.def("GetDR", &Lua_Mob::GetDR)
|
||||
|
||||
@@ -590,6 +590,8 @@ public:
|
||||
bool IsIntelligenceCasterClass();
|
||||
bool IsPureMeleeClass();
|
||||
bool IsWisdomCasterClass();
|
||||
std::string GetConsiderColor(Lua_Mob other);
|
||||
std::string GetConsiderColor(uint8 other_level);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,8 @@ void LuaMod::Init()
|
||||
m_has_common_outgoing_hit_success = parser_->HasFunction("CommonOutgoingHitSuccess", package_name_);
|
||||
m_has_calc_spell_effect_value_formula = parser_->HasFunction("CalcSpellEffectValue_formula", package_name_);
|
||||
m_has_register_bug = parser_->HasFunction("RegisterBug", package_name_);
|
||||
m_has_common_damage = parser_->HasFunction("CommonDamage", package_name_);
|
||||
m_has_heal_damage = parser_->HasFunction("HealDamage", package_name_);
|
||||
}
|
||||
|
||||
void PutDamageHitInfo(lua_State *L, luabind::adl::object &e, DamageHitInfo &hit) {
|
||||
|
||||
@@ -16,6 +16,11 @@ int64 Lua_StatBonuses::GetHP() const {
|
||||
return self->HP;
|
||||
}
|
||||
|
||||
int64 Lua_StatBonuses::GetFlatMaxHPChange() const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->FlatMaxHPChange;
|
||||
}
|
||||
|
||||
int64 Lua_StatBonuses::GetHPRegen() const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->HPRegen;
|
||||
@@ -23,7 +28,7 @@ int64 Lua_StatBonuses::GetHPRegen() const {
|
||||
|
||||
int64 Lua_StatBonuses::GetMaxHP() const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->MaxHP;
|
||||
return self->PercentMaxHPChange;
|
||||
}
|
||||
|
||||
int64 Lua_StatBonuses::GetManaRegen() const {
|
||||
@@ -608,7 +613,7 @@ int32 Lua_StatBonuses::GetHealRate() const {
|
||||
|
||||
int32 Lua_StatBonuses::GetMaxHPChange() const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->MaxHPChange;
|
||||
return self->PercentMaxHPChange;
|
||||
}
|
||||
|
||||
int32 Lua_StatBonuses::GetHealAmt() const {
|
||||
@@ -1381,6 +1386,7 @@ luabind::scope lua_register_stat_bonuses() {
|
||||
.def("FeignedCastOnChance", &Lua_StatBonuses::GetFeignedCastOnChance)
|
||||
.def("FinishingBlow", &Lua_StatBonuses::GetFinishingBlow)
|
||||
.def("FinishingBlowLvl", &Lua_StatBonuses::GetFinishingBlowLvl)
|
||||
.def("FlatMaxHPChange", &Lua_StatBonuses::GetFlatMaxHPChange)
|
||||
.def("FlurryChance", &Lua_StatBonuses::GetFlurryChance)
|
||||
.def("FocusEffects", &Lua_StatBonuses::GetFocusEffects)
|
||||
.def("FocusEffectsWorn", &Lua_StatBonuses::GetFocusEffectsWorn)
|
||||
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
|
||||
int32 GetAC() const;
|
||||
int64 GetHP() const;
|
||||
int64 GetFlatMaxHPChange() const;
|
||||
int64 GetHPRegen() const;
|
||||
int64 GetMaxHP() const;
|
||||
int64 GetManaRegen() const;
|
||||
|
||||
+9
-9
@@ -461,10 +461,10 @@ int64 Merc::CalcMaxHP() {
|
||||
//but the actual effect sent on live causes the client
|
||||
//to apply it to (basehp + itemhp).. I will oblige to the client's whims over
|
||||
//the aa description
|
||||
nd += aabonuses.MaxHP + spellbonuses.MaxHPChange + itembonuses.MaxHPChange; //Natural Durability, Physical Enhancement, Planar Durability
|
||||
nd += aabonuses.PercentMaxHPChange + spellbonuses.PercentMaxHPChange + itembonuses.PercentMaxHPChange; //Natural Durability, Physical Enhancement, Planar Durability
|
||||
|
||||
max_hp = (float)max_hp * (float)nd / (float)10000; //this is to fix the HP-above-495k issue
|
||||
max_hp += spellbonuses.HP + aabonuses.HP;
|
||||
max_hp += spellbonuses.FlatMaxHPChange + aabonuses.FlatMaxHPChange + itembonuses.FlatMaxHPChange;
|
||||
|
||||
max_hp += GroupLeadershipAAHealthEnhancement();
|
||||
|
||||
@@ -3794,37 +3794,37 @@ bool Merc::CheckConfidence() {
|
||||
switch(CurrentCon) {
|
||||
|
||||
|
||||
case CON_GRAY: {
|
||||
case ConsiderColor::Gray: {
|
||||
ConRating = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_GREEN: {
|
||||
case ConsiderColor::Green: {
|
||||
ConRating = 0.1;
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_LIGHTBLUE: {
|
||||
case ConsiderColor::LightBlue: {
|
||||
ConRating = 0.2;
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_BLUE: {
|
||||
case ConsiderColor::DarkBlue: {
|
||||
ConRating = 0.6;
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_WHITE: {
|
||||
case ConsiderColor::White: {
|
||||
ConRating = 1.0;
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_YELLOW: {
|
||||
case ConsiderColor::Yellow: {
|
||||
ConRating = 1.2;
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_RED: {
|
||||
case ConsiderColor::Red: {
|
||||
ConRating = 1.5;
|
||||
break;
|
||||
}
|
||||
|
||||
+33
-16
@@ -442,6 +442,7 @@ Mob::Mob(
|
||||
weaponstance.aabonus_buff_spell_id = 0;
|
||||
|
||||
pStandingPetOrder = SPO_Follow;
|
||||
m_previous_pet_order = SPO_Follow;
|
||||
pseudo_rooted = false;
|
||||
|
||||
nobuff_invisible = 0;
|
||||
@@ -506,8 +507,6 @@ Mob::Mob(
|
||||
use_double_melee_round_dmg_bonus = false;
|
||||
dw_same_delay = 0;
|
||||
|
||||
queue_wearchange_slot = -1;
|
||||
|
||||
m_manual_follow = false;
|
||||
|
||||
mob_close_scan_timer.Trigger();
|
||||
@@ -637,6 +636,16 @@ void Mob::CalcInvisibleLevel()
|
||||
BreakCharmPetIfConditionsMet();
|
||||
}
|
||||
|
||||
void Mob::SetPetOrder(eStandingPetOrder i) {
|
||||
if (i == SPO_Sit || i == SPO_FeignDeath) {
|
||||
if (pStandingPetOrder == SPO_Follow || pStandingPetOrder == SPO_Guard) {
|
||||
m_previous_pet_order = pStandingPetOrder;
|
||||
}
|
||||
}
|
||||
|
||||
pStandingPetOrder = i;
|
||||
}
|
||||
|
||||
void Mob::SetInvisible(uint8 state, bool set_on_bonus_calc) {
|
||||
if (state == Invisibility::Visible) {
|
||||
SendAppearancePacket(AppearanceType::Invisibility, Invisibility::Visible);
|
||||
@@ -958,8 +967,9 @@ int64 Mob::CalcMaxMana()
|
||||
}
|
||||
|
||||
int64 Mob::CalcMaxHP() {
|
||||
max_hp = (base_hp + itembonuses.HP + spellbonuses.HP);
|
||||
max_hp += max_hp * ((aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f);
|
||||
max_hp = (base_hp + itembonuses.HP);
|
||||
max_hp += max_hp * ((aabonuses.PercentMaxHPChange + spellbonuses.PercentMaxHPChange + itembonuses.PercentMaxHPChange) / 10000.0f);
|
||||
max_hp += spellbonuses.FlatMaxHPChange + itembonuses.FlatMaxHPChange + aabonuses.FlatMaxHPChange;
|
||||
|
||||
return max_hp;
|
||||
}
|
||||
@@ -967,14 +977,13 @@ int64 Mob::CalcMaxHP() {
|
||||
int64 Mob::GetItemHPBonuses() {
|
||||
int64 item_hp = 0;
|
||||
item_hp = itembonuses.HP;
|
||||
item_hp += item_hp * itembonuses.MaxHPChange / 10000;
|
||||
item_hp += item_hp * ((itembonuses.PercentMaxHPChange + spellbonuses.FlatMaxHPChange + aabonuses.FlatMaxHPChange) / 10000.0f);
|
||||
return item_hp;
|
||||
}
|
||||
|
||||
int64 Mob::GetSpellHPBonuses() {
|
||||
int64 spell_hp = 0;
|
||||
spell_hp = spellbonuses.HP;
|
||||
spell_hp += spell_hp * spellbonuses.MaxHPChange / 10000;
|
||||
spell_hp += spellbonuses.FlatMaxHPChange;
|
||||
return spell_hp;
|
||||
}
|
||||
|
||||
@@ -1647,6 +1656,22 @@ void Mob::SendHPUpdate(bool force_update_all)
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::SendRename(Mob *sender, const char* old_name, const char* new_name)
|
||||
{
|
||||
auto out2 = new EQApplicationPacket(OP_MobRename, sizeof(MobRename_Struct));
|
||||
auto data = (MobRename_Struct *)out2->pBuffer;
|
||||
out2->priority = 6;
|
||||
|
||||
strn0cpy(data->old_name, old_name, sizeof(data->old_name));
|
||||
strn0cpy(data->old_name_again, old_name, sizeof(data->old_name_again));
|
||||
strn0cpy(data->new_name, new_name, sizeof(data->new_name));
|
||||
data->unknown192 = 0;
|
||||
data->unknown196 = 1;
|
||||
|
||||
entity_list.QueueClients(sender, out2);
|
||||
safe_delete(out2);
|
||||
}
|
||||
|
||||
void Mob::StopMoving()
|
||||
{
|
||||
StopNavigation();
|
||||
@@ -4374,15 +4399,7 @@ void Mob::TempName(const char *newname)
|
||||
entity_list.MakeNameUnique(temp_name);
|
||||
|
||||
// Send the new name to all clients
|
||||
auto outapp = new EQApplicationPacket(OP_MobRename, sizeof(MobRename_Struct));
|
||||
MobRename_Struct* mr = (MobRename_Struct*) outapp->pBuffer;
|
||||
strn0cpy(mr->old_name, old_name, 64);
|
||||
strn0cpy(mr->old_name_again, old_name, 64);
|
||||
strn0cpy(mr->new_name, temp_name, 64);
|
||||
mr->unknown192 = 0;
|
||||
mr->unknown196 = 1;
|
||||
entity_list.QueueClients(this, outapp);
|
||||
safe_delete(outapp);
|
||||
SendRename(this, old_name, temp_name);
|
||||
|
||||
SetName(temp_name);
|
||||
}
|
||||
|
||||
+4
-3
@@ -589,6 +589,7 @@ public:
|
||||
inline const char* GetName() const { return name; }
|
||||
inline const char* GetOrigName() const { return orig_name; }
|
||||
inline const char* GetLastName() const { return lastname; }
|
||||
inline const eStandingPetOrder GetPreviousPetOrder() const { return m_previous_pet_order; }
|
||||
const char *GetCleanName();
|
||||
virtual void SetName(const char *new_name = nullptr) { new_name ? strn0cpy(name, new_name, 64) :
|
||||
strn0cpy(name, GetName(), 64); return; };
|
||||
@@ -829,6 +830,7 @@ public:
|
||||
void SendHPUpdate(bool force_update_all = false);
|
||||
virtual void ResetHPUpdateTimer() {}; // does nothing
|
||||
static void SetSpawnLastNameByClass(NewSpawn_Struct* ns);
|
||||
void SendRename(Mob* sender, const char* old_name, const char* new_name);
|
||||
|
||||
//Util
|
||||
static uint32 RandomTimer(int min, int max);
|
||||
@@ -1178,7 +1180,7 @@ public:
|
||||
inline const float GetAssistRange() const { return (spellbonuses.AssistRange == -1) ? pAssistRange : spellbonuses.AssistRange; }
|
||||
|
||||
|
||||
inline void SetPetOrder(eStandingPetOrder i) { pStandingPetOrder = i; }
|
||||
void SetPetOrder(eStandingPetOrder i);
|
||||
inline const eStandingPetOrder GetPetOrder() const { return pStandingPetOrder; }
|
||||
inline void SetHeld(bool nState) { held = nState; }
|
||||
inline const bool IsHeld() const { return held; }
|
||||
@@ -1667,8 +1669,6 @@ protected:
|
||||
int32 appearance_effects_id[MAX_APPEARANCE_EFFECTS];
|
||||
int32 appearance_effects_slot[MAX_APPEARANCE_EFFECTS];
|
||||
|
||||
int queue_wearchange_slot;
|
||||
|
||||
Timer shield_timer;
|
||||
uint32 m_shield_target_id;
|
||||
uint32 m_shielder_id;
|
||||
@@ -1774,6 +1774,7 @@ protected:
|
||||
|
||||
// MobAI stuff
|
||||
eStandingPetOrder pStandingPetOrder;
|
||||
eStandingPetOrder m_previous_pet_order;
|
||||
uint32 minLastFightingDelayMoving;
|
||||
uint32 maxLastFightingDelayMoving;
|
||||
float pAggroRange = 0;
|
||||
|
||||
+65
-65
@@ -2187,162 +2187,162 @@ uint32 Mob::GetLevelCon(uint8 mylevel, uint8 iOtherLevel) {
|
||||
int16 diff = iOtherLevel - mylevel;
|
||||
|
||||
if (diff == 0)
|
||||
return CON_WHITE;
|
||||
return ConsiderColor::White;
|
||||
else if (diff >= 1 && diff <= 2)
|
||||
return CON_YELLOW;
|
||||
return ConsiderColor::Yellow;
|
||||
else if (diff >= 3)
|
||||
return CON_RED;
|
||||
return ConsiderColor::Red;
|
||||
|
||||
if (mylevel <= 8)
|
||||
{
|
||||
if (diff <= -4)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 9)
|
||||
{
|
||||
if (diff <= -6)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -4)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 13)
|
||||
{
|
||||
if (diff <= -7)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -5)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 15)
|
||||
{
|
||||
if (diff <= -7)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -5)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 17)
|
||||
{
|
||||
if (diff <= -8)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -6)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 21)
|
||||
{
|
||||
if (diff <= -9)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -7)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 25)
|
||||
{
|
||||
if (diff <= -10)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -8)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 29)
|
||||
{
|
||||
if (diff <= -11)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -9)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 31)
|
||||
{
|
||||
if (diff <= -12)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -9)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 33)
|
||||
{
|
||||
if (diff <= -13)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -10)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 37)
|
||||
{
|
||||
if (diff <= -14)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -11)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 41)
|
||||
{
|
||||
if (diff <= -16)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -12)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 45)
|
||||
{
|
||||
if (diff <= -17)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -13)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 49)
|
||||
{
|
||||
if (diff <= -18)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -14)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 53)
|
||||
{
|
||||
if (diff <= -19)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -15)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else if (mylevel <= 55)
|
||||
{
|
||||
if (diff <= -20)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -15)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (diff <= -21)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else if (diff <= -16)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2352,42 +2352,42 @@ uint32 Mob::GetLevelCon(uint8 mylevel, uint8 iOtherLevel) {
|
||||
uint32 conGreenLvl = mylevel - (int32)((mylevel + 7) / 4);
|
||||
|
||||
if (diff == 0)
|
||||
return CON_WHITE;
|
||||
return ConsiderColor::White;
|
||||
else if (diff >= 1 && diff <= 3)
|
||||
return CON_YELLOW;
|
||||
return ConsiderColor::Yellow;
|
||||
else if (diff >= 4)
|
||||
return CON_RED;
|
||||
return ConsiderColor::Red;
|
||||
|
||||
if (mylevel <= 15)
|
||||
{
|
||||
if (diff <= -6)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else
|
||||
if (mylevel <= 20)
|
||||
{
|
||||
if (iOtherLevel <= conGrayLvl)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else
|
||||
if (iOtherLevel <= conGreenLvl)
|
||||
conlevel = CON_GREEN;
|
||||
conlevel = ConsiderColor::Green;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iOtherLevel <= conGrayLvl)
|
||||
conlevel = CON_GRAY;
|
||||
conlevel = ConsiderColor::Gray;
|
||||
else
|
||||
if (iOtherLevel <= conGreenLvl)
|
||||
conlevel = CON_GREEN;
|
||||
conlevel = ConsiderColor::Green;
|
||||
else
|
||||
if (diff <= -6)
|
||||
conlevel = CON_LIGHTBLUE;
|
||||
conlevel = ConsiderColor::LightBlue;
|
||||
else
|
||||
conlevel = CON_BLUE;
|
||||
conlevel = ConsiderColor::DarkBlue;
|
||||
}
|
||||
}
|
||||
return conlevel;
|
||||
|
||||
@@ -399,9 +399,6 @@ void Mob::SendWearChange(uint8 material_slot, Client *one_client)
|
||||
|
||||
w->wear_slot_id = material_slot;
|
||||
|
||||
// Part of a bug fix to ensure heroforge models send to other clients in zone.
|
||||
queue_wearchange_slot = w->hero_forge_model ? material_slot : -1;
|
||||
|
||||
if (!one_client) {
|
||||
entity_list.QueueClients(this, packet);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -3403,7 +3403,7 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
|
||||
* if they are in range, make sure we are not green...
|
||||
* then jump in if they are our friend
|
||||
*/
|
||||
if (mob->GetLevel() >= 50 || mob->AlwaysAggro() || attacker->GetLevelCon(mob->GetLevel()) != CON_GRAY) {
|
||||
if (mob->GetLevel() >= 50 || mob->AlwaysAggro() || attacker->GetLevelCon(mob->GetLevel()) != ConsiderColor::Gray) {
|
||||
if (mob->GetPrimaryFaction() == sender->CastToNPC()->GetPrimaryFaction()) {
|
||||
const auto f = zone->GetNPCFaction(mob->CastToNPC()->GetNPCFactionID());
|
||||
if (f) {
|
||||
|
||||
@@ -3148,6 +3148,21 @@ perl::array Perl_Client_GetRaidOrGroupOrSelf(Client* self, bool clients_only)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string Perl_Client_GetAutoLoginCharacterName(Client* self)
|
||||
{
|
||||
return quest_manager.GetAutoLoginCharacterNameByAccountID(self->AccountID());
|
||||
}
|
||||
|
||||
bool Perl_Client_SetAutoLoginCharacterName(Client* self)
|
||||
{
|
||||
return quest_manager.SetAutoLoginCharacterNameByAccountID(self->AccountID(), self->GetCleanName());
|
||||
}
|
||||
|
||||
bool Perl_Client_SetAutoLoginCharacterName(Client* self, std::string character_name)
|
||||
{
|
||||
return quest_manager.SetAutoLoginCharacterNameByAccountID(self->AccountID(), character_name);
|
||||
}
|
||||
|
||||
void perl_register_client()
|
||||
{
|
||||
perl::interpreter perl(PERL_GET_THX);
|
||||
@@ -3280,6 +3295,7 @@ void perl_register_client()
|
||||
package.add("GetAugmentAt", &Perl_Client_GetAugmentAt);
|
||||
package.add("GetAugmentIDAt", &Perl_Client_GetAugmentIDAt);
|
||||
package.add("GetAugmentIDsBySlotID", &Perl_Client_GetAugmentIDsBySlotID);
|
||||
package.add("GetAutoLoginCharacterName", &Perl_Client_GetAutoLoginCharacterName);
|
||||
package.add("GetBaseAGI", &Perl_Client_GetBaseAGI);
|
||||
package.add("GetBaseCHA", &Perl_Client_GetBaseCHA);
|
||||
package.add("GetBaseDEX", &Perl_Client_GetBaseDEX);
|
||||
@@ -3572,6 +3588,8 @@ void perl_register_client()
|
||||
package.add("SetAccountFlag", &Perl_Client_SetAccountFlag);
|
||||
package.add("SetAlternateCurrencyValue", &Perl_Client_SetAlternateCurrencyValue);
|
||||
package.add("SetAnon", &Perl_Client_SetAnon);
|
||||
package.add("SetAutoLoginCharacterName", (bool(*)(Client*))&Perl_Client_SetAutoLoginCharacterName);
|
||||
package.add("SetAutoLoginCharacterName", (bool(*)(Client*, std::string))&Perl_Client_SetAutoLoginCharacterName);
|
||||
package.add("SetBaseClass", &Perl_Client_SetBaseClass);
|
||||
package.add("SetBaseGender", &Perl_Client_SetBaseGender);
|
||||
package.add("SetBaseRace", &Perl_Client_SetBaseRace);
|
||||
|
||||
@@ -3468,6 +3468,16 @@ bool Perl_Mob_IsWisdomCasterClass(Mob* self)
|
||||
return self->IsWisdomCasterClass();
|
||||
}
|
||||
|
||||
std::string Perl_Mob_GetConsiderColor(Mob* self, Mob* other)
|
||||
{
|
||||
return EQ::constants::GetConsiderColorName(self->GetLevelCon(other->GetLevel()));
|
||||
}
|
||||
|
||||
std::string Perl_Mob_GetConsiderColor(Mob* self, uint8 other_level)
|
||||
{
|
||||
return EQ::constants::GetConsiderColorName(self->GetLevelCon(other_level));
|
||||
}
|
||||
|
||||
void perl_register_mob()
|
||||
{
|
||||
perl::interpreter perl(PERL_GET_THX);
|
||||
@@ -3670,6 +3680,8 @@ void perl_register_mob()
|
||||
package.add("GetCloseMobList", (perl::array(*)(Mob*))&Perl_Mob_GetCloseMobList);
|
||||
package.add("GetCloseMobList", (perl::array(*)(Mob*, float))&Perl_Mob_GetCloseMobList);
|
||||
package.add("GetCloseMobList", (perl::array(*)(Mob*, float, bool))&Perl_Mob_GetCloseMobList);
|
||||
package.add("GetConsiderColor", (std::string(*)(Mob*, Mob*))&Perl_Mob_GetConsiderColor);
|
||||
package.add("GetConsiderColor", (std::string(*)(Mob*, uint8))&Perl_Mob_GetConsiderColor);
|
||||
package.add("GetCorruption", &Perl_Mob_GetCorruption);
|
||||
package.add("GetDefaultRaceSize", (float(*)(Mob*))&Perl_Mob_GetDefaultRaceSize);
|
||||
package.add("GetDefaultRaceSize", (float(*)(Mob*, int))&Perl_Mob_GetDefaultRaceSize);
|
||||
|
||||
@@ -16,6 +16,11 @@ int64 Perl_StatBonuses_GetHP(StatBonuses* self)
|
||||
return self->HP;
|
||||
}
|
||||
|
||||
int64 Perl_StatBonuses_GetFlatMaxHPChange(StatBonuses* self)
|
||||
{
|
||||
return self->FlatMaxHPChange;
|
||||
}
|
||||
|
||||
int64 Perl_StatBonuses_GetHPRegen(StatBonuses* self)
|
||||
{
|
||||
return self->HPRegen;
|
||||
@@ -23,7 +28,7 @@ int64 Perl_StatBonuses_GetHPRegen(StatBonuses* self)
|
||||
|
||||
int64 Perl_StatBonuses_GetMaxHP(StatBonuses* self)
|
||||
{
|
||||
return self->MaxHP;
|
||||
return self->PercentMaxHPChange;
|
||||
}
|
||||
|
||||
int64 Perl_StatBonuses_GetManaRegen(StatBonuses* self)
|
||||
@@ -608,7 +613,7 @@ int32 Perl_StatBonuses_GetHealRate(StatBonuses* self)
|
||||
|
||||
int32 Perl_StatBonuses_GetMaxHPChange(StatBonuses* self)
|
||||
{
|
||||
return self->MaxHPChange;
|
||||
return self->PercentMaxHPChange;
|
||||
}
|
||||
|
||||
int32 Perl_StatBonuses_GetHealAmt(StatBonuses* self)
|
||||
@@ -1532,6 +1537,7 @@ void perl_register_stat_bonuses()
|
||||
package.add("GetStringedModifier", &Perl_StatBonuses_GetStringedModifier);
|
||||
package.add("GetStunBashChance", &Perl_StatBonuses_GetStunBashChance);
|
||||
package.add("GetStunResist", &Perl_StatBonuses_GetStunResist);
|
||||
package.add("GetFlatMaxHPChange", &Perl_StatBonuses_GetFlatMaxHPChange);
|
||||
package.add("GetTradeSkillMastery", &Perl_StatBonuses_GetTradeSkillMastery);
|
||||
package.add("GetTriggerMeleeThreshold", &Perl_StatBonuses_GetTriggerMeleeThreshold);
|
||||
package.add("GetTriggerOnValueAmount", &Perl_StatBonuses_GetTriggerOnValueAmount);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "zonedb.h"
|
||||
#include "dialogue_window.h"
|
||||
|
||||
#include "../common/repositories/account_repository.h"
|
||||
#include "../common/repositories/tradeskill_recipe_repository.h"
|
||||
#include "../common/repositories/instance_list_repository.h"
|
||||
#include "../common/repositories/grid_entries_repository.h"
|
||||
@@ -4893,3 +4894,13 @@ void QuestManager::SendPlayerHandinEvent() {
|
||||
RecordPlayerEventLogWithClient(initiator, PlayerEvent::NPC_HANDIN, e);
|
||||
}
|
||||
}
|
||||
|
||||
std::string QuestManager::GetAutoLoginCharacterNameByAccountID(uint32 account_id)
|
||||
{
|
||||
return AccountRepository::GetAutoLoginCharacterNameByAccountID(database, account_id);
|
||||
}
|
||||
|
||||
bool QuestManager::SetAutoLoginCharacterNameByAccountID(uint32 account_id, const std::string& character_name)
|
||||
{
|
||||
return AccountRepository::SetAutoLoginCharacterNameByAccountID(database, account_id, character_name);
|
||||
}
|
||||
|
||||
@@ -353,6 +353,8 @@ public:
|
||||
void SendChannelMessage(uint8 channel_number, uint32 guild_id, uint8 language_id, uint8 language_skill, const char* message);
|
||||
void SendChannelMessage(Client* from, uint8 channel_number, uint32 guild_id, uint8 language_id, uint8 language_skill, const char* message);
|
||||
void SendChannelMessage(Client* from, const char* to, uint8 channel_number, uint32 guild_id, uint8 language_id, uint8 language_skill, const char* message);
|
||||
std::string GetAutoLoginCharacterNameByAccountID(uint32 account_id);
|
||||
bool SetAutoLoginCharacterNameByAccountID(uint32 account_id, const std::string& character_name);
|
||||
|
||||
Bot *GetBot() const;
|
||||
Client *GetInitiator() const;
|
||||
|
||||
+1
-1
@@ -2669,7 +2669,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
||||
Group *target_group = entity_list.GetGroupByMob(spell_target);
|
||||
if (target_group) {
|
||||
target_group->CastGroupSpell(this, spell_id);
|
||||
if (GetClass() != Class::Bard) {
|
||||
if (target_group != GetGroup() && GetClass() != Class::Bard) {
|
||||
SpellOnTarget(spell_id, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user