mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
fix(Core/Spell): Allow to cast and aura all spells (#3089)
This commit is contained in:
@@ -74,15 +74,6 @@ public:
|
|||||||
return false;
|
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, " ");
|
char* triggeredStr = strtok(nullptr, " ");
|
||||||
if (triggeredStr)
|
if (triggeredStr)
|
||||||
{
|
{
|
||||||
@@ -129,15 +120,6 @@ public:
|
|||||||
return false;
|
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, " ");
|
char* triggeredStr = strtok(nullptr, " ");
|
||||||
if (triggeredStr)
|
if (triggeredStr)
|
||||||
{
|
{
|
||||||
@@ -178,15 +160,6 @@ public:
|
|||||||
return false;
|
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, " ");
|
char* distStr = strtok(nullptr, " ");
|
||||||
|
|
||||||
float dist = 0;
|
float dist = 0;
|
||||||
@@ -245,15 +218,6 @@ public:
|
|||||||
return false;
|
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, " ");
|
char* triggeredStr = strtok(nullptr, " ");
|
||||||
if (triggeredStr)
|
if (triggeredStr)
|
||||||
{
|
{
|
||||||
@@ -306,15 +270,6 @@ public:
|
|||||||
return false;
|
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, " ");
|
char* triggeredStr = strtok(nullptr, " ");
|
||||||
if (triggeredStr)
|
if (triggeredStr)
|
||||||
{
|
{
|
||||||
@@ -360,15 +315,6 @@ public:
|
|||||||
return false;
|
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* posX = strtok(nullptr, " ");
|
||||||
char* posY = strtok(nullptr, " ");
|
char* posY = strtok(nullptr, " ");
|
||||||
char* posZ = strtok(nullptr, " ");
|
char* posZ = strtok(nullptr, " ");
|
||||||
|
|||||||
@@ -480,15 +480,6 @@ public:
|
|||||||
return false;
|
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);
|
Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, target, target);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user