mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
refactor(Core/Misc): headers cleanup (#9259)
This commit is contained in:
@@ -15,9 +15,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "SpellInfo.h"
|
||||
#include "PlayerCommand.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
bool Acore::PlayerCommand::HandleLearnSpellCommand(ChatHandler* handler, Player* targetPlayer, SpellInfo const* spell, Optional<EXACT_SEQUENCE("all")> allRanks)
|
||||
{
|
||||
@@ -31,23 +33,34 @@ bool Acore::PlayerCommand::HandleLearnSpellCommand(ChatHandler* handler, Player*
|
||||
if (!allRanks && targetPlayer->HasSpell(spell->Id))
|
||||
{
|
||||
if (targetPlayer == handler->GetPlayer())
|
||||
{
|
||||
handler->SendSysMessage(LANG_YOU_KNOWN_SPELL);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TARGET_KNOWN_SPELL, handler->GetNameLink(targetPlayer).c_str());
|
||||
}
|
||||
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
targetPlayer->learnSpell(spell->Id, false);
|
||||
|
||||
if (allRanks)
|
||||
{
|
||||
uint32 spellId = spell->Id;
|
||||
|
||||
while ((spellId = sSpellMgr->GetNextSpellInChain(spellId)))
|
||||
{
|
||||
targetPlayer->learnSpell(spellId, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (GetTalentSpellCost(spell->GetFirstRankSpell()->Id))
|
||||
{
|
||||
targetPlayer->SendTalentsInfoData(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -55,16 +68,25 @@ bool Acore::PlayerCommand::HandleLearnSpellCommand(ChatHandler* handler, Player*
|
||||
bool Acore::PlayerCommand::HandleUnlearnSpellCommand(ChatHandler* handler, Player* target, SpellInfo const* spell, Optional<EXACT_SEQUENCE("all")> allRanks)
|
||||
{
|
||||
uint32 spellId = spell->Id;
|
||||
|
||||
if (allRanks)
|
||||
spellId = sSpellMgr->GetFirstSpellInChain (spellId);
|
||||
{
|
||||
spellId = sSpellMgr->GetFirstSpellInChain(spellId);
|
||||
}
|
||||
|
||||
if (target->HasSpell(spellId))
|
||||
{
|
||||
target->removeSpell(spellId, SPEC_MASK_ALL, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->SendSysMessage(LANG_FORGET_SPELL);
|
||||
}
|
||||
|
||||
if (GetTalentSpellCost(spellId))
|
||||
{
|
||||
target->SendTalentsInfoData(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
|
||||
#ifndef _PLAYER_COMMAND_H
|
||||
#define _PLAYER_COMMAND_H
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
namespace Acore
|
||||
#include "Chat.h"
|
||||
#include "Common.h"
|
||||
|
||||
class Player;
|
||||
class SpellInfo;
|
||||
|
||||
namespace Acore::PlayerCommand
|
||||
{
|
||||
// Used in player/character commands
|
||||
namespace PlayerCommand
|
||||
{
|
||||
bool HandleLearnSpellCommand(ChatHandler* handler, Player* targetPlayer, SpellInfo const* spell, Optional<EXACT_SEQUENCE("all")> allRanks);
|
||||
bool HandleUnlearnSpellCommand(ChatHandler* handler, Player* targetPlayer, SpellInfo const* spell, Optional<EXACT_SEQUENCE("all")> allRanks);
|
||||
};
|
||||
bool HandleLearnSpellCommand(ChatHandler* handler, Player* targetPlayer, SpellInfo const* spell, Optional<EXACT_SEQUENCE("all")> allRanks);
|
||||
bool HandleUnlearnSpellCommand(ChatHandler* handler, Player* targetPlayer, SpellInfo const* spell, Optional<EXACT_SEQUENCE("all")> allRanks);
|
||||
};
|
||||
|
||||
#endif // _PLAYER_COMMAND_H
|
||||
|
||||
@@ -22,8 +22,8 @@ Comment: All account related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "AccountMgr.h"
|
||||
#include "AES.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Base32.h"
|
||||
#include "Chat.h"
|
||||
#include "CryptoGenerics.h"
|
||||
|
||||
@@ -22,11 +22,11 @@ Comment: All achievement related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AchievementMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ Comment: All bf related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Group.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ Comment: All cast related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Creature.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
@@ -22,17 +22,17 @@ Comment: All character related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "PlayerDump.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Bag.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "CellImpl.h"
|
||||
@@ -36,6 +35,7 @@
|
||||
#include "MapMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "Warden.h"
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
* This file contains the CommandScripts for all deserter sub-commands
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ Comment: All gm related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
@@ -31,6 +30,7 @@ EndScriptData */
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "Realm.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ Comment: All honor related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
@@ -31,6 +30,7 @@
|
||||
#include "MapMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,11 +22,12 @@ Comment: All learn related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "PlayerCommand.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Group.h"
|
||||
#include "Language.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
void GetPlayerInfo(ChatHandler* handler, Player* player)
|
||||
{
|
||||
|
||||
@@ -22,11 +22,10 @@ Comment: All list related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Creature.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
@@ -34,6 +33,7 @@ EndScriptData */
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ EndScriptData */
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,16 +22,16 @@ Comment: All message related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Channel.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
|
||||
@@ -23,13 +23,14 @@
|
||||
#include "Chat.h"
|
||||
#include "GameGraveyard.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "IPLocation.h"
|
||||
#include "Language.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "LFG.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
#include "MovementGenerator.h"
|
||||
#include "ObjectAccessor.h"
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include "Chat.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Map.h"
|
||||
#include "MMapFactory.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PathGenerator.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "PlayerCommand.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ EndScriptData */
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameGraveyard.h"
|
||||
#include "Language.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -38,11 +38,11 @@ EndScriptData */
|
||||
#include "SkillExtraItems.h"
|
||||
#include "SmartAI.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "StringConvert.h"
|
||||
#include "TicketMgr.h"
|
||||
#include "Tokenize.h"
|
||||
#include "WardenCheckMgr.h"
|
||||
#include "WaypointMgr.h"
|
||||
#include "StringConvert.h"
|
||||
#include "Tokenize.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
#include "StringConvert.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "VMapMgr2.h"
|
||||
#include <filesystem>
|
||||
#include <boost/version.hpp>
|
||||
#include <filesystem>
|
||||
#include <numeric>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <numeric>
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ Comment: All tele related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Group.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ Comment: All titles related commands
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "DBCStores.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user