29 static std::vector<ChatCommand> learnAllMyCommandTable =
36 static std::vector<ChatCommand> learnAllCommandTable =
46 static std::vector<ChatCommand> learnCommandTable =
52 static std::vector<ChatCommand> commandTable =
73 if (!spell || !
sSpellMgr->GetSpellInfo(spell))
76 char const* all = strtok(NULL,
" ");
77 bool allRanks = all ? (strncmp(all,
"all", strlen(all)) == 0) :
false;
87 if (!allRanks && targetPlayer->
HasSpell(spell))
270 std::wstring namePart;
292 name = skillInfo->
name;
299 targetSkillInfo = skillInfo;
302 if (!targetSkillInfo)
324 if (skillLine->
skillId != skillId)
357 char const* allStr = strtok(NULL,
" ");
358 bool allRanks = allStr ? (strncmp(allStr,
"all", strlen(allStr)) == 0) :
false;
369 spellId =
sSpellMgr->GetFirstSpellInChain(spellId);
uint32 GetTalentSpellCost(uint32 spellId)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< TalentEntry > sTalentStore(TalentEntryfmt)
DBCStorage< SkillLineAbilityEntry > sSkillLineAbilityStore(SkillLineAbilityfmt)
DBCStorage< ChrClassesEntry > sChrClassesStore(ChrClassesEntryfmt)
@ LANG_COMMAND_LEARN_ALL_RECIPES
@ LANG_COMMAND_LEARN_ALL_CRAFT
@ LANG_LEARNING_GM_SKILLS
@ LANG_COMMAND_LEARN_CLASS_TALENTS
@ LANG_COMMAND_LEARN_CLASS_SPELLS
@ LANG_COMMAND_LEARN_ALL_LANG
@ LANG_COMMAND_SPELL_BROKEN
@ LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST
@ LANG_TARGET_KNOWN_SPELL
LanguageDesc lang_description[LANGUAGES_COUNT]
@ SKILL_CATEGORY_SECONDARY
@ SKILL_CATEGORY_PROFESSION
bool Utf8FitTo(const std::string &str, const std::wstring &search)
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
void wstrToLower(std::wstring &str)
virtual std::string GetNameLink() const
Player * getSelectedPlayer()
WorldSession * GetSession()
uint32 extractSpellIdFromLink(char *text)
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
void SetSentErrorMessage(bool val)
bool extractPlayerTarget(char *args, Player **player, uint64 *player_guid=NULL, std::string *player_name=NULL)
virtual void SendSysMessage(const char *str)
CommandScript(const char *name)
void learnDefaultSpells()
void SendTalentsInfoData()
bool IsSpellFitByClassAndRace(uint32 spell_id) const
uint16 GetSkillStep(uint16 skill) const
uint16 GetPureMaxSkillValue(uint32 skill) const
void SetSkill(uint16 id, uint16 step, uint16 currVal, uint16 maxVal)
void learnSpellHighRank(uint32 spellid)
void removeSpell(uint32 spell_id, bool disabled=false, bool learn_low_rank=true)
void learnSpell(uint32 spell_id, bool dependent)
uint8 GetActiveSpec() const
bool HasSpell(uint32 spell) const override
void learnQuestRewardedSpells()
bool AddTalent(uint32 spellId, uint8 spec, bool learning)
SpellInfo const * GetFirstRankSpell() const
bool IsAbilityOfSkillType(uint32 skillType) const
static bool IsSpellValid(SpellInfo const *spellInfo, Player *player=NULL, bool msg=true)
Some checks for spells, to prevent adding deprecated/broken spells for trainers, spell book,...
uint32 getClassMask() const
Player * GetPlayer() const
static bool HandleLearnAllDefaultCommand(ChatHandler *handler, char const *args)
static bool HandleLearnAllCraftsCommand(ChatHandler *handler, char const *args)
static bool HandleLearnAllMyClassCommand(ChatHandler *handler, char const *)
static bool HandleLearnAllMySpellsCommand(ChatHandler *handler, char const *)
static bool HandleLearnAllRecipesCommand(ChatHandler *handler, char const *args)
static bool HandleLearnCommand(ChatHandler *handler, char const *args)
std::vector< ChatCommand > GetCommands() const OVERRIDE
static bool HandleLearnAllLangCommand(ChatHandler *handler, char const *)
static bool HandleUnLearnCommand(ChatHandler *handler, char const *args)
static bool HandleLearnAllMyTalentsCommand(ChatHandler *handler, char const *)
static bool HandleLearnAllGMCommand(ChatHandler *handler, char const *)
static void HandleLearnSkillRecipesHelper(Player *player, uint32 skillId)
void AddSC_learn_commandscript()
@ RBAC_PERM_COMMAND_UNLEARN
@ RBAC_PERM_COMMAND_LEARN_ALL_LANG
@ RBAC_PERM_COMMAND_LEARN_ALL_CRAFTS
@ RBAC_PERM_COMMAND_LEARN_ALL_MY
@ RBAC_PERM_COMMAND_LEARN_ALL_RECIPES
@ RBAC_PERM_COMMAND_LEARN_ALL_MY_CLASS
@ RBAC_PERM_COMMAND_LEARN
@ RBAC_PERM_COMMAND_LEARN_ALL_MY_TALENTS
@ RBAC_PERM_COMMAND_LEARN_ALL_MY_SPELLS
@ RBAC_PERM_COMMAND_LEARN_ALL_GM
@ RBAC_PERM_COMMAND_LEARN_ALL_DEFAULT
@ RBAC_PERM_COMMAND_LEARN_ALL