mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
BOT work
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:
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "x64-Debug",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "Debug",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+70
-42
@@ -49,6 +49,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
extern QueryServ* QServ;
|
extern QueryServ* QServ;
|
||||||
extern WorldServer worldserver;
|
extern WorldServer worldserver;
|
||||||
extern FastMath g_Math;
|
extern FastMath g_Math;
|
||||||
|
extern bool Critical;
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
@@ -3401,7 +3402,7 @@ bool Mob::CheckDoubleAttack()
|
|||||||
return zone->random.Int(1, 500) <= chance;
|
return zone->random.Int(1, 500) <= chance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const EQ::skills::SkillType skill_used, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks special) {
|
void Mob::CommonDamage(Mob* attacker, int& damage, const uint16 spell_id, const EQ::skills::SkillType skill_used, bool& avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks special) {
|
||||||
// This method is called with skill_used=ABJURE for Damage Shield damage.
|
// This method is called with skill_used=ABJURE for Damage Shield damage.
|
||||||
bool FromDamageShield = (skill_used == EQ::skills::SkillAbjuration);
|
bool FromDamageShield = (skill_used == EQ::skills::SkillAbjuration);
|
||||||
bool ignore_invul = false;
|
bool ignore_invul = false;
|
||||||
@@ -3466,12 +3467,12 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
// emote goes with every one ... even npcs
|
// emote goes with every one ... even npcs
|
||||||
entity_list.MessageClose(this, true, RuleI(Range, SpellMessages), Chat::Emote, "%s beams a smile at %s", attacker->GetCleanName(), this->GetCleanName());
|
entity_list.MessageClose(this, true, RuleI(Range, SpellMessages), Chat::Emote, "%s beams a smile at %s", attacker->GetCleanName(), this->GetCleanName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a client pet is damaged while sitting, stand, fix sit button,
|
// If a client pet is damaged while sitting, stand, fix sit button,
|
||||||
// and remove sitting regen. Removes bug where client clicks sit
|
// and remove sitting regen. Removes bug where client clicks sit
|
||||||
// during battle and gains pet hp-regen and bugs the sit button.
|
// during battle and gains pet hp-regen and bugs the sit button.
|
||||||
if (IsPet()) {
|
if (IsPet()) {
|
||||||
Mob *owner = this->GetOwner();
|
Mob* owner = this->GetOwner();
|
||||||
if (owner && owner->IsClient()) {
|
if (owner && owner->IsClient()) {
|
||||||
if (GetPetOrder() == SPO_Sit) {
|
if (GetPetOrder() == SPO_Sit) {
|
||||||
SetPetOrder(SPO_Follow);
|
SetPetOrder(SPO_Follow);
|
||||||
@@ -3479,28 +3480,28 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
// fix GUI sit button to be unpressed and stop sitting regen
|
// fix GUI sit button to be unpressed and stop sitting regen
|
||||||
owner->CastToClient()->SetPetCommandState(PET_BUTTON_SIT, 0);
|
owner->CastToClient()->SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||||
SetAppearance(eaStanding);
|
SetAppearance(eaStanding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} //end `if there is some damage being done and theres anattacker person involved`
|
} //end `if there is some damage being done and theres anattacker person involved`
|
||||||
|
|
||||||
Mob *pet = GetPet();
|
Mob* pet = GetPet();
|
||||||
// pets that have GHold will never automatically add NPCs
|
// pets that have GHold will never automatically add NPCs
|
||||||
// pets that have Hold and no Focus will add NPCs if they're engaged
|
// pets that have Hold and no Focus will add NPCs if they're engaged
|
||||||
// pets that have Hold and Focus will not add NPCs
|
// pets that have Hold and Focus will not add NPCs
|
||||||
if (
|
if (
|
||||||
pet &&
|
pet &&
|
||||||
!pet->IsFamiliar() &&
|
!pet->IsFamiliar() &&
|
||||||
!pet->GetSpecialAbility(IMMUNE_AGGRO) &&
|
!pet->GetSpecialAbility(IMMUNE_AGGRO) &&
|
||||||
!pet->IsEngaged() &&
|
!pet->IsEngaged() &&
|
||||||
attacker &&
|
attacker &&
|
||||||
!(pet->GetSpecialAbility(IMMUNE_AGGRO_CLIENT) && attacker->IsClient()) &&
|
!(pet->GetSpecialAbility(IMMUNE_AGGRO_CLIENT) && attacker->IsClient()) &&
|
||||||
!(pet->GetSpecialAbility(IMMUNE_AGGRO_NPC) && attacker->IsNPC()) &&
|
!(pet->GetSpecialAbility(IMMUNE_AGGRO_NPC) && attacker->IsNPC()) &&
|
||||||
attacker != this &&
|
attacker != this &&
|
||||||
!attacker->IsCorpse() &&
|
!attacker->IsCorpse() &&
|
||||||
!pet->IsGHeld() &&
|
!pet->IsGHeld() &&
|
||||||
!attacker->IsTrap()
|
!attacker->IsTrap()
|
||||||
) {
|
) {
|
||||||
if (!pet->IsHeld()) {
|
if (!pet->IsHeld()) {
|
||||||
LogAggro("Sending pet [{}] into battle due to attack", pet->GetName());
|
LogAggro("Sending pet [{}] into battle due to attack", pet->GetName());
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
@@ -3720,12 +3721,12 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
//Note: if players can become pets, they will not receive damage messages of their own
|
//Note: if players can become pets, they will not receive damage messages of their own
|
||||||
//this was done to simplify the code here (since we can only effectively skip one mob on queue)
|
//this was done to simplify the code here (since we can only effectively skip one mob on queue)
|
||||||
eqFilterType filter;
|
eqFilterType filter;
|
||||||
Mob *skip = attacker;
|
Mob* skip = attacker;
|
||||||
if (attacker && attacker->GetOwnerID()) {
|
if (attacker && attacker->GetOwnerID()) {
|
||||||
//attacker is a pet, let pet owners see their pet's damage
|
//attacker is a pet, let pet owners see their pet's damage
|
||||||
Mob* owner = attacker->GetOwner();
|
Mob* owner = attacker->GetOwner();
|
||||||
if (owner && owner->IsClient()) {
|
if (owner && owner->IsClient()) {
|
||||||
if (((spell_id != SPELL_UNKNOWN) || (FromDamageShield)) && damage>0) {
|
if (((spell_id != SPELL_UNKNOWN) || (FromDamageShield)) && damage > 0) {
|
||||||
//special crap for spell damage, looks hackish to me
|
//special crap for spell damage, looks hackish to me
|
||||||
char val1[20] = { 0 };
|
char val1[20] = { 0 };
|
||||||
owner->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
|
owner->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
|
||||||
@@ -3746,6 +3747,33 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
owner->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
|
owner->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BOTS
|
||||||
|
else if (owner && owner->IsBot() && RuleB(Bots, DisplaySpellDamage)) {
|
||||||
|
if (((spell_id != SPELL_UNKNOWN) || (FromDamageShield)) && damage > 0) {
|
||||||
|
//special crap for spell damage, looks hackish to me
|
||||||
|
char val1[20] = { 0 };
|
||||||
|
owner->CastToBot()->GetBotOwner()->CastToClient()->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, attacker->GetCleanName(), ConvertArray(damage, val1));
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (damage > 0) {
|
||||||
|
if (spell_id != SPELL_UNKNOWN)
|
||||||
|
filter = iBuffTic ? FilterDOT : FilterSpellDamage;
|
||||||
|
else
|
||||||
|
filter = FilterPetHits;
|
||||||
|
}
|
||||||
|
else if (damage == -5)
|
||||||
|
filter = FilterNone; //cant filter invulnerable
|
||||||
|
else
|
||||||
|
filter = FilterPetMisses;
|
||||||
|
|
||||||
|
if (!FromDamageShield)
|
||||||
|
owner->CastToBot()->GetBotOwner()->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
skip = owner;
|
skip = owner;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3784,8 +3812,10 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
filter = FilterNone; //cant filter invulnerable
|
filter = FilterNone; //cant filter invulnerable
|
||||||
else
|
else
|
||||||
filter = FilterMyMisses;
|
filter = FilterMyMisses;
|
||||||
|
//set to filter duplicate message to the client if client uses #damage to themselves
|
||||||
|
//if (!attacker->IsClient() && attacker->CastToClient()->GetID() != attacker->GetTarget()->GetID()) {
|
||||||
attacker->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
|
attacker->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
skip = attacker;
|
skip = attacker;
|
||||||
@@ -3808,14 +3838,14 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
// we don't send them here.
|
// we don't send them here.
|
||||||
if (!FromDamageShield) {
|
if (!FromDamageShield) {
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
// If a bot is the attacker, send a damage message ot the Bot Owner
|
// 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)) {
|
if (spell_id != SPELL_UNKNOWN && damage > 0 && !Critical && attacker && attacker != this && attacker->IsBot() && RuleB(Bots, DisplaySpellDamage)) {
|
||||||
attacker->CastToBot()->GetBotOwner()->FilteredMessageString(
|
attacker->CastToBot()->GetBotOwner()->FilteredMessageString(
|
||||||
attacker->CastToBot()->GetBotOwner(),
|
attacker->CastToBot()->GetBotOwner(),
|
||||||
Chat::DotDamage,
|
Chat::DotDamage,
|
||||||
FilterDOT,
|
FilterDOT,
|
||||||
OTHER_HIT_DOT,
|
OTHER_HIT_DOT,
|
||||||
attacker->GetTarget()->GetCleanName(),
|
attacker->GetTarget()->GetCleanName(),
|
||||||
itoa(damage),
|
itoa(damage),
|
||||||
attacker->GetCleanName(),
|
attacker->GetCleanName(),
|
||||||
spells[spell_id].name);
|
spells[spell_id].name);
|
||||||
@@ -3829,10 +3859,10 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
skip, /* Skip this mob */
|
skip, /* Skip this mob */
|
||||||
true, /* Packet ACK */
|
true, /* Packet ACK */
|
||||||
filter /* eqFilterType filter */
|
filter /* eqFilterType filter */
|
||||||
);
|
);
|
||||||
|
|
||||||
//send the damage to ourself if we are a client
|
//send the damage to ourself if we are a client
|
||||||
if (IsClient() && spell_id != SPELL_UNKNOWN) { //added !SPELL_UNKNOWN to remove duplicate display for #damage to self
|
if (IsClient() && this != attacker) { //need to add a filter 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);
|
||||||
}
|
}
|
||||||
@@ -3864,23 +3894,21 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
}
|
}
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
// If a bot is the attacker, send a damage message ot the Bot Owner
|
// 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)) {
|
else if (spell_id != SPELL_UNKNOWN && attacker->IsBot() && damage > 0 && !Critical && attacker && attacker != this && RuleB(Bots, DisplaySpellDamage)) {
|
||||||
attacker->CastToBot()->GetBotOwner()->FilteredMessageString(
|
attacker->CastToBot()->GetBotOwner()->FilteredMessageString(
|
||||||
attacker->CastToBot()->GetBotOwner(),
|
attacker->CastToBot()->GetBotOwner(),
|
||||||
Chat::DotDamage,
|
Chat::DotDamage,
|
||||||
FilterDOT,
|
FilterDOT,
|
||||||
OTHER_HIT_DOT,
|
OTHER_HIT_DOT,
|
||||||
attacker->GetTarget()->GetCleanName(),
|
attacker->GetTarget()->GetCleanName(),
|
||||||
itoa(damage),
|
itoa(damage),
|
||||||
attacker->GetCleanName(),
|
attacker->GetCleanName(),
|
||||||
spells[spell_id].name);
|
spells[spell_id].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
} //end packet sending
|
} //end packet sending
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void Mob::HealDamage(uint32 amount, Mob* caster, uint16 spell_id)
|
void Mob::HealDamage(uint32 amount, Mob* caster, uint16 spell_id)
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-4
@@ -27,6 +27,7 @@
|
|||||||
#include "../common/say_link.h"
|
#include "../common/say_link.h"
|
||||||
|
|
||||||
extern volatile bool is_zone_loaded;
|
extern volatile bool is_zone_loaded;
|
||||||
|
extern bool Critical;
|
||||||
|
|
||||||
// This constructor is used during the bot create command
|
// This constructor is used during the bot create command
|
||||||
Bot::Bot(NPCType *npcTypeData, Client* botOwner) : NPC(npcTypeData, nullptr, glm::vec4(), Ground, false), rest_timer(1), ping_timer(1) {
|
Bot::Bot(NPCType *npcTypeData, Client* botOwner) : NPC(npcTypeData, nullptr, glm::vec4(), Ground, false), rest_timer(1), ping_timer(1) {
|
||||||
@@ -6983,7 +6984,7 @@ int32 Bot::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
if (spells[spell_id].targettype == ST_Self)
|
if (spells[spell_id].targettype == ST_Self)
|
||||||
return value;
|
return value;
|
||||||
|
|
||||||
bool Critical = false;
|
Critical = false;
|
||||||
int32 value_BaseEffect = 0;
|
int32 value_BaseEffect = 0;
|
||||||
value_BaseEffect = (value + (value*GetBotFocusEffect(focusFcBaseEffects, spell_id) / 100));
|
value_BaseEffect = (value + (value*GetBotFocusEffect(focusFcBaseEffects, spell_id) / 100));
|
||||||
// Need to scale HT damage differently after level 40! It no longer scales by the constant value in the spell file. It scales differently, instead of 10 more damage per level, it does 30 more damage per level. So we multiply the level minus 40 times 20 if they are over level 40.
|
// Need to scale HT damage differently after level 40! It no longer scales by the constant value in the spell file. It scales differently, instead of 10 more damage per level, it does 30 more damage per level. So we multiply the level minus 40 times 20 if they are over level 40.
|
||||||
@@ -7028,8 +7029,9 @@ int32 Bot::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
|
|
||||||
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5)
|
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass() % 17) - 1] >= GetLevel() - 5)
|
||||||
value += (GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value) * ratio / 100);
|
value += (GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value) * ratio / 100);
|
||||||
|
//Mitch
|
||||||
entity_list.MessageClose(this, false, 100, Chat::SpellCrit, "%s delivers a critical blast! (%d)", GetName(), -value);
|
//if (!RuleB(Bots, DisplaySpellDamage))
|
||||||
|
entity_list.MessageClose(this, false, 100, Chat::SpellCrit, "%s\'s %s delivers a critical blast to %s! (%d)", GetName(), spells[spell_id].name, target->GetCleanName(), -value);
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@@ -7060,7 +7062,7 @@ int32 Bot::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
int32 value_BaseEffect = 0;
|
int32 value_BaseEffect = 0;
|
||||||
int32 chance = 0;
|
int32 chance = 0;
|
||||||
int8 modifier = 1;
|
int8 modifier = 1;
|
||||||
bool Critical = false;
|
Critical = false; //mitch
|
||||||
value_BaseEffect = (value + (value*GetBotFocusEffect(focusFcBaseEffects, spell_id) / 100));
|
value_BaseEffect = (value + (value*GetBotFocusEffect(focusFcBaseEffects, spell_id) / 100));
|
||||||
value = value_BaseEffect;
|
value = value_BaseEffect;
|
||||||
value += int(value_BaseEffect*GetBotFocusEffect(focusImprovedHeal, spell_id) / 100);
|
value += int(value_BaseEffect*GetBotFocusEffect(focusImprovedHeal, spell_id) / 100);
|
||||||
|
|||||||
+4
-2
@@ -31,6 +31,8 @@
|
|||||||
#include "zone_store.h"
|
#include "zone_store.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
|
|
||||||
|
extern bool Critical; //Mitch
|
||||||
|
|
||||||
float Mob::GetActSpellRange(uint16 spell_id, float range, bool IsBard)
|
float Mob::GetActSpellRange(uint16 spell_id, float range, bool IsBard)
|
||||||
{
|
{
|
||||||
float extrange = 100;
|
float extrange = 100;
|
||||||
@@ -48,7 +50,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
if (IsNPC())
|
if (IsNPC())
|
||||||
value += value*CastToNPC()->GetSpellFocusDMG()/100;
|
value += value*CastToNPC()->GetSpellFocusDMG()/100;
|
||||||
|
|
||||||
bool Critical = false;
|
Critical = false; //Mitch removed bool
|
||||||
int32 value_BaseEffect = 0;
|
int32 value_BaseEffect = 0;
|
||||||
int chance = 0;
|
int chance = 0;
|
||||||
|
|
||||||
@@ -268,7 +270,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
int32 value_BaseEffect = 0;
|
int32 value_BaseEffect = 0;
|
||||||
int16 chance = 0;
|
int16 chance = 0;
|
||||||
int8 modifier = 1;
|
int8 modifier = 1;
|
||||||
bool Critical = false;
|
Critical = false; //mitch
|
||||||
|
|
||||||
value_BaseEffect = value + (value*GetFocusEffect(focusFcBaseEffects, spell_id)/100);
|
value_BaseEffect = value + (value*GetFocusEffect(focusFcBaseEffects, spell_id)/100);
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ volatile bool RunLoops = true;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern volatile bool is_zone_loaded;
|
extern volatile bool is_zone_loaded;
|
||||||
|
extern bool Critical = false;
|
||||||
|
|
||||||
EntityList entity_list;
|
EntityList entity_list;
|
||||||
WorldServer worldserver;
|
WorldServer worldserver;
|
||||||
|
|||||||
+1
-1
@@ -3032,7 +3032,7 @@ void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str, Journal::O
|
|||||||
|
|
||||||
const char *Mob::GetCleanName()
|
const char *Mob::GetCleanName()
|
||||||
{
|
{
|
||||||
if (!strlen(clean_name)) {
|
if (clean_name != NULL && !strlen(clean_name)) { //extra check added for crash condition. Mitch
|
||||||
CleanMobName(GetName(), clean_name);
|
CleanMobName(GetName(), clean_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+26
-1
@@ -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);
|
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#ifndef BOTS
|
||||||
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
|
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
|
||||||
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, 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()) {
|
if (spelltar->IsAIControlled()) {
|
||||||
@@ -3875,7 +3891,16 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
|||||||
return false;
|
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()){
|
if (spelltar->IsClient()){
|
||||||
spelltar->CastToClient()->BreakSneakWhenCastOn(this, false);
|
spelltar->CastToClient()->BreakSneakWhenCastOn(this, false);
|
||||||
spelltar->CastToClient()->BreakFeignDeathWhenCastOn(false);
|
spelltar->CastToClient()->BreakFeignDeathWhenCastOn(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user