From 5a0a12c6b07032b0ebad3393a3670ebfbf35c83d Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Tue, 2 Jun 2020 20:40:21 +0200 Subject: [PATCH] fix(Core/Spell): Allow to cast and aura all spells (#3089) --- src/server/scripts/Commands/cs_cast.cpp | 54 ------------------------- src/server/scripts/Commands/cs_misc.cpp | 9 ----- 2 files changed, 63 deletions(-) diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp index 01479be1f..6046748b4 100644 --- a/src/server/scripts/Commands/cs_cast.cpp +++ b/src/server/scripts/Commands/cs_cast.cpp @@ -74,15 +74,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId || spellInfo->HasEffect(SPELL_EFFECT_SKILL_STEP) || spellInfo->HasEffect(SPELL_EFFECT_TRADE_SKILL))) - { - handler->PSendSysMessage("Spell %u cannot be casted using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - char* triggeredStr = strtok(nullptr, " "); if (triggeredStr) { @@ -129,15 +120,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId || spellInfo->HasEffect(SPELL_EFFECT_SKILL_STEP) || spellInfo->HasEffect(SPELL_EFFECT_TRADE_SKILL))) - { - handler->PSendSysMessage("Spell %u cannot be casted using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - char* triggeredStr = strtok(nullptr, " "); if (triggeredStr) { @@ -178,15 +160,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId || spellInfo->HasEffect(SPELL_EFFECT_SKILL_STEP) || spellInfo->HasEffect(SPELL_EFFECT_TRADE_SKILL))) - { - handler->PSendSysMessage("Spell %u cannot be casted using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - char* distStr = strtok(nullptr, " "); float dist = 0; @@ -245,15 +218,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId || spellInfo->HasEffect(SPELL_EFFECT_SKILL_STEP) || spellInfo->HasEffect(SPELL_EFFECT_TRADE_SKILL))) - { - handler->PSendSysMessage("Spell %u cannot be casted using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - char* triggeredStr = strtok(nullptr, " "); if (triggeredStr) { @@ -306,15 +270,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId || spellInfo->HasEffect(SPELL_EFFECT_SKILL_STEP) || spellInfo->HasEffect(SPELL_EFFECT_TRADE_SKILL))) - { - handler->PSendSysMessage("Spell %u cannot be casted using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - char* triggeredStr = strtok(nullptr, " "); if (triggeredStr) { @@ -360,15 +315,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (handler->GetSession()->GetSecurity() < SEC_CONSOLE && (bounds.first != bounds.second || spellDifficultyId || spellInfo->HasEffect(SPELL_EFFECT_SKILL_STEP) || spellInfo->HasEffect(SPELL_EFFECT_TRADE_SKILL))) - { - handler->PSendSysMessage("Spell %u cannot be casted using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - char* posX = strtok(nullptr, " "); char* posY = strtok(nullptr, " "); char* posZ = strtok(nullptr, " "); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index b642ca67e..80f245e10 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -480,15 +480,6 @@ public: return false; } - SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId); - uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spellId); - if (bounds.first != bounds.second || spellDifficultyId) - { - handler->PSendSysMessage("Aura %u cannot be applied using a command!", spellId); - handler->SetSentErrorMessage(true); - return false; - } - Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, target, target); return true;