mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 16:38:26 +00:00
[Bots] Update Bot Heal & Damage methods to more closely match Clients + Bugfixes (#2045)
* - Fixed Bots Spell Damage being negative under some circumstances (heal target) - Allow Bots to send non-melee damage reports in the same manner as Clients - Refactor\Update Bots Spell Damage & Heal calculations to match current state of Clients. - Allow Bots to actually utilize Spell Damage and Heal Amount stats * Don't send packets to bots * remove random tab * align text lol
This commit is contained in:
+5
-5
@@ -1709,7 +1709,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQ::skills::Skill
|
||||
return false;
|
||||
}
|
||||
|
||||
if (killerMob && killerMob->IsClient() && (spell != SPELL_UNKNOWN) && damage > 0) {
|
||||
if (killerMob && (killerMob->IsClient() || killerMob->IsBot()) && (spell != SPELL_UNKNOWN) && damage > 0) {
|
||||
char val1[20] = { 0 };
|
||||
|
||||
entity_list.MessageCloseString(
|
||||
@@ -2293,7 +2293,7 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQ::skills::SkillTy
|
||||
return false;
|
||||
}
|
||||
|
||||
if (killer_mob->IsClient() && (spell != SPELL_UNKNOWN) && damage > 0) {
|
||||
if ((killer_mob->IsClient() || killer_mob->IsBot()) && (spell != SPELL_UNKNOWN) && damage > 0) {
|
||||
char val1[20] = { 0 };
|
||||
|
||||
entity_list.MessageCloseString(
|
||||
@@ -3935,9 +3935,8 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
}
|
||||
else {
|
||||
//attacker is not a pet, send to the attacker
|
||||
|
||||
//if the attacker is a client, try them with the correct filter
|
||||
if (attacker && attacker->IsClient()) {
|
||||
if (attacker && (attacker->IsClient() || attacker->IsBot())) {
|
||||
if ((spell_id != SPELL_UNKNOWN || FromDamageShield) && damage > 0) {
|
||||
//special crap for spell damage, looks hackish to me
|
||||
char val1[20] = { 0 };
|
||||
@@ -3958,7 +3957,8 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Only try to queue these packets to a client
|
||||
else if (attacker && (attacker->IsClient())) {
|
||||
if (damage > 0) {
|
||||
if (spell_id != SPELL_UNKNOWN)
|
||||
filter = iBuffTic ? FilterDOT : FilterSpellDamage;
|
||||
|
||||
Reference in New Issue
Block a user