mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-23 16:48:21 +00:00
Missing p_item, s_item in CombatRangeInput
This commit is contained in:
+8
-7
@@ -2291,12 +2291,17 @@ void Bot::AI_Process()
|
|||||||
bool behind_mob = BehindMob(tar, GetX(), GetY());
|
bool behind_mob = BehindMob(tar, GetX(), GetY());
|
||||||
uint8 stop_melee_level = GetStopMeleeLevel();
|
uint8 stop_melee_level = GetStopMeleeLevel();
|
||||||
tar_distance = sqrt(tar_distance); // sqrt this for future calculations
|
tar_distance = sqrt(tar_distance); // sqrt this for future calculations
|
||||||
|
// Item variables
|
||||||
|
const EQ::ItemInstance* p_item = GetBotItem(EQ::invslot::slotPrimary);
|
||||||
|
const EQ::ItemInstance* s_item = GetBotItem(EQ::invslot::slotSecondary);
|
||||||
|
|
||||||
CombatRangeInput input = {
|
CombatRangeInput input = {
|
||||||
.target = tar,
|
.target = tar,
|
||||||
.target_distance = tar_distance,
|
.target_distance = tar_distance,
|
||||||
.behind_mob = behind_mob,
|
.behind_mob = behind_mob,
|
||||||
.stop_melee_level = stop_melee_level
|
.stop_melee_level = stop_melee_level,
|
||||||
|
.p_item = p_item,
|
||||||
|
.s_item = s_item
|
||||||
};
|
};
|
||||||
|
|
||||||
CombatRangeOutput o = EvaluateCombatRange(input);
|
CombatRangeOutput o = EvaluateCombatRange(input);
|
||||||
@@ -2307,10 +2312,6 @@ void Bot::AI_Process()
|
|||||||
float melee_distance = o.melee_distance;
|
float melee_distance = o.melee_distance;
|
||||||
float melee_distance_max = o.melee_distance_max;
|
float melee_distance_max = o.melee_distance_max;
|
||||||
|
|
||||||
// Item variables
|
|
||||||
const EQ::ItemInstance* p_item = GetBotItem(EQ::invslot::slotPrimary);
|
|
||||||
const EQ::ItemInstance* s_item = GetBotItem(EQ::invslot::slotSecondary);
|
|
||||||
|
|
||||||
// PULLING FLAG (ACTIONABLE RANGE)
|
// PULLING FLAG (ACTIONABLE RANGE)
|
||||||
|
|
||||||
if (GetPullingFlag()) {
|
if (GetPullingFlag()) {
|
||||||
@@ -3088,8 +3089,8 @@ CombatRangeOutput Bot::EvaluateCombatRange(const CombatRangeInput& input) {
|
|||||||
|
|
||||||
if (!RuleB(Bots, UseFlatNormalMeleeRange)) {
|
if (!RuleB(Bots, UseFlatNormalMeleeRange)) {
|
||||||
|
|
||||||
bool is_two_hander = input.p_item && input.p_item->GetItem()->IsType2HWeapon();
|
bool is_two_hander = input.p_item && input.p_item->GetItem()->IsType2HWeapon();
|
||||||
bool is_shield = input.s_item && input.s_item->GetItem()->IsTypeShield();
|
bool is_shield = input.s_item && input.s_item->GetItem()->IsTypeShield();
|
||||||
bool is_backstab_weapon = input.p_item && input.p_item->GetItemBackstabDamage();
|
bool is_backstab_weapon = input.p_item && input.p_item->GetItemBackstabDamage();
|
||||||
|
|
||||||
switch (GetClass()) {
|
switch (GetClass()) {
|
||||||
|
|||||||
+8
-8
@@ -128,19 +128,19 @@ struct BotSpellTypesByClass_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct CombatRangeInput {
|
struct CombatRangeInput {
|
||||||
Mob* target;
|
Mob* target;
|
||||||
float target_distance;
|
float target_distance;
|
||||||
bool behind_mob;
|
bool behind_mob;
|
||||||
uint8 stop_melee_level;
|
uint8 stop_melee_level;
|
||||||
const EQ::ItemInstance* p_item;
|
const EQ::ItemInstance* p_item;
|
||||||
const EQ::ItemInstance* s_item;
|
const EQ::ItemInstance* s_item;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CombatRangeOutput {
|
struct CombatRangeOutput {
|
||||||
bool at_combat_range = false;
|
bool at_combat_range = false;
|
||||||
float melee_distance_min = 0.0f;
|
float melee_distance_min = 0.0f;
|
||||||
float melee_distance = 0.0f;
|
float melee_distance = 0.0f;
|
||||||
float melee_distance_max = 0.0f;
|
float melee_distance_max = 0.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOT_STRUCTS
|
#endif // BOT_STRUCTS
|
||||||
|
|||||||
Reference in New Issue
Block a user