More cleanup 2

This commit is contained in:
nytmyr
2025-01-23 13:58:27 -06:00
parent 529d26a132
commit 6364b00efd
4 changed files with 214 additions and 223 deletions
-7
View File
@@ -385,12 +385,6 @@ bool IsCommandedBotSpellType(uint16 spell_type) {
case BotSpellTypes::MovementSpeed: case BotSpellTypes::MovementSpeed:
case BotSpellTypes::SendHome: case BotSpellTypes::SendHome:
case BotSpellTypes::SummonCorpse: case BotSpellTypes::SummonCorpse:
//case BotSpellTypes::Cure:
//case BotSpellTypes::GroupCures:
//case BotSpellTypes::DamageShields:
//case BotSpellTypes::PetDamageShields:
//case BotSpellTypes::ResistBuffs:
//case BotSpellTypes::PetResistBuffs:
return true; return true;
default: default:
return false; return false;
@@ -685,7 +679,6 @@ uint16 GetCorrectBotSpellType(uint16 spell_type, uint16 spell_id) {
} }
} }
return correct_type; return correct_type;
} }
+166 -168
View File
@@ -2148,14 +2148,6 @@ void Bot::AI_Process()
} }
r_group = raid->GetGroup(GetName()); r_group = raid->GetGroup(GetName());
//if (mana_timer.Check(false)) {
// raid->SendHPManaEndPacketsFrom(this);
//}
//
//if (send_hp_update_timer.Check(false)) {
// raid->SendHPManaEndPacketsFrom(this);
//}
} }
auto bot_group = GetGroup(); auto bot_group = GetGroup();
@@ -2842,35 +2834,51 @@ void Bot::DoAttackRounds(Mob* target, int hand) {
Attack(target, hand, false, false); Attack(target, hand, false, false);
if (hand == EQ::invslot::slotPrimary) { if (hand == EQ::invslot::slotPrimary) {
bool is_two_hander = HasTwoHanderEquipped();
if (HasTwoHanderEquipped()) { auto extra_attack_chance = is_two_hander
auto extraattackchance = aabonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_CHANCE] + spellbonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_CHANCE] + ? aabonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_CHANCE] +
itembonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_CHANCE]; spellbonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_CHANCE] +
if (extraattackchance && zone->random.Roll(extraattackchance)) { itembonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_CHANCE]
auto extraattackamt = std::max({ aabonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_NUM_ATKS], spellbonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_NUM_ATKS], itembonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_NUM_ATKS] }); : aabonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_CHANCE] +
for (int i = 0; i < extraattackamt; i++) { spellbonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_CHANCE] +
Attack(target, hand, false, false); itembonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_CHANCE];
}
} int extra_attack_amt_aas = is_two_hander
} ? aabonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_NUM_ATKS]
else { : aabonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_NUM_ATKS];
auto extraattackchance_primary = aabonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_CHANCE] + spellbonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_CHANCE] +
itembonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_CHANCE]; int extra_attack_amt_spells = is_two_hander
if (extraattackchance_primary && zone->random.Roll(extraattackchance_primary)) { ? spellbonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_NUM_ATKS]
auto extraattackamt_primary = std::max({ aabonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_NUM_ATKS], spellbonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_NUM_ATKS], itembonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_NUM_ATKS] }); : spellbonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_NUM_ATKS];
for (int i = 0; i < extraattackamt_primary; i++) {
Attack(target, hand, false, false); int extra_attack_amt_items = is_two_hander
} ? itembonuses.ExtraAttackChance[SBIndex::EXTRA_ATTACK_NUM_ATKS]
: itembonuses.ExtraAttackChancePrimary[SBIndex::EXTRA_ATTACK_NUM_ATKS];
int extra_attack_amt = std::max({ extra_attack_amt_aas, extra_attack_amt_spells, extra_attack_amt_items });
if (extra_attack_chance && zone->random.Roll(extra_attack_chance)) {
for (int i = 0; i < extra_attack_amt; i++) {
Attack(target, hand, false, false);
} }
} }
} }
if (hand == EQ::invslot::slotSecondary) { if (hand == EQ::invslot::slotSecondary) {
auto extraattackchance_secondary = aabonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE] + spellbonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE] + auto extra_attack_chance_secondary =
aabonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE] +
spellbonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE] +
itembonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE]; itembonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE];
if (extraattackchance_secondary && zone->random.Roll(extraattackchance_secondary)) {
auto extraattackamt_secondary = std::max({ aabonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_NUM_ATKS], spellbonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_NUM_ATKS], itembonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_NUM_ATKS] }); if (extra_attack_chance_secondary && zone->random.Roll(extra_attack_chance_secondary)) {
for (int i = 0; i < extraattackamt_secondary; i++) { auto extra_attack_amt_secondary = std::max({
aabonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_NUM_ATKS],
spellbonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_NUM_ATKS],
itembonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_NUM_ATKS]
});
for (int i = 0; i < extra_attack_amt_secondary; i++) {
Attack(target, hand, false, false); Attack(target, hand, false, false);
} }
} }
@@ -3650,20 +3658,21 @@ bool Bot::Spawn(Client* botCharacterOwner) {
m_ping_timer.Start(8000); m_ping_timer.Start(8000);
m_auto_save_timer.Start(RuleI(Bots, AutosaveIntervalSeconds) * 1000); m_auto_save_timer.Start(RuleI(Bots, AutosaveIntervalSeconds) * 1000);
pDontHealMeBefore = 0; m_dont_heal_me_before = 0;
pDontGroupHealMeBefore = 0; m_dont_regular_heal_me_before = 0;
pDontGroupHoTHealMeBefore = 0; m_dont_very_fast_heal_me_before = 0;
pDontBuffMeBefore = Timer::GetCurrentTime() + 400; m_dont_fast_heal_me_before = 0;
pDontDotMeBefore = 0; m_dont_complete_heal_me_before = 0;
pDontRootMeBefore = 0; m_dont_hot_heal_me_before = 0;
pDontSnareMeBefore = 0; m_dont_group_heal_me_before = 0;
pDontCureMeBefore = 0; m_dont_group_hot_heal_me_before = 0;
pDontRegularHealMeBefore = 0; m_dont_group_complete_heal_me_before = 0;
pDontVeryFastHealMeBefore = 0; m_dont_buff_me_before = Timer::GetCurrentTime() + 400;
pDontFastHealMeBefore = 0; m_dont_dot_me_before = 0;
pDontCompleteHealMeBefore = 0; m_dont_root_me_before = 0;
pDontGroupCompleteHealMeBefore = 0; m_dont_snare_me_before = 0;
pDontHotHealMeBefore = 0; m_dont_cure_me_before = 0;
// there is something askew with spawn struct appearance fields... // there is something askew with spawn struct appearance fields...
// I re-enabled this until I can sort it out // I re-enabled this until I can sort it out
@@ -4404,18 +4413,19 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
event_trade.push_back(ClientTrade(trade_instance, trade_index)); event_trade.push_back(ClientTrade(trade_instance, trade_index));
continue; continue;
} }
else {
client->Message( client->Message(
Chat::Yellow, Chat::Yellow,
fmt::format( fmt::format(
"{} is too small of a stack, you need atleast {}, the trade has been cancelled!", "{} is too small of a stack, you need atleast {}, the trade has been cancelled!",
item_link, item_link,
RuleI(Bots, StackSizeMin) RuleI(Bots, StackSizeMin)
).c_str() ).c_str()
); );
client->ResetTrade(); client->ResetTrade();
return;
} return;
} }
} }
else if ( else if (
@@ -5407,34 +5417,35 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
case Class::Cleric: case Class::Cleric:
case Class::ShadowKnight: case Class::ShadowKnight:
case Class::Paladin: case Class::Paladin:
if ( {
(GetBaseRace() == OGRE || GetBaseRace() == TROLL || GetBaseRace() == BARBARIAN) || bool is_large_race = (
GetBaseRace() == OGRE ||
GetBaseRace() == TROLL ||
GetBaseRace() == BARBARIAN
);
bool has_bash_skill = GetSkill(EQ::skills::SkillBash) > 0;
bool has_shield_in_secondary =
m_inv.GetItem(EQ::invslot::slotSecondary) &&
m_inv.GetItem(EQ::invslot::slotSecondary)->GetItem()->ItemType == EQ::item::ItemTypeShield;
bool has_two_hander_with_aa =
m_inv.GetItem(EQ::invslot::slotPrimary) &&
m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->IsType2HWeapon() &&
GetAA(aa2HandBash) >= 1;
bool can_bash =
is_large_race ||
( (
GetSkill(EQ::skills::SkillBash) && has_bash_skill &&
( (
( has_shield_in_secondary || has_two_hander_with_aa
m_inv.GetItem(EQ::invslot::slotSecondary) &&
m_inv.GetItem(EQ::invslot::slotSecondary)->GetItem()->ItemType == EQ::item::ItemTypeShield
) )
|| );
(
m_inv.GetItem(EQ::invslot::slotPrimary) && if (can_bash) {
m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->IsType2HWeapon() &&
GetAA(aa2HandBash) >= 1
)
)
)
) {
skill_to_use = EQ::skills::SkillBash; skill_to_use = EQ::skills::SkillBash;
break;
}
if (GetSkill(EQ::skills::SkillKick)) {
skill_to_use = EQ::skills::SkillKick;
} }
break; break;
}
case Class::Ranger: case Class::Ranger:
case Class::Beastlord: case Class::Beastlord:
if (GetSkill(EQ::skills::SkillKick)) { if (GetSkill(EQ::skills::SkillKick)) {
@@ -5496,16 +5507,21 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
// bards can do riposte frenzy for some reason // bards can do riposte frenzy for some reason
if (!IsRiposte && GetClass() == Class::Berserker) { if (!IsRiposte && GetClass() == Class::Berserker) {
int chance = GetLevel() * 2 + GetSkill(EQ::skills::SkillFrenzy); int chance = GetLevel() * 2 + GetSkill(EQ::skills::SkillFrenzy);
if (zone->random.Roll0(450) < chance)
if (zone->random.Roll0(450) < chance) {
AtkRounds++; AtkRounds++;
if (zone->random.Roll0(450) < chance) }
if (zone->random.Roll0(450) < chance) {
AtkRounds++; AtkRounds++;
}
} }
while (AtkRounds > 0) { while (AtkRounds > 0) {
if (GetTarget() != this && TargetValidation(GetTarget())) { if (GetTarget() != this && TargetValidation(GetTarget())) {
DoSpecialAttackDamage(GetTarget(), EQ::skills::SkillFrenzy, dmg, 0, dmg, HasteMod); DoSpecialAttackDamage(GetTarget(), EQ::skills::SkillFrenzy, dmg, 0, dmg, HasteMod);
} }
AtkRounds--; AtkRounds--;
} }
@@ -5899,13 +5915,6 @@ bool Bot::CastSpell(
LogSpellsDetail("Spell casting canceled: not able to cast now. Valid? [{}] casting [{}] waiting? [{}] spellend? [{}] stunned? [{}] feared? [{}] mezed? [{}] silenced? [{}]", LogSpellsDetail("Spell casting canceled: not able to cast now. Valid? [{}] casting [{}] waiting? [{}] spellend? [{}] stunned? [{}] feared? [{}] mezed? [{}] silenced? [{}]",
IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced() IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced()
); );
//if (IsSilenced() && !IsDiscipline(spell_id)) {
// MessageString(Chat::White, SILENCED_STRING);
//}
//
//if (IsAmnesiad() && IsDiscipline(spell_id)) {
// MessageString(Chat::White, MELEE_SILENCE);
//}
if (casting_spell_id) { if (casting_spell_id) {
AI_Bot_Event_SpellCastFinished(false, static_cast<uint16>(casting_spell_slot)); AI_Bot_Event_SpellCastFinished(false, static_cast<uint16>(casting_spell_slot));
@@ -6755,56 +6764,45 @@ int64 Bot::CalcHPRegen() {
} }
int64 Bot::CalcManaRegen() { int64 Bot::CalcManaRegen() {
uint8 level = GetLevel(); uint8 level = GetLevel();
uint8 botclass = GetClass(); uint8 bot_class = GetClass();
int32 regen = 0;
if (GetClass() == Class::Bard) { // Default values
if (IsSitting()) { int32 regen = 2; // Default regen for non-sitting state
BuffFadeBySitModifier(); float mana_regen_rate = std::max(0.0f, RuleR(Bots, ManaRegen));
regen = 2;
regen += (itembonuses.ManaRegen + aabonuses.ManaRegen);
}
else {
regen = 1;
regen += (itembonuses.ManaRegen + aabonuses.ManaRegen);
}
}
else {
if (IsSitting()) {
BuffFadeBySitModifier();
if (GetArchetype() != Archetype::Melee) {
regen = ((((GetSkill(EQ::skills::SkillMeditate) / 10) + (level - (level / 4))) / 4) + 4);
regen += (spellbonuses.ManaRegen + itembonuses.ManaRegen);
}
else
regen = (2 + spellbonuses.ManaRegen + itembonuses.ManaRegen);
}
else
regen = (2 + spellbonuses.ManaRegen + itembonuses.ManaRegen);
if (IsHeroicINTCasterClass(GetClass())) { if (bot_class == Class::Bard) {
regen += itembonuses.HeroicINT * RuleR(Character, HeroicIntelligenceMultiplier) / 25; regen = IsSitting() ? 2 : 1;
}
else if (IsHeroicWISCasterClass(GetClass())) {
regen += itembonuses.HeroicWIS * RuleR(Character, HeroicWisdomMultiplier) / 25;
}
else {
regen = 0;
}
regen += aabonuses.ManaRegen; if (IsSitting()) {
regen = ((regen * RuleI(Character, ManaRegenMultiplier)) / 100); BuffFadeBySitModifier();
float mana_regen_rate = RuleR(Bots, ManaRegen); }
if (mana_regen_rate < 0.0f) { regen += itembonuses.ManaRegen + aabonuses.ManaRegen;
mana_regen_rate = 0.0f;
}
regen = (regen * mana_regen_rate); return regen;
} }
return regen; if (IsSitting()) {
BuffFadeBySitModifier();
if (GetArchetype() != Archetype::Melee) {
regen = (((GetSkill(EQ::skills::SkillMeditate) / 10) + (level - (level / 4))) / 4) + 4;
}
}
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
if (IsHeroicINTCasterClass(bot_class)) {
regen += itembonuses.HeroicINT * RuleR(Character, HeroicIntelligenceMultiplier) / 25;
} else if (IsHeroicWISCasterClass(bot_class)) {
regen += itembonuses.HeroicWIS * RuleR(Character, HeroicWisdomMultiplier) / 25;
}
regen += aabonuses.ManaRegen;
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
return static_cast<int32>(regen * mana_regen_rate);
} }
uint64 Bot::GetClassHPFactor() { uint64 Bot::GetClassHPFactor() {
@@ -10222,43 +10220,49 @@ bool Bot::IsValidTargetType(uint16 spell_id, int target_type, uint8 body_type) {
} }
bool Bot::IsMobEngagedByAnyone(Mob* tar) { bool Bot::IsMobEngagedByAnyone(Mob* tar) {
if (!tar) { if (!tar) {
return false; return false;
} }
for (Mob* m : GetSpellTargetList()) { for (Mob* m : GetSpellTargetList()) {
if (m->GetTarget() == tar) { if (m->GetTarget() != tar) {
if ( continue;
m->IsBot() && }
m->IsEngaged() &&
bool bot_is_engaged = m->IsBot() && m->IsEngaged();
bool bot_melee_or_casting =
bot_is_engaged &&
(
!m->CastToBot()->IsBotNonSpellFighter() ||
( (
!m->CastToBot()->IsBotNonSpellFighter() || m->GetLevel() >= m->CastToBot()->GetStopMeleeLevel() &&
( !m->IsCasting()
m->GetLevel() >= m->CastToBot()->GetStopMeleeLevel() &&
!m->IsCasting()
)
) )
) { );
return true;
}
if (m->IsCasting() && SpellBreaksMez(m->CastingSpellID())) { if (bot_melee_or_casting) {
return true; return true;
} }
if ( if (
m->IsClient() && m->IsCasting() &&
( SpellBreaksMez(m->CastingSpellID())
m->CastToClient()->AutoAttackEnabled() || ) {
m->CastToClient()->AutoFireEnabled() return true;
) }
) {
return true;
}
}
}
return false; if (
m->IsClient() &&
(
m->CastToClient()->AutoAttackEnabled() ||
m->CastToClient()->AutoFireEnabled()
)
) {
return true;
}
}
return false;
} }
bool Bot::IsValidMezTarget(Mob* owner, Mob* npc, uint16 spell_id) { bool Bot::IsValidMezTarget(Mob* owner, Mob* npc, uint16 spell_id) {
@@ -10904,13 +10908,7 @@ uint16 Bot::GetDefaultSpellTypePursuePriority(uint16 spell_type, uint8 bot_class
} }
uint16 Bot::GetDefaultSpellTypeResistLimit(uint16 spell_type, uint8 stance) { uint16 Bot::GetDefaultSpellTypeResistLimit(uint16 spell_type, uint8 stance) {
return IsBotSpellTypeBeneficial(spell_type) ? 0 : RuleI(Bots, SpellResistLimit);
if (!IsBotSpellTypeBeneficial(spell_type)) {
return RuleI(Bots, SpellResistLimit);
}
else {
return 0;
}
} }
bool Bot::GetDefaultSpellTypeAggroCheck(uint16 spell_type, uint8 stance) { bool Bot::GetDefaultSpellTypeAggroCheck(uint16 spell_type, uint8 stance) {
+42 -42
View File
@@ -1338,35 +1338,35 @@ public:
virtual int GetStuckBehavior() const { return 0; } virtual int GetStuckBehavior() const { return 0; }
void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false);
inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; } inline uint32 DontHealMeBefore() const { return m_dont_heal_me_before; }
inline uint32 DontGroupHealMeBefore() const { return pDontGroupHealMeBefore; } inline uint32 DontGroupHealMeBefore() const { return m_dont_group_heal_me_before; }
inline uint32 DontGroupHoTHealMeBefore() const { return pDontGroupHoTHealMeBefore; } inline uint32 DontGroupHoTHealMeBefore() const { return m_dont_group_hot_heal_me_before; }
inline uint32 DontRegularHealMeBefore() const { return pDontRegularHealMeBefore; } inline uint32 DontRegularHealMeBefore() const { return m_dont_regular_heal_me_before; }
inline uint32 DontVeryFastHealMeBefore() const { return pDontVeryFastHealMeBefore; } inline uint32 DontVeryFastHealMeBefore() const { return m_dont_very_fast_heal_me_before; }
inline uint32 DontFastHealMeBefore() const { return pDontFastHealMeBefore; } inline uint32 DontFastHealMeBefore() const { return m_dont_fast_heal_me_before; }
inline uint32 DontCompleteHealMeBefore() const { return pDontCompleteHealMeBefore; } inline uint32 DontCompleteHealMeBefore() const { return m_dont_complete_heal_me_before; }
inline uint32 DontGroupCompleteHealMeBefore() const { return pDontGroupCompleteHealMeBefore; } inline uint32 DontGroupCompleteHealMeBefore() const { return m_dont_group_complete_heal_me_before; }
inline uint32 DontHotHealMeBefore() const { return pDontHotHealMeBefore; } inline uint32 DontHotHealMeBefore() const { return m_dont_hot_heal_me_before; }
inline uint32 DontBuffMeBefore() const { return pDontBuffMeBefore; } inline uint32 DontBuffMeBefore() const { return m_dont_buff_me_before; }
inline uint32 DontDotMeBefore() const { return pDontDotMeBefore; } inline uint32 DontDotMeBefore() const { return m_dont_dot_me_before; }
inline uint32 DontRootMeBefore() const { return pDontRootMeBefore; } inline uint32 DontRootMeBefore() const { return m_dont_root_me_before; }
inline uint32 DontSnareMeBefore() const { return pDontSnareMeBefore; } inline uint32 DontSnareMeBefore() const { return m_dont_snare_me_before; }
inline uint32 DontCureMeBefore() const { return pDontCureMeBefore; } inline uint32 DontCureMeBefore() const { return m_dont_cure_me_before; }
void SetDontRootMeBefore(uint32 time) { pDontRootMeBefore = time; } void SetDontRootMeBefore(uint32 time) { m_dont_root_me_before = time; }
void SetDontHealMeBefore(uint32 time) { pDontHealMeBefore = time; } void SetDontHealMeBefore(uint32 time) { m_dont_heal_me_before = time; }
void SetDontGroupHealMeBefore(uint32 time) { pDontGroupHealMeBefore = time; } void SetDontGroupHealMeBefore(uint32 time) { m_dont_group_heal_me_before = time; }
void SetDontGroupHoTHealMeBefore(uint32 time) { pDontGroupHoTHealMeBefore = time; } void SetDontGroupHoTHealMeBefore(uint32 time) { m_dont_group_hot_heal_me_before = time; }
void SetDontRegularHealMeBefore(uint32 time) { pDontRegularHealMeBefore = time; } void SetDontRegularHealMeBefore(uint32 time) { m_dont_regular_heal_me_before = time; }
void SetDontVeryFastHealMeBefore(uint32 time) { pDontVeryFastHealMeBefore = time; } void SetDontVeryFastHealMeBefore(uint32 time) { m_dont_very_fast_heal_me_before = time; }
void SetDontFastHealMeBefore(uint32 time) { pDontFastHealMeBefore = time; } void SetDontFastHealMeBefore(uint32 time) { m_dont_fast_heal_me_before = time; }
void SetDontCompleteHealMeBefore(uint32 time) { pDontCompleteHealMeBefore = time; } void SetDontCompleteHealMeBefore(uint32 time) { m_dont_complete_heal_me_before = time; }
void SetDontGroupCompleteHealMeBefore(uint32 time) { pDontGroupCompleteHealMeBefore = time; } void SetDontGroupCompleteHealMeBefore(uint32 time) { m_dont_group_complete_heal_me_before = time; }
void SetDontHotHealMeBefore(uint32 time) { pDontHotHealMeBefore = time; } void SetDontHotHealMeBefore(uint32 time) { m_dont_hot_heal_me_before = time; }
void SetDontBuffMeBefore(uint32 time) { pDontBuffMeBefore = time; } void SetDontBuffMeBefore(uint32 time) { m_dont_buff_me_before = time; }
void SetDontDotMeBefore(uint32 time) { pDontDotMeBefore = time; } void SetDontDotMeBefore(uint32 time) { m_dont_dot_me_before = time; }
void SetDontSnareMeBefore(uint32 time) { pDontSnareMeBefore = time; } void SetDontSnareMeBefore(uint32 time) { m_dont_snare_me_before = time; }
void SetDontCureMeBefore(uint32 time) { pDontCureMeBefore = time; } void SetDontCureMeBefore(uint32 time) { m_dont_cure_me_before = time; }
// calculate interruption of spell via movement of mob // calculate interruption of spell via movement of mob
void SaveSpellLoc() { m_SpellLocation = glm::vec3(m_Position); } void SaveSpellLoc() { m_SpellLocation = glm::vec3(m_Position); }
@@ -1961,20 +1961,20 @@ protected:
bool pause_timer_complete; bool pause_timer_complete;
bool DistractedFromGrid; bool DistractedFromGrid;
uint32 pDontHealMeBefore; uint32 m_dont_heal_me_before;
uint32 pDontGroupHealMeBefore; uint32 m_dont_group_heal_me_before;
uint32 pDontGroupHoTHealMeBefore; uint32 m_dont_group_hot_heal_me_before;
uint32 pDontRegularHealMeBefore; uint32 m_dont_regular_heal_me_before;
uint32 pDontVeryFastHealMeBefore; uint32 m_dont_very_fast_heal_me_before;
uint32 pDontFastHealMeBefore; uint32 m_dont_fast_heal_me_before;
uint32 pDontCompleteHealMeBefore; uint32 m_dont_complete_heal_me_before;
uint32 pDontGroupCompleteHealMeBefore; uint32 m_dont_group_complete_heal_me_before;
uint32 pDontHotHealMeBefore; uint32 m_dont_hot_heal_me_before;
uint32 pDontBuffMeBefore; uint32 m_dont_buff_me_before;
uint32 pDontDotMeBefore; uint32 m_dont_dot_me_before;
uint32 pDontRootMeBefore; uint32 m_dont_root_me_before;
uint32 pDontSnareMeBefore; uint32 m_dont_snare_me_before;
uint32 pDontCureMeBefore; uint32 m_dont_cure_me_before;
// hp event // hp event
int nexthpevent; int nexthpevent;
+6 -6
View File
@@ -393,12 +393,12 @@ void Mob::AI_Init()
minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin); minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin);
maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax); maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax);
pDontHealMeBefore = 0; m_dont_heal_me_before = 0;
pDontBuffMeBefore = Timer::GetCurrentTime() + 400; m_dont_buff_me_before = Timer::GetCurrentTime() + 400;
pDontDotMeBefore = 0; m_dont_dot_me_before = 0;
pDontRootMeBefore = 0; m_dont_root_me_before = 0;
pDontSnareMeBefore = 0; m_dont_snare_me_before = 0;
pDontCureMeBefore = 0; m_dont_cure_me_before = 0;
} }
void NPC::AI_Init() void NPC::AI_Init()