mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 09:28:21 +00:00
2021-03-25 11L04pm
Spell and Heal Rule added to allow for Bot spell and heal damage to be sent to the Bot Owner's Group. Also added a check to remove duplicate message for #damage on self.
This commit is contained in:
+2
-1
@@ -614,7 +614,8 @@ RULE_REAL(Bots, LeashDistance, 562500.0f, "Distance a bot is allowed to travel f
|
|||||||
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'")
|
||||||
RULE_BOOL(Bots, AllowApplyPotionCommand, true, "Allows the use of the bot command 'applypotion'")
|
RULE_BOOL(Bots, AllowApplyPotionCommand, true, "Allows the use of the bot command 'applypotion'")
|
||||||
RULE_BOOL(Bots, RestrictApplyPotionToRogue, true, "Restricts the bot command 'applypotion' to rogue-usable potions (i.e., poisons)")
|
RULE_BOOL(Bots, RestrictApplyPotionToRogue, true, "Restricts the bot command 'applypotion' to rogue-usable potions (i.e., poisons)")
|
||||||
RULE_BOOL(Bots, DisplayHealDamage, false, "Enables the display of bot heal damage to the client")
|
RULE_BOOL(Bots, DisplayHealDamage, false, "Enables the display of bot heal damage to the bot owner client")
|
||||||
|
RULE_BOOL(Bots, DisplaySpellDamage, false, "Enables the display of bot spell damage to the bot owner client")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+31
-2
@@ -3807,7 +3807,20 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
// If this is Damage Shield damage, the correct OP_Damage packets will be sent from Mob::DamageShield, so
|
// If this is Damage Shield damage, the correct OP_Damage packets will be sent from Mob::DamageShield, so
|
||||||
// we don't send them here.
|
// we don't send them here.
|
||||||
if (!FromDamageShield) {
|
if (!FromDamageShield) {
|
||||||
|
#ifdef BOTS
|
||||||
|
// If a bot is the attacker, send a damage message ot the Bot Owner
|
||||||
|
if (spell_id != SPELL_UNKNOWN && damage > 0 && attacker && attacker != this && attacker->IsBot() && RuleB(Bots, DisplaySpellDamage)) {
|
||||||
|
attacker->CastToBot()->GetBotOwner()->FilteredMessageString(
|
||||||
|
attacker->CastToBot()->GetBotOwner(),
|
||||||
|
Chat::DotDamage,
|
||||||
|
FilterDOT,
|
||||||
|
OTHER_HIT_DOT,
|
||||||
|
attacker->GetTarget()->GetCleanName(),
|
||||||
|
itoa(damage),
|
||||||
|
attacker->GetCleanName(),
|
||||||
|
spells[spell_id].name);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
entity_list.QueueCloseClients(
|
entity_list.QueueCloseClients(
|
||||||
this, /* Sender */
|
this, /* Sender */
|
||||||
outapp, /* packet */
|
outapp, /* packet */
|
||||||
@@ -3819,7 +3832,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
);
|
);
|
||||||
|
|
||||||
//send the damage to ourself if we are a client
|
//send the damage to ourself if we are a client
|
||||||
if (IsClient()) {
|
if (IsClient() && spell_id != SPELL_UNKNOWN) { //added !SPELL_UNKNOWN to remove duplicate display for #damage to self
|
||||||
//I dont think any filters apply to damage affecting us
|
//I dont think any filters apply to damage affecting us
|
||||||
CastToClient()->QueuePacket(outapp);
|
CastToClient()->QueuePacket(outapp);
|
||||||
}
|
}
|
||||||
@@ -3849,6 +3862,22 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
spells[spell_id].name /* Message4 */
|
spells[spell_id].name /* Message4 */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#ifdef BOTS
|
||||||
|
// If a bot is the attacker, send a damage message ot the Bot Owner
|
||||||
|
else if (spell_id != SPELL_UNKNOWN && attacker->IsBot() && damage > 0 && attacker && attacker !=this && RuleB(Bots, DisplaySpellDamage)) {
|
||||||
|
attacker->CastToBot()->GetBotOwner()->FilteredMessageString(
|
||||||
|
attacker->CastToBot()->GetBotOwner(),
|
||||||
|
Chat::DotDamage,
|
||||||
|
FilterDOT,
|
||||||
|
OTHER_HIT_DOT,
|
||||||
|
attacker->GetTarget()->GetCleanName(),
|
||||||
|
itoa(damage),
|
||||||
|
attacker->GetCleanName(),
|
||||||
|
spells[spell_id].name);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
} //end packet sending
|
} //end packet sending
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user