mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 508b37dc93 | |||
| 0adca46a73 | |||
| e920e35a5c | |||
| 20c01ef343 | |||
| 1567141c19 | |||
| 6bc9bcf15a | |||
| 86a2a86ba8 | |||
| 3e6924d10e |
@@ -1,3 +1,27 @@
|
|||||||
|
## [22.44.2] - 2/12/2024
|
||||||
|
|
||||||
|
### Bots
|
||||||
|
|
||||||
|
* Remove Alt Combat Functionality ([#4067](https://github.com/EQEmu/Server/pull/4067)) @Kinglykrab 2024-02-12
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
* Use explicit conversions for enum formatting ([#4064](https://github.com/EQEmu/Server/pull/4064)) @hgtw 2024-02-12
|
||||||
|
|
||||||
|
### Database
|
||||||
|
|
||||||
|
* Fix default value for `time_of_death` in `character_corpses` ([#4060](https://github.com/EQEmu/Server/pull/4060)) @joligario 2024-02-11
|
||||||
|
* Fix table name in manifest ([#4063](https://github.com/EQEmu/Server/pull/4063)) @joligario 2024-02-11
|
||||||
|
* Proper default for `droptime` from `object_contents` ([#4061](https://github.com/EQEmu/Server/pull/4061)) @joligario 2024-02-11
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Guard against crash condition ([#4062](https://github.com/EQEmu/Server/pull/4062)) @neckkola 2024-02-11
|
||||||
|
|
||||||
|
### Guilds
|
||||||
|
|
||||||
|
* Clean up `GUILD_RANK_NONE` references ([#4059](https://github.com/EQEmu/Server/pull/4059)) @joligario 2024-02-11
|
||||||
|
|
||||||
## [22.44.1] - 2/11/2024
|
## [22.44.1] - 2/11/2024
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|||||||
@@ -64,4 +64,6 @@ typedef enum {
|
|||||||
} bodyType;
|
} bodyType;
|
||||||
/* bodytypes above 64 make the mob not show up */
|
/* bodytypes above 64 make the mob not show up */
|
||||||
|
|
||||||
|
constexpr int format_as(bodyType type) { return static_cast<int>(type); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -5346,6 +5346,26 @@ CREATE TABLE guild_tributes (
|
|||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
)"
|
)"
|
||||||
},
|
},
|
||||||
|
ManifestEntry{
|
||||||
|
.version = 9261,
|
||||||
|
.description = "2024_02_11_character_corpses.sql",
|
||||||
|
.check = "SHOW COLUMNS FROM `character_corpses` LIKE 'time_of_death'",
|
||||||
|
.condition = "contains",
|
||||||
|
.match = "0000-00-00 00:00:00",
|
||||||
|
.sql = R"(
|
||||||
|
ALTER TABLE `character_corpses` MODIFY COLUMN `time_of_death` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||||
|
)"
|
||||||
|
},
|
||||||
|
ManifestEntry{
|
||||||
|
.version = 9262,
|
||||||
|
.description = "2024_02_11_object_contents.sql",
|
||||||
|
.check = "SHOW COLUMNS FROM `object_contents` LIKE 'droptime'",
|
||||||
|
.condition = "contains",
|
||||||
|
.match = "0000-00-00 00:00:00",
|
||||||
|
.sql = R"(
|
||||||
|
ALTER TABLE `object_contents` MODIFY COLUMN `droptime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||||
|
)"
|
||||||
|
}
|
||||||
// -- template; copy/paste this when you need to create a new entry
|
// -- template; copy/paste this when you need to create a new entry
|
||||||
// ManifestEntry{
|
// ManifestEntry{
|
||||||
// .version = 9228,
|
// .version = 9228,
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ namespace EQ
|
|||||||
bit_DeityAll = UINT32_MAX
|
bit_DeityAll = UINT32_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr int format_as(DeityType type) { return static_cast<int>(type); }
|
||||||
|
|
||||||
extern DeityTypeBit GetDeityBitmask(DeityType deity_type);
|
extern DeityTypeBit GetDeityBitmask(DeityType deity_type);
|
||||||
extern std::string GetDeityName(DeityType deity_type);
|
extern std::string GetDeityName(DeityType deity_type);
|
||||||
extern const std::map<DeityType, std::string>& GetDeityMap();
|
extern const std::map<DeityType, std::string>& GetDeityMap();
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ typedef enum { //EQEmu internal opcodes list
|
|||||||
_maxEmuOpcode
|
_maxEmuOpcode
|
||||||
} EmuOpcode;
|
} EmuOpcode;
|
||||||
|
|
||||||
|
constexpr int format_as(EmuOpcode opcode) { return static_cast<int>(opcode); }
|
||||||
extern const char *OpcodeNames[_maxEmuOpcode+1];
|
extern const char *OpcodeNames[_maxEmuOpcode+1];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -881,7 +881,7 @@ static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into)
|
|||||||
if (into.guild_id == 0) {
|
if (into.guild_id == 0) {
|
||||||
into.guild_id = GUILD_NONE;
|
into.guild_id = GUILD_NONE;
|
||||||
}
|
}
|
||||||
if (into.rank > GUILD_MAX_RANK) {
|
if (into.rank > GUILD_MAX_RANK + 1) {
|
||||||
into.rank = GUILD_RANK_NONE;
|
into.rank = GUILD_RANK_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -35,7 +35,7 @@
|
|||||||
#define GUILD_MEMBER_TI 0
|
#define GUILD_MEMBER_TI 0
|
||||||
#define GUILD_OFFICER_TI 1
|
#define GUILD_OFFICER_TI 1
|
||||||
#define GUILD_LEADER_TI 2
|
#define GUILD_LEADER_TI 2
|
||||||
#define GUILD_RANK_NONE (GUILD_MAX_RANK+1)
|
#define GUILD_RANK_NONE_TI (GUILD_MAX_RANK + 1)
|
||||||
|
|
||||||
//defines for standard ranks base on RoF2 definitions
|
//defines for standard ranks base on RoF2 definitions
|
||||||
#define GUILD_RANK_NONE 0
|
#define GUILD_RANK_NONE 0
|
||||||
@@ -81,5 +81,6 @@ typedef enum {
|
|||||||
GUILD_ACTION_MEMBERS_DEMOTE_SELF = 30,
|
GUILD_ACTION_MEMBERS_DEMOTE_SELF = 30,
|
||||||
} GuildAction;
|
} GuildAction;
|
||||||
|
|
||||||
|
constexpr int format_as(GuildAction action) { return static_cast<int>(action); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ namespace RoF2
|
|||||||
slotCursor
|
slotCursor
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr int16 format_as(InventorySlots slot) { return static_cast<int16>(slot); }
|
||||||
} // namespace enum_
|
} // namespace enum_
|
||||||
using namespace enum_;
|
using namespace enum_;
|
||||||
|
|
||||||
|
|||||||
@@ -692,6 +692,10 @@ namespace Titanium
|
|||||||
eq->rank = GUILD_LEADER_TI;
|
eq->rank = GUILD_LEADER_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
eq->rank = GUILD_RANK_NONE_TI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(eq->member_name, emu->member_name, sizeof(eq->member_name));
|
memcpy(eq->member_name, emu->member_name, sizeof(eq->member_name));
|
||||||
@@ -1417,6 +1421,7 @@ namespace Titanium
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
eq->guildrank = GUILD_RANK_NONE_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1155,6 +1155,7 @@ namespace UF
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
emu_e->rank = GUILD_RANK_NONE_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1256,6 +1257,10 @@ namespace UF
|
|||||||
eq->rank_ = GUILD_LEADER_TI;
|
eq->rank_ = GUILD_LEADER_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
eq->rank_ = GUILD_RANK_NONE_TI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OUT(zone_id)
|
OUT(zone_id)
|
||||||
OUT(last_on)
|
OUT(last_on)
|
||||||
@@ -1291,6 +1296,10 @@ namespace UF
|
|||||||
eq->rank_ = GUILD_LEADER_TI;
|
eq->rank_ = GUILD_LEADER_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
eq->rank_ = GUILD_RANK_NONE_TI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
FINISH_ENCODE()
|
FINISH_ENCODE()
|
||||||
}
|
}
|
||||||
@@ -1970,6 +1979,7 @@ namespace UF
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
emu->guildrank = GUILD_RANK_NONE_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2503,6 +2513,10 @@ namespace UF
|
|||||||
eq->parameter = GUILD_LEADER_TI;
|
eq->parameter = GUILD_LEADER_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
eq->parameter = GUILD_RANK_NONE_TI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2545,6 +2559,7 @@ namespace UF
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
emu->rank = GUILD_RANK_NONE_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3163,6 +3178,7 @@ namespace UF
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
emu->guildrank = GUILD_RANK_NONE_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ public:
|
|||||||
e.y = 0;
|
e.y = 0;
|
||||||
e.z = 0;
|
e.z = 0;
|
||||||
e.heading = 0;
|
e.heading = 0;
|
||||||
e.time_of_death = 0;
|
e.time_of_death = std::time(nullptr);
|
||||||
e.guild_consent_id = 0;
|
e.guild_consent_id = 0;
|
||||||
e.is_rezzed = 0;
|
e.is_rezzed = 0;
|
||||||
e.is_buried = 0;
|
e.is_buried = 0;
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
e.bagidx = 0;
|
e.bagidx = 0;
|
||||||
e.itemid = 0;
|
e.itemid = 0;
|
||||||
e.charges = 0;
|
e.charges = 0;
|
||||||
e.droptime = 0;
|
e.droptime = std::time(nullptr);
|
||||||
e.augslot1 = 0;
|
e.augslot1 = 0;
|
||||||
e.augslot2 = 0;
|
e.augslot2 = 0;
|
||||||
e.augslot3 = 0;
|
e.augslot3 = 0;
|
||||||
|
|||||||
@@ -694,7 +694,6 @@ RULE_BOOL(Bots, BotGroupXP, false, "Determines whether client gets experience fo
|
|||||||
RULE_BOOL(Bots, BotLevelsWithOwner, false, "Auto-updates spawned bots as owner levels/de-levels (false is original behavior)")
|
RULE_BOOL(Bots, BotLevelsWithOwner, false, "Auto-updates spawned bots as owner levels/de-levels (false is original behavior)")
|
||||||
RULE_INT(Bots, BotCharacterLevel, 0, "If level is greater that value player can spawn bots if BotCharacterLevelEnabled is true")
|
RULE_INT(Bots, BotCharacterLevel, 0, "If level is greater that value player can spawn bots if BotCharacterLevelEnabled is true")
|
||||||
RULE_INT(Bots, CasterStopMeleeLevel, 13, "Level at which caster bots stop melee attacks")
|
RULE_INT(Bots, CasterStopMeleeLevel, 13, "Level at which caster bots stop melee attacks")
|
||||||
RULE_BOOL(Bots, AllowOwnerOptionAltCombat, true, "When option is enabled, bots will use an auto-/shared-aggro combat model")
|
|
||||||
RULE_BOOL(Bots, AllowOwnerOptionAutoDefend, true, "When option is enabled, bots will defend their owner on enemy aggro")
|
RULE_BOOL(Bots, AllowOwnerOptionAutoDefend, true, "When option is enabled, bots will defend their owner on enemy aggro")
|
||||||
RULE_REAL(Bots, LeashDistance, 562500.0f, "Distance a bot is allowed to travel from leash owner before being pulled back (squared value)")
|
RULE_REAL(Bots, LeashDistance, 562500.0f, "Distance a bot is allowed to travel from leash owner before being pulled back (squared value)")
|
||||||
RULE_BOOL(Bots, AllowApplyPoisonCommand, true, "Allows the use of the bot command 'applypoison'")
|
RULE_BOOL(Bots, AllowApplyPoisonCommand, true, "Allows the use of the bot command 'applypoison'")
|
||||||
|
|||||||
@@ -162,6 +162,8 @@ namespace EQ
|
|||||||
// server profile does not reflect this yet..so, prefixed with 'PACKET_'
|
// server profile does not reflect this yet..so, prefixed with 'PACKET_'
|
||||||
#define PACKET_SKILL_ARRAY_SIZE 100
|
#define PACKET_SKILL_ARRAY_SIZE 100
|
||||||
|
|
||||||
|
constexpr int format_as(SkillType skill) { return static_cast<int>(skill); }
|
||||||
|
|
||||||
bool IsTradeskill(SkillType skill);
|
bool IsTradeskill(SkillType skill);
|
||||||
bool IsSpecializedSkill(SkillType skill);
|
bool IsSpecializedSkill(SkillType skill);
|
||||||
float GetSkillMeleePushForce(SkillType skill);
|
float GetSkillMeleePushForce(SkillType skill);
|
||||||
|
|||||||
@@ -252,6 +252,8 @@ typedef enum {
|
|||||||
ActivityCompleted = 2
|
ActivityCompleted = 2
|
||||||
} ActivityState;
|
} ActivityState;
|
||||||
|
|
||||||
|
constexpr int format_as(ActivityState state) { return static_cast<int>(state); }
|
||||||
|
|
||||||
struct ClientActivityInformation {
|
struct ClientActivityInformation {
|
||||||
int activity_id;
|
int activity_id;
|
||||||
int done_count;
|
int done_count;
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ namespace EQ
|
|||||||
tintInvalid = textureInvalid
|
tintInvalid = textureInvalid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr int format_as(TextureSlot slot) { return static_cast<int>(slot); }
|
||||||
|
|
||||||
const int8 LastTexture = weaponSecondary;
|
const int8 LastTexture = weaponSecondary;
|
||||||
const int8 LastTintableTexture = tintFeet;
|
const int8 LastTintableTexture = tintFeet;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// Build variables
|
// Build variables
|
||||||
// these get injected during the build pipeline
|
// these get injected during the build pipeline
|
||||||
#define CURRENT_VERSION "22.44.1-dev" // always append -dev to the current version for custom-builds
|
#define CURRENT_VERSION "22.44.2-dev" // always append -dev to the current version for custom-builds
|
||||||
#define LOGIN_VERSION "0.8.0"
|
#define LOGIN_VERSION "0.8.0"
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9260
|
#define CURRENT_BINARY_DATABASE_VERSION 9262
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9042
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9042
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eqemu-server",
|
"name": "eqemu-server",
|
||||||
"version": "22.44.1",
|
"version": "22.44.2",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EQEmu/Server.git"
|
"url": "https://github.com/EQEmu/Server.git"
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ void ClientListEntry::SetOnline(CLE_Status iOnline)
|
|||||||
AccountName(),
|
AccountName(),
|
||||||
AccountID(),
|
AccountID(),
|
||||||
CLEStatusString[CLE_Status::Online],
|
CLEStatusString[CLE_Status::Online],
|
||||||
iOnline
|
static_cast<int>(iOnline)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (iOnline >= CLE_Status::Online && pOnline < CLE_Status::Online) {
|
if (iOnline >= CLE_Status::Online && pOnline < CLE_Status::Online) {
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect
|
|||||||
fmt::format_to(std::back_inserter(out), fmt::runtime(newline));
|
fmt::format_to(std::back_inserter(out), fmt::runtime(newline));
|
||||||
}
|
}
|
||||||
fmt::format_to(std::back_inserter(out), "ID: {} Acc# {} AccName: {} IP: {}", cle->GetID(), cle->AccountID(), cle->AccountName(), inet_ntoa(in));
|
fmt::format_to(std::back_inserter(out), "ID: {} Acc# {} AccName: {} IP: {}", cle->GetID(), cle->AccountID(), cle->AccountName(), inet_ntoa(in));
|
||||||
fmt::format_to(std::back_inserter(out), "{} Stale: {} Online: {} Admin: {}", newline, cle->GetStaleCounter(), cle->Online(), cle->Admin());
|
fmt::format_to(std::back_inserter(out), "{} Stale: {} Online: {} Admin: {}", newline, cle->GetStaleCounter(), static_cast<int>(cle->Online()), cle->Admin());
|
||||||
if (cle->LSID())
|
if (cle->LSID())
|
||||||
fmt::format_to(std::back_inserter(out), "{} LSID: {} LSName: {} WorldAdmin: {}", newline, cle->LSID(), cle->LSName(), cle->WorldAdmin());
|
fmt::format_to(std::back_inserter(out), "{} LSID: {} LSName: {} WorldAdmin: {}", newline, cle->LSID(), cle->LSName(), cle->WorldAdmin());
|
||||||
if (cle->CharID())
|
if (cle->CharID())
|
||||||
|
|||||||
+2
-2
@@ -343,7 +343,7 @@ void NPC::DescribeAggro(Client *to_who, Mob *mob, bool verbose) {
|
|||||||
"{} does not have low enough faction, their Faction Level is {} ({}).",
|
"{} does not have low enough faction, their Faction Level is {} ({}).",
|
||||||
to_who->GetTargetDescription(mob),
|
to_who->GetTargetDescription(mob),
|
||||||
FactionValueToString(faction_value),
|
FactionValueToString(faction_value),
|
||||||
faction_value
|
static_cast<int>(faction_value)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -556,7 +556,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
|||||||
LogAggro("Is In zone?:[{}]\n", mob->InZone());
|
LogAggro("Is In zone?:[{}]\n", mob->InZone());
|
||||||
LogAggro("Dist^2: [{}]\n", distance_squared);
|
LogAggro("Dist^2: [{}]\n", distance_squared);
|
||||||
LogAggro("Range^2: [{}]\n", aggro_range_squared);
|
LogAggro("Range^2: [{}]\n", aggro_range_squared);
|
||||||
LogAggro("Faction: [{}]\n", faction_value);
|
LogAggro("Faction: [{}]\n", static_cast<int>(faction_value));
|
||||||
LogAggro("AlwaysAggroFlag: [{}]\n", AlwaysAggro());
|
LogAggro("AlwaysAggroFlag: [{}]\n", AlwaysAggro());
|
||||||
LogAggro("Int: [{}]\n", GetINT());
|
LogAggro("Int: [{}]\n", GetINT());
|
||||||
LogAggro("Con: [{}]\n", GetLevelCon(mob->GetLevel()));
|
LogAggro("Con: [{}]\n", GetLevelCon(mob->GetLevel()));
|
||||||
|
|||||||
+28
-172
@@ -85,7 +85,6 @@ Bot::Bot(NPCType *npcTypeData, Client* botOwner) : NPC(npcTypeData, nullptr, glm
|
|||||||
SetShowHelm(true);
|
SetShowHelm(true);
|
||||||
SetPauseAI(false);
|
SetPauseAI(false);
|
||||||
|
|
||||||
m_alt_combat_hate_timer.Start(250);
|
|
||||||
m_auto_defend_timer.Disable();
|
m_auto_defend_timer.Disable();
|
||||||
SetGuardFlag(false);
|
SetGuardFlag(false);
|
||||||
SetHoldFlag(false);
|
SetHoldFlag(false);
|
||||||
@@ -205,7 +204,6 @@ Bot::Bot(
|
|||||||
SetTaunting((GetClass() == Class::Warrior || GetClass() == Class::Paladin || GetClass() == Class::ShadowKnight) && (GetBotStance() == EQ::constants::stanceAggressive));
|
SetTaunting((GetClass() == Class::Warrior || GetClass() == Class::Paladin || GetClass() == Class::ShadowKnight) && (GetBotStance() == EQ::constants::stanceAggressive));
|
||||||
SetPauseAI(false);
|
SetPauseAI(false);
|
||||||
|
|
||||||
m_alt_combat_hate_timer.Start(250);
|
|
||||||
m_auto_defend_timer.Disable();
|
m_auto_defend_timer.Disable();
|
||||||
SetGuardFlag(false);
|
SetGuardFlag(false);
|
||||||
SetHoldFlag(false);
|
SetHoldFlag(false);
|
||||||
@@ -1958,8 +1956,6 @@ void Bot::AI_Process()
|
|||||||
|
|
||||||
HealRotationChecks();
|
HealRotationChecks();
|
||||||
|
|
||||||
bool bo_alt_combat = (RuleB(Bots, AllowOwnerOptionAltCombat) && bot_owner->GetBotOption(Client::booAltCombat));
|
|
||||||
|
|
||||||
if (GetAttackFlag()) { // Push owner's target onto our hate list
|
if (GetAttackFlag()) { // Push owner's target onto our hate list
|
||||||
SetOwnerTarget(bot_owner);
|
SetOwnerTarget(bot_owner);
|
||||||
}
|
}
|
||||||
@@ -1969,8 +1965,6 @@ void Bot::AI_Process()
|
|||||||
|
|
||||||
//ALT COMBAT (ACQUIRE HATE)
|
//ALT COMBAT (ACQUIRE HATE)
|
||||||
|
|
||||||
SetBotTarget(bot_owner, raid, bot_group, leash_owner, lo_distance, leash_distance, bo_alt_combat);
|
|
||||||
|
|
||||||
glm::vec3 Goal(0, 0, 0);
|
glm::vec3 Goal(0, 0, 0);
|
||||||
|
|
||||||
// We have aggro to choose from
|
// We have aggro to choose from
|
||||||
@@ -1996,12 +1990,6 @@ void Bot::AI_Process()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ALT COMBAT (ACQUIRE TARGET)
|
|
||||||
|
|
||||||
else if (bo_alt_combat && m_alt_combat_hate_timer.Check()) { // Find a mob from hate list to target
|
|
||||||
AcquireBotTarget(bot_group, nullptr, leash_owner, leash_distance);
|
|
||||||
}
|
|
||||||
|
|
||||||
// DEFAULT (ACQUIRE TARGET)
|
// DEFAULT (ACQUIRE TARGET)
|
||||||
|
|
||||||
// VERIFY TARGET AND STANCE
|
// VERIFY TARGET AND STANCE
|
||||||
@@ -2021,7 +2009,7 @@ void Bot::AI_Process()
|
|||||||
|
|
||||||
// TARGET VALIDATION
|
// TARGET VALIDATION
|
||||||
|
|
||||||
if (!IsValidTarget(bot_owner, leash_owner, lo_distance, leash_distance, bo_alt_combat, tar, tar_distance)) {
|
if (!IsValidTarget(bot_owner, leash_owner, lo_distance, leash_distance, tar, tar_distance)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2683,17 +2671,29 @@ void Bot::CalcMeleeDistances(const Mob* tar, const EQ::ItemInstance* const& p_it
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Bot::IsValidTarget(Client* bot_owner, Client* leash_owner, float lo_distance, float leash_distance, bool bo_alt_combat, Mob* tar, float tar_distance) {
|
bool Bot::IsValidTarget(
|
||||||
|
Client* bot_owner,
|
||||||
|
Client* leash_owner,
|
||||||
|
float lo_distance,
|
||||||
|
float leash_distance,
|
||||||
|
Mob* tar,
|
||||||
|
float tar_distance
|
||||||
|
)
|
||||||
|
{
|
||||||
if (!tar || !bot_owner || !leash_owner) {
|
if (!tar || !bot_owner || !leash_owner) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool valid_target_state = HOLDING || !tar->IsNPC() || tar->IsMezzed() || lo_distance > leash_distance || tar_distance > leash_distance;
|
const bool valid_target_state = (
|
||||||
bool valid_target = !GetAttackingFlag() && !CheckLosFN(tar) && !leash_owner->CheckLosFN(tar);
|
HOLDING ||
|
||||||
bool valid_bo_target = !GetAttackingFlag() && NOT_PULLING_BOT && !leash_owner->AutoAttackEnabled() && !tar->GetHateAmount(this) && !tar->GetHateAmount(leash_owner);
|
!tar->IsNPC() ||
|
||||||
|
tar->IsMezzed() ||
|
||||||
|
lo_distance > leash_distance ||
|
||||||
|
tar_distance > leash_distance
|
||||||
|
);
|
||||||
|
const bool valid_target = !GetAttackingFlag() && !CheckLosFN(tar) && !leash_owner->CheckLosFN(tar);
|
||||||
|
|
||||||
if (valid_target_state || valid_target || !IsAttackAllowed(tar) || (bo_alt_combat && valid_bo_target)) {
|
if (valid_target_state || valid_target || !IsAttackAllowed(tar)) {
|
||||||
// Normally, we wouldn't want to do this without class checks..but, too many issues can arise if we let enchanter animation pets run rampant
|
// Normally, we wouldn't want to do this without class checks..but, too many issues can arise if we let enchanter animation pets run rampant
|
||||||
if (HasPet()) {
|
if (HasPet()) {
|
||||||
GetPet()->RemoveFromHateList(tar);
|
GetPet()->RemoveFromHateList(tar);
|
||||||
@@ -2712,6 +2712,7 @@ bool Bot::IsValidTarget(Client* bot_owner, Client* leash_owner, float lo_distanc
|
|||||||
SetPullingFlag(false);
|
SetPullingFlag(false);
|
||||||
SetReturningFlag(false);
|
SetReturningFlag(false);
|
||||||
bot_owner->SetBotPulling(false);
|
bot_owner->SetBotPulling(false);
|
||||||
|
|
||||||
if (GetPet()) {
|
if (GetPet()) {
|
||||||
GetPet()->SetPetOrder(m_previous_pet_order);
|
GetPet()->SetPetOrder(m_previous_pet_order);
|
||||||
}
|
}
|
||||||
@@ -2723,13 +2724,15 @@ bool Bot::IsValidTarget(Client* bot_owner, Client* leash_owner, float lo_distanc
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mob* Bot::GetBotTarget(Client* bot_owner) {
|
Mob* Bot::GetBotTarget(Client* bot_owner)
|
||||||
|
{
|
||||||
|
Mob* t = GetTarget();
|
||||||
|
|
||||||
Mob* tar = GetTarget();
|
if (!t || PASSIVE) {
|
||||||
if (!tar || PASSIVE) {
|
|
||||||
if (GetTarget()) {
|
if (GetTarget()) {
|
||||||
SetTarget(nullptr);
|
SetTarget(nullptr);
|
||||||
}
|
}
|
||||||
@@ -2737,12 +2740,13 @@ Mob* Bot::GetBotTarget(Client* bot_owner) {
|
|||||||
WipeHateList();
|
WipeHateList();
|
||||||
SetAttackFlag(false);
|
SetAttackFlag(false);
|
||||||
SetAttackingFlag(false);
|
SetAttackingFlag(false);
|
||||||
if (PULLING_BOT) {
|
|
||||||
|
|
||||||
|
if (PULLING_BOT) {
|
||||||
// 'Flags' should only be set on the bot that is pulling
|
// 'Flags' should only be set on the bot that is pulling
|
||||||
SetPullingFlag(false);
|
SetPullingFlag(false);
|
||||||
SetReturningFlag(false);
|
SetReturningFlag(false);
|
||||||
bot_owner->SetBotPulling(false);
|
bot_owner->SetBotPulling(false);
|
||||||
|
|
||||||
if (GetPet()) {
|
if (GetPet()) {
|
||||||
GetPet()->SetPetOrder(m_previous_pet_order);
|
GetPet()->SetPetOrder(m_previous_pet_order);
|
||||||
}
|
}
|
||||||
@@ -2752,84 +2756,8 @@ Mob* Bot::GetBotTarget(Client* bot_owner) {
|
|||||||
BotMeditate(true);
|
BotMeditate(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tar;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Bot::AcquireBotTarget(Group* bot_group, Raid* raid, Client* leash_owner, float leash_distance) {// Group roles can be expounded upon in the future
|
return t;
|
||||||
Mob* assist_mob = nullptr;
|
|
||||||
bool find_target = true;
|
|
||||||
|
|
||||||
if (raid) {
|
|
||||||
assist_mob = raid->GetRaidMainAssistOne();
|
|
||||||
}
|
|
||||||
else if (bot_group) {
|
|
||||||
assist_mob = entity_list.GetMob(bot_group->GetMainAssistName());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (assist_mob) {
|
|
||||||
if (assist_mob->GetTarget()) {
|
|
||||||
if (assist_mob != this) {
|
|
||||||
if (GetTarget() != assist_mob->GetTarget()) {
|
|
||||||
SetTarget(assist_mob->GetTarget());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
HasPet() &&
|
|
||||||
(
|
|
||||||
GetClass() != Class::Enchanter ||
|
|
||||||
GetPet()->GetPetType() != petAnimation ||
|
|
||||||
GetAA(aaAnimationEmpathy) >= 2
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
// This artificially inflates pet's target aggro..but, less expensive than checking hate each AI process
|
|
||||||
GetPet()->AddToHateList(assist_mob->GetTarget(), 1);
|
|
||||||
GetPet()->SetTarget(assist_mob->GetTarget());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
find_target = false;
|
|
||||||
} else if (assist_mob != this) {
|
|
||||||
if (GetTarget()) {
|
|
||||||
SetTarget(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
HasPet() &&
|
|
||||||
(
|
|
||||||
GetClass() != Class::Enchanter ||
|
|
||||||
GetPet()->GetPetType() != petAnimation ||
|
|
||||||
GetAA(aaAnimationEmpathy) >= 1
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
GetPet()->WipeHateList();
|
|
||||||
GetPet()->SetTarget(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
find_target = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (find_target) {
|
|
||||||
if (IsRooted()) {
|
|
||||||
auto closest = hate_list.GetClosestEntOnHateList(this, true);
|
|
||||||
if (closest) {
|
|
||||||
SetTarget(closest);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// This will keep bots on target for now..but, future updates will allow for rooting/stunning
|
|
||||||
if (auto escaping = hate_list.GetEscapingMobOnHateList(leash_owner, leash_distance)) {
|
|
||||||
SetTarget(escaping);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!GetTarget()) {
|
|
||||||
auto most_hate = hate_list.GetMobWithMostHateOnList(this, nullptr, true);
|
|
||||||
if (most_hate) {
|
|
||||||
SetTarget(most_hate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Bot::ReturningFlagChecks(Client* bot_owner, float fm_distance) {// Need to make it back to group before clearing return flag
|
bool Bot::ReturningFlagChecks(Client* bot_owner, float fm_distance) {// Need to make it back to group before clearing return flag
|
||||||
@@ -2893,42 +2821,6 @@ bool Bot::PullingFlagChecks(Client* bot_owner) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bot::SetBotTarget(Client* bot_owner, Raid* raid, Group* bot_group, Client* leash_owner, float lo_distance, float leash_distance, bool bo_alt_combat) {
|
|
||||||
|
|
||||||
if (bo_alt_combat && m_alt_combat_hate_timer.Check(false)) {
|
|
||||||
// Empty hate list - let's find some aggro
|
|
||||||
if (bot_owner->IsEngaged() && !IsEngaged() && NOT_HOLDING && NOT_PASSIVE && (!bot_owner->GetBotPulling() || NOT_PULLING_BOT)) {
|
|
||||||
SetLeashOwnerTarget(leash_owner, bot_owner, lo_distance, leash_distance);
|
|
||||||
}
|
|
||||||
else if (!IsEngaged() && raid) {
|
|
||||||
for (const auto& raid_member : raid->members) {
|
|
||||||
if (!raid_member.member) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto rm_target = raid_member.member->GetTarget();
|
|
||||||
if (!rm_target || !rm_target->IsNPC()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SetBotGroupTarget(bot_owner, leash_owner, lo_distance, leash_distance, raid_member.member, rm_target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!IsEngaged() && bot_group) {
|
|
||||||
for (const auto& bg_member: bot_group->members) {
|
|
||||||
if (!bg_member) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto bgm_target = bg_member->GetTarget();
|
|
||||||
if (!bgm_target || !bgm_target->IsNPC()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SetBotGroupTarget(bot_owner, leash_owner, lo_distance, leash_distance, bg_member, bgm_target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Bot::HealRotationChecks() {
|
void Bot::HealRotationChecks() {
|
||||||
|
|
||||||
if (IsMyHealRotationSet()) {
|
if (IsMyHealRotationSet()) {
|
||||||
@@ -3063,26 +2955,6 @@ Client* Bot::SetLeashOwner(Client* bot_owner, Group* bot_group, Raid* raid, uint
|
|||||||
return leash_owner;
|
return leash_owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bot::SetLeashOwnerTarget(Client* leash_owner, Client* bot_owner, float lo_distance, float leash_distance) {
|
|
||||||
|
|
||||||
Mob* lo_target = leash_owner->GetTarget();
|
|
||||||
if (lo_target &&
|
|
||||||
lo_target->IsNPC() &&
|
|
||||||
!lo_target->IsMezzed() &&
|
|
||||||
((bot_owner->GetBotOption(Client::booAutoDefend) && lo_target->GetHateAmount(leash_owner)) || leash_owner->AutoAttackEnabled()) &&
|
|
||||||
lo_distance <= leash_distance &&
|
|
||||||
DistanceSquared(m_Position, lo_target->GetPosition()) <= leash_distance &&
|
|
||||||
(CheckLosFN(lo_target) || leash_owner->CheckLosFN(lo_target)) &&
|
|
||||||
IsAttackAllowed(lo_target))
|
|
||||||
{
|
|
||||||
AddToHateList(lo_target, 1);
|
|
||||||
if (HasPet() && (GetClass() != Class::Enchanter || GetPet()->GetPetType() != petAnimation || GetAA(aaAnimationEmpathy) >= 2)) {
|
|
||||||
GetPet()->AddToHateList(lo_target, 1);
|
|
||||||
GetPet()->SetTarget(lo_target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Bot::SetOwnerTarget(Client* bot_owner) {
|
void Bot::SetOwnerTarget(Client* bot_owner) {
|
||||||
if (GetPet() && PULLING_BOT) {
|
if (GetPet() && PULLING_BOT) {
|
||||||
GetPet()->SetPetOrder(m_previous_pet_order);
|
GetPet()->SetPetOrder(m_previous_pet_order);
|
||||||
@@ -3155,22 +3027,6 @@ void Bot::BotPullerProcess(Client* bot_owner, Raid* raid) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bot::SetBotGroupTarget(const Client* bot_owner, Client* leash_owner, float lo_distance, float leash_distance, Mob* const& bg_member, Mob* bgm_target) {
|
|
||||||
if (!bgm_target->IsMezzed() &&
|
|
||||||
((bot_owner->GetBotOption(Client::booAutoDefend) && bgm_target->GetHateAmount(bg_member)) || leash_owner->AutoAttackEnabled()) &&
|
|
||||||
lo_distance <= leash_distance &&
|
|
||||||
DistanceSquared(m_Position, bgm_target->GetPosition()) <= leash_distance &&
|
|
||||||
(CheckLosFN(bgm_target) || leash_owner->CheckLosFN(bgm_target)) &&
|
|
||||||
IsAttackAllowed(bgm_target))
|
|
||||||
{
|
|
||||||
AddToHateList(bgm_target, 1);
|
|
||||||
if (HasPet() && (GetClass() != Class::Enchanter || GetPet()->GetPetType() != petAnimation || GetAA(aaAnimationEmpathy) >= 2)) {
|
|
||||||
GetPet()->AddToHateList(bgm_target, 1);
|
|
||||||
GetPet()->SetTarget(bgm_target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Bot::Depop() {
|
void Bot::Depop() {
|
||||||
WipeHateList();
|
WipeHateList();
|
||||||
entity_list.RemoveFromHateLists(this);
|
entity_list.RemoveFromHateLists(this);
|
||||||
|
|||||||
+8
-6
@@ -781,12 +781,15 @@ public:
|
|||||||
Mob* SetFollowMob(Client* leash_owner);
|
Mob* SetFollowMob(Client* leash_owner);
|
||||||
|
|
||||||
Mob* GetBotTarget(Client* bot_owner);
|
Mob* GetBotTarget(Client* bot_owner);
|
||||||
void AcquireBotTarget(Group* bot_group, Raid* raid, Client* leash_owner, float leash_distance);
|
|
||||||
void SetBotTarget(Client* bot_owner, Raid* raid, Group* bot_group, Client* leash_owner, float lo_distance, float leash_distance, bool bo_alt_combat);
|
|
||||||
void SetLeashOwnerTarget(Client* leash_owner, Client* bot_owner, float lo_distance, float leash_distance);
|
|
||||||
void SetOwnerTarget(Client* bot_owner);
|
void SetOwnerTarget(Client* bot_owner);
|
||||||
void SetBotGroupTarget(const Client* bot_owner, Client* leash_owner, float lo_distance, float leash_distance, Mob* const& bg_member, Mob* bgm_target);
|
bool IsValidTarget(
|
||||||
bool IsValidTarget(Client* bot_owner, Client* leash_owner, float lo_distance, float leash_distance, bool bo_alt_combat, Mob* tar, float tar_distance);
|
Client* bot_owner,
|
||||||
|
Client* leash_owner,
|
||||||
|
float lo_distance,
|
||||||
|
float leash_distance,
|
||||||
|
Mob* tar,
|
||||||
|
float tar_distance
|
||||||
|
);
|
||||||
|
|
||||||
bool PullingFlagChecks(Client* bot_owner);
|
bool PullingFlagChecks(Client* bot_owner);
|
||||||
bool ReturningFlagChecks(Client* bot_owner, float fm_distance);
|
bool ReturningFlagChecks(Client* bot_owner, float fm_distance);
|
||||||
@@ -879,7 +882,6 @@ private:
|
|||||||
int32 end_regen;
|
int32 end_regen;
|
||||||
|
|
||||||
Timer m_evade_timer; // can be moved to pTimers at some point
|
Timer m_evade_timer; // can be moved to pTimers at some point
|
||||||
Timer m_alt_combat_hate_timer;
|
|
||||||
Timer m_auto_defend_timer;
|
Timer m_auto_defend_timer;
|
||||||
Timer auto_save_timer;
|
Timer auto_save_timer;
|
||||||
bool m_dirtyautohaters;
|
bool m_dirtyautohaters;
|
||||||
|
|||||||
@@ -1107,7 +1107,7 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"My current stance is {} ({}).",
|
"My current stance is {} ({}).",
|
||||||
EQ::constants::GetStanceName(bot_iter->GetBotStance()),
|
EQ::constants::GetStanceName(bot_iter->GetBotStance()),
|
||||||
bot_iter->GetBotStance()
|
static_cast<int>(bot_iter->GetBotStance())
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,11 +45,6 @@ void bot_command_owner_option(Client *c, const Seperator *sep)
|
|||||||
"<td><c \"#888888\">spawn with class-based message</td>"
|
"<td><c \"#888888\">spawn with class-based message</td>"
|
||||||
"</tr>"
|
"</tr>"
|
||||||
"<tr>"
|
"<tr>"
|
||||||
"<td><c \"#CCCCCC\">altcombat</td>"
|
|
||||||
"<td><c \"#00CC00\">enable <c \"#CCCCCC\">| <c \"#00CC00\">disable</td>"
|
|
||||||
"<td><c \"#888888\">use alternate ai combat behavior</td>"
|
|
||||||
"</tr>"
|
|
||||||
"<tr>"
|
|
||||||
"<td></td>"
|
"<td></td>"
|
||||||
"<td><c \"#00CCCC\">null</td>"
|
"<td><c \"#00CCCC\">null</td>"
|
||||||
"<td><c \"#888888\">(toggles)</td>"
|
"<td><c \"#888888\">(toggles)</td>"
|
||||||
@@ -199,28 +194,6 @@ void bot_command_owner_option(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
c->Message(Chat::White, "Bot 'spawn message' is now %s.", argument.c_str());
|
c->Message(Chat::White, "Bot 'spawn message' is now %s.", argument.c_str());
|
||||||
}
|
}
|
||||||
else if (!owner_option.compare("altcombat")) {
|
|
||||||
|
|
||||||
if (RuleB(Bots, AllowOwnerOptionAltCombat)) {
|
|
||||||
|
|
||||||
if (!argument.compare("enable")) {
|
|
||||||
c->SetBotOption(Client::booAltCombat, true);
|
|
||||||
}
|
|
||||||
else if (!argument.compare("disable")) {
|
|
||||||
c->SetBotOption(Client::booAltCombat, false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c->SetBotOption(Client::booAltCombat, !c->GetBotOption(Client::booAltCombat));
|
|
||||||
}
|
|
||||||
|
|
||||||
database.botdb.SaveOwnerOption(c->CharacterID(), Client::booAltCombat, c->GetBotOption(Client::booAltCombat));
|
|
||||||
|
|
||||||
c->Message(Chat::White, "Bot 'alt combat' is now %s.", (c->GetBotOption(Client::booAltCombat) ? "enabled" : "disabled"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c->Message(Chat::White, "Bot owner option 'altcombat' is not allowed on this server.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!owner_option.compare("autodefend")) {
|
else if (!owner_option.compare("autodefend")) {
|
||||||
|
|
||||||
if (RuleB(Bots, AllowOwnerOptionAutoDefend)) {
|
if (RuleB(Bots, AllowOwnerOptionAutoDefend)) {
|
||||||
@@ -292,7 +265,6 @@ void bot_command_owner_option(Client *c, const Seperator *sep)
|
|||||||
"<tr>" "<td><c \"#CCCCCC\">statsupdate</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
"<tr>" "<td><c \"#CCCCCC\">statsupdate</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
||||||
"<tr>" "<td><c \"#CCCCCC\">spawnmessage</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
"<tr>" "<td><c \"#CCCCCC\">spawnmessage</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
||||||
"<tr>" "<td><c \"#CCCCCC\">spawnmessage</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
"<tr>" "<td><c \"#CCCCCC\">spawnmessage</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
||||||
"<tr>" "<td><c \"#CCCCCC\">altcombat</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
|
||||||
"<tr>" "<td><c \"#CCCCCC\">autodefend</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
"<tr>" "<td><c \"#CCCCCC\">autodefend</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
||||||
"<tr>" "<td><c \"#CCCCCC\">buffcounter</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
"<tr>" "<td><c \"#CCCCCC\">buffcounter</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
||||||
"<tr>" "<td><c \"#CCCCCC\">monkwumessage</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
"<tr>" "<td><c \"#CCCCCC\">monkwumessage</td>" "<td><c \"#00CC00\">{}</td>" "</tr>"
|
||||||
@@ -301,7 +273,6 @@ void bot_command_owner_option(Client *c, const Seperator *sep)
|
|||||||
(c->GetBotOption(Client::booStatsUpdate) ? "enabled" : "disabled"),
|
(c->GetBotOption(Client::booStatsUpdate) ? "enabled" : "disabled"),
|
||||||
(c->GetBotOption(Client::booSpawnMessageSay) ? "say" : (c->GetBotOption(Client::booSpawnMessageTell) ? "tell" : "silent")),
|
(c->GetBotOption(Client::booSpawnMessageSay) ? "say" : (c->GetBotOption(Client::booSpawnMessageTell) ? "tell" : "silent")),
|
||||||
(c->GetBotOption(Client::booSpawnMessageClassSpecific) ? "class" : "default"),
|
(c->GetBotOption(Client::booSpawnMessageClassSpecific) ? "class" : "default"),
|
||||||
(RuleB(Bots, AllowOwnerOptionAltCombat) ? (c->GetBotOption(Client::booAltCombat) ? "enabled" : "disabled") : "restricted"),
|
|
||||||
(RuleB(Bots, AllowOwnerOptionAutoDefend) ? (c->GetBotOption(Client::booAutoDefend) ? "enabled" : "disabled") : "restricted"),
|
(RuleB(Bots, AllowOwnerOptionAutoDefend) ? (c->GetBotOption(Client::booAutoDefend) ? "enabled" : "disabled") : "restricted"),
|
||||||
(c->GetBotOption(Client::booBuffCounter) ? "enabled" : "disabled"),
|
(c->GetBotOption(Client::booBuffCounter) ? "enabled" : "disabled"),
|
||||||
(c->GetBotOption(Client::booMonkWuMessage) ? "enabled" : "disabled")
|
(c->GetBotOption(Client::booMonkWuMessage) ? "enabled" : "disabled")
|
||||||
|
|||||||
@@ -1842,7 +1842,7 @@ bool BotDatabase::SaveOwnerOption(const uint32 owner_id, size_t type, const bool
|
|||||||
Client::booDeathMarquee,
|
Client::booDeathMarquee,
|
||||||
Client::booStatsUpdate,
|
Client::booStatsUpdate,
|
||||||
Client::booSpawnMessageClassSpecific,
|
Client::booSpawnMessageClassSpecific,
|
||||||
Client::booAltCombat,
|
Client::booUnused,
|
||||||
Client::booAutoDefend,
|
Client::booAutoDefend,
|
||||||
Client::booBuffCounter,
|
Client::booBuffCounter,
|
||||||
Client::booMonkWuMessage
|
Client::booMonkWuMessage
|
||||||
|
|||||||
+1
-2
@@ -370,7 +370,6 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
|
|||||||
bot_owner_options[booSpawnMessageSay] = false;
|
bot_owner_options[booSpawnMessageSay] = false;
|
||||||
bot_owner_options[booSpawnMessageTell] = true;
|
bot_owner_options[booSpawnMessageTell] = true;
|
||||||
bot_owner_options[booSpawnMessageClassSpecific] = true;
|
bot_owner_options[booSpawnMessageClassSpecific] = true;
|
||||||
bot_owner_options[booAltCombat] = RuleB(Bots, AllowOwnerOptionAltCombat);
|
|
||||||
bot_owner_options[booAutoDefend] = RuleB(Bots, AllowOwnerOptionAutoDefend);
|
bot_owner_options[booAutoDefend] = RuleB(Bots, AllowOwnerOptionAutoDefend);
|
||||||
bot_owner_options[booBuffCounter] = false;
|
bot_owner_options[booBuffCounter] = false;
|
||||||
bot_owner_options[booMonkWuMessage] = false;
|
bot_owner_options[booMonkWuMessage] = false;
|
||||||
@@ -6955,7 +6954,7 @@ void Client::ShowXTargets(Client *c)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"xtarget slot [{}] type [{}] ID [{}] name [{}]",
|
"xtarget slot [{}] type [{}] ID [{}] name [{}]",
|
||||||
i,
|
i,
|
||||||
XTargets[i].Type,
|
static_cast<int>(XTargets[i].Type),
|
||||||
XTargets[i].ID,
|
XTargets[i].ID,
|
||||||
strlen(XTargets[i].Name) ? XTargets[i].Name : "No Name"
|
strlen(XTargets[i].Name) ? XTargets[i].Name : "No Name"
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
+1
-1
@@ -2076,7 +2076,7 @@ public:
|
|||||||
booSpawnMessageSay,
|
booSpawnMessageSay,
|
||||||
booSpawnMessageTell,
|
booSpawnMessageTell,
|
||||||
booSpawnMessageClassSpecific,
|
booSpawnMessageClassSpecific,
|
||||||
booAltCombat,
|
booUnused,
|
||||||
booAutoDefend,
|
booAutoDefend,
|
||||||
booBuffCounter,
|
booBuffCounter,
|
||||||
booMonkWuMessage,
|
booMonkWuMessage,
|
||||||
|
|||||||
+10
-2
@@ -516,7 +516,7 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
|||||||
case CLIENT_LINKDEAD:
|
case CLIENT_LINKDEAD:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LogDebug("Unknown client_state: [{}]\n", client_state);
|
LogDebug("Unknown client_state: [{}]\n", static_cast<int>(client_state));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8163,6 +8163,10 @@ void Client::Handle_OP_GuildInvite(const EQApplicationPacket *app)
|
|||||||
rank = GUILD_LEADER;
|
rank = GUILD_LEADER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
rank = GUILD_RANK_NONE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8564,6 +8568,10 @@ void Client::Handle_OP_GuildPromote(const EQApplicationPacket *app)
|
|||||||
rank = GUILD_LEADER;
|
rank = GUILD_LEADER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
rank = GUILD_RANK_NONE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16334,7 +16342,7 @@ void Client::Handle_OP_XTargetRequest(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LogDebug("Unhandled XTarget Type [{}]", Type);
|
LogDebug("Unhandled XTarget Type [{}]", static_cast<int>(Type));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ void DataBucket::BulkLoadEntities(DataBucketLoadType::Type t, std::vector<uint32
|
|||||||
column = "npc_id";
|
column = "npc_id";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LogError("Incorrect LoadType [{}]", t);
|
LogError("Incorrect LoadType [{}]", static_cast<int>(t));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,7 +546,7 @@ void DataBucket::HandleWorldMessage(ServerPacket *p)
|
|||||||
n.e.id,
|
n.e.id,
|
||||||
n.e.key_,
|
n.e.key_,
|
||||||
n.e.value,
|
n.e.value,
|
||||||
n.update_action
|
static_cast<int>(n.update_action)
|
||||||
);
|
);
|
||||||
|
|
||||||
// delete
|
// delete
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ void Client::SendGuildRankNames()
|
|||||||
{
|
{
|
||||||
if (IsInAGuild() && (ClientVersion() >= EQ::versions::ClientVersion::RoF)) {
|
if (IsInAGuild() && (ClientVersion() >= EQ::versions::ClientVersion::RoF)) {
|
||||||
auto guild = guild_mgr.GetGuildByGuildID(GuildID());
|
auto guild = guild_mgr.GetGuildByGuildID(GuildID());
|
||||||
|
if (!guild) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 1; i <= GUILD_MAX_RANK; i++) {
|
for (int i = 1; i <= GUILD_MAX_RANK; i++) {
|
||||||
|
|
||||||
@@ -153,6 +156,10 @@ void Client::SendGuildRankNames()
|
|||||||
GuildUpdateUCPStruct* gucp = (GuildUpdateUCPStruct*)outapp->pBuffer;
|
GuildUpdateUCPStruct* gucp = (GuildUpdateUCPStruct*)outapp->pBuffer;
|
||||||
|
|
||||||
gucp->payload.rank_name.rank = i;
|
gucp->payload.rank_name.rank = i;
|
||||||
|
if (guild->rank_names[i].empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
strn0cpy(
|
strn0cpy(
|
||||||
gucp->payload.rank_name.rank_name,
|
gucp->payload.rank_name.rank_name,
|
||||||
guild->rank_names[i].c_str(),
|
guild->rank_names[i].c_str(),
|
||||||
|
|||||||
@@ -1640,6 +1640,7 @@ uint8* ZoneGuildManager::MakeGuildMembers(uint32 guild_id, const char* prefix_na
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
ci->rank = GUILD_RANK_NONE_TI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2521,7 +2521,7 @@ void Mob::SendStatsWindow(Client* c, bool use_window)
|
|||||||
CastToClient()->GetPVP() ? "Yes" : "No",
|
CastToClient()->GetPVP() ? "Yes" : "No",
|
||||||
CastToClient()->GetGM() ? "On" : "Off",
|
CastToClient()->GetGM() ? "On" : "Off",
|
||||||
EQ::constants::GetFlyModeName(static_cast<uint8>(flymode)),
|
EQ::constants::GetFlyModeName(static_cast<uint8>(flymode)),
|
||||||
flymode,
|
static_cast<int>(flymode),
|
||||||
CastToClient()->GetGMSpeed() ? "On" : "Off",
|
CastToClient()->GetGMSpeed() ? "On" : "Off",
|
||||||
CastToClient()->GetHideMe() ? "On" : "Off",
|
CastToClient()->GetHideMe() ? "On" : "Off",
|
||||||
CastToClient()->GetGMInvul() ? "On" : "Off",
|
CastToClient()->GetGMInvul() ? "On" : "Off",
|
||||||
|
|||||||
@@ -1487,7 +1487,7 @@ void MobMovementManager::PushEvadeCombat(MobMovementEntry &mob_movement_entry)
|
|||||||
*/
|
*/
|
||||||
void MobMovementManager::HandleStuckBehavior(Mob *who, float x, float y, float z, MobMovementMode mob_movement_mode)
|
void MobMovementManager::HandleStuckBehavior(Mob *who, float x, float y, float z, MobMovementMode mob_movement_mode)
|
||||||
{
|
{
|
||||||
LogDebug("Handle stuck behavior for {0} at ({1}, {2}, {3}) with movement_mode {4}", who->GetName(), x, y, z, mob_movement_mode);
|
LogDebug("Handle stuck behavior for {0} at ({1}, {2}, {3}) with movement_mode {4}", who->GetName(), x, y, z, static_cast<int>(mob_movement_mode));
|
||||||
|
|
||||||
auto sb = who->GetStuckBehavior();
|
auto sb = who->GetStuckBehavior();
|
||||||
MobStuckBehavior behavior = RunToTarget;
|
MobStuckBehavior behavior = RunToTarget;
|
||||||
|
|||||||
@@ -169,4 +169,7 @@ protected:
|
|||||||
TimeOfDay_Struct next_event;
|
TimeOfDay_Struct next_event;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr int format_as(SpawnCondition::OnChange val) { return static_cast<int>(val); }
|
||||||
|
constexpr int format_as(SpawnEvent::Action val) { return static_cast<int>(val); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+3
-3
@@ -407,7 +407,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
|||||||
spell.target_type == ST_Beam
|
spell.target_type == ST_Beam
|
||||||
) && target_id == 0
|
) && target_id == 0
|
||||||
) {
|
) {
|
||||||
LogSpells("Spell [{}] auto-targeted the caster. Group? [{}], target type [{}]", spell_id, IsGroupSpell(spell_id), spell.target_type);
|
LogSpells("Spell [{}] auto-targeted the caster. Group? [{}], target type [{}]", spell_id, IsGroupSpell(spell_id), static_cast<int>(spell.target_type));
|
||||||
target_id = GetID();
|
target_id = GetID();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2383,7 +2383,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
LogSpells("I dont know Target Type: [{}] Spell: ([{}]) [{}]", spells[spell_id].target_type, spell_id, spells[spell_id].name);
|
LogSpells("I dont know Target Type: [{}] Spell: ([{}]) [{}]", static_cast<int>(spells[spell_id].target_type), spell_id, spells[spell_id].name);
|
||||||
Message(0, "I dont know Target Type: %d Spell: (%d) %s", spells[spell_id].target_type, spell_id, spells[spell_id].name);
|
Message(0, "I dont know Target Type: %d Spell: (%d) %s", spells[spell_id].target_type, spell_id, spells[spell_id].name);
|
||||||
CastAction = CastActUnknown;
|
CastAction = CastActUnknown;
|
||||||
break;
|
break;
|
||||||
@@ -2461,7 +2461,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LogSpells("Spell [{}]: target type [{}], target [{}], AE center [{}]", spell_id, CastAction, spell_target?spell_target->GetName():"NONE", ae_center?ae_center->GetName():"NONE");
|
LogSpells("Spell [{}]: target type [{}], target [{}], AE center [{}]", spell_id, static_cast<int>(CastAction), spell_target?spell_target->GetName():"NONE", ae_center?ae_center->GetName():"NONE");
|
||||||
|
|
||||||
// if a spell has the AEDuration flag, it becomes an AE on target
|
// if a spell has the AEDuration flag, it becomes an AE on target
|
||||||
// spell that's recast every 2500 msec for AEDuration msec.
|
// spell that's recast every 2500 msec for AEDuration msec.
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ bool TaskManager::LoadTasks(int single_task)
|
|||||||
activity_id,
|
activity_id,
|
||||||
task_data->activity_count,
|
task_data->activity_count,
|
||||||
static_cast<int32_t>(ad->activity_type),
|
static_cast<int32_t>(ad->activity_type),
|
||||||
ad->goal_method,
|
static_cast<int32_t>(ad->goal_method),
|
||||||
ad->goal_count,
|
ad->goal_count,
|
||||||
ad->zones.c_str(),
|
ad->zones.c_str(),
|
||||||
ad->target_name.c_str(),
|
ad->target_name.c_str(),
|
||||||
|
|||||||
+1
-1
@@ -746,7 +746,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
|||||||
z,
|
z,
|
||||||
heading,
|
heading,
|
||||||
ignorerestrictions,
|
ignorerestrictions,
|
||||||
zm
|
static_cast<int>(zm)
|
||||||
);
|
);
|
||||||
|
|
||||||
cheat_manager.SetExemptStatus(Port, true);
|
cheat_manager.SetExemptStatus(Port, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user