mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
^cast adjustments for spellid casts
This commit is contained in:
@@ -11195,6 +11195,14 @@ bool Bot::AttemptForcedCastSpell(Mob* tar, uint16 spell_id) {
|
|||||||
tar = this;
|
tar = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((IsCharmSpell(forcedSpellID) || IsPetSpell(forcedSpellID) && HasPet())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsResurrectSpell(forcedSpellID) && (!tar->IsCorpse() || !tar->CastToCorpse()->IsPlayerCorpse())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsBeneficialSpell(forcedSpellID)) {
|
if (IsBeneficialSpell(forcedSpellID)) {
|
||||||
if (
|
if (
|
||||||
(tar->IsNPC() && !tar->GetOwner()) ||
|
(tar->IsNPC() && !tar->GetOwner()) ||
|
||||||
|
|||||||
@@ -752,6 +752,7 @@ public:
|
|||||||
|
|
||||||
// "Quest API" Methods
|
// "Quest API" Methods
|
||||||
bool HasBotSpellEntry(uint16 spell_id);
|
bool HasBotSpellEntry(uint16 spell_id);
|
||||||
|
bool CanUseBotSpell(uint16 spell_id);
|
||||||
void ApplySpell(int spell_id, int duration = 0, int level = -1, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
|
void ApplySpell(int spell_id, int duration = 0, int level = -1, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
|
||||||
void BreakInvis();
|
void BreakInvis();
|
||||||
void Escape();
|
void Escape();
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
|
|||||||
SPDat_Spell_Struct spell = spells[chosenSpellID];
|
SPDat_Spell_Struct spell = spells[chosenSpellID];
|
||||||
|
|
||||||
LogTestDebug("Starting bySpellID checks."); //deleteme
|
LogTestDebug("Starting bySpellID checks."); //deleteme
|
||||||
if (!bot_iter->HasBotSpellEntry(chosenSpellID)) {
|
if (!bot_iter->CanUseBotSpell(chosenSpellID)) {
|
||||||
LogTestDebug("{} does not have {} [#{}].", bot_iter->GetCleanName(), spell.name, chosenSpellID); //deleteme
|
LogTestDebug("{} does not have {} [#{}].", bot_iter->GetCleanName(), spell.name, chosenSpellID); //deleteme
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user