Added BOT logging damage/heals to owner
Added BOT message to owner for harmony fails
Made var Critical global to remove duplicate crit messages
Added a NULL check to Mob:GetCleanname()
This commit is contained in:
neckkola
2021-12-30 15:42:03 -04:00
parent bcf0677656
commit bcf28bc35c
7 changed files with 123 additions and 50 deletions
+26 -1
View File
@@ -3846,8 +3846,24 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
}
else {
#ifndef BOTS
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
#endif
#ifdef BOTS
if (this->IsBot() && IsHarmonySpell(spell_id)) {
if (IsGrouped() && this->GetGroup()->GetLeader()->IsClient()) {
Bot::BotGroupSay(this, "Your target RESISTED %s", spells[spell_id].name);
}
else {
this->CastToBot()->GetBotOwner()->MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
}
}
else {
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
}
#endif
}
if (spelltar->IsAIControlled()) {
@@ -3875,7 +3891,16 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
return false;
}
}
#ifdef BOTS //Added to display when a HarmonySpell was successful from a bot
if (this->IsBot() && IsHarmonySpell(spell_id)) {
if (IsGrouped() && this->GetGroup()->GetLeader()->IsClient()) {
Bot::BotGroupSay(this, "Your spell was mostly successful.");
}
else {
this->CastToBot()->GetBotOwner()->MessageString(Chat::SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
}
}
#endif
if (spelltar->IsClient()){
spelltar->CastToClient()->BreakSneakWhenCastOn(this, false);
spelltar->CastToClient()->BreakFeignDeathWhenCastOn(false);