refactor(Script/Command): learn spell (#24319)
Co-authored-by: Treeston <14020072+Treeston@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -130,7 +130,7 @@ namespace Trainer
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Trainer::CanTeachSpell(Player const* player, Spell const* trainerSpell)
|
||||
bool Trainer::CanTeachSpell(Player const* player, Spell const* trainerSpell) const
|
||||
{
|
||||
SpellState state = GetSpellState(player, trainerSpell);
|
||||
if (state != SpellState::Available)
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Trainer
|
||||
[[nodiscard]] Spell const* GetSpell(uint32 spellId) const;
|
||||
[[nodiscard]] std::vector<Spell> const& GetSpells() const { return _spells; }
|
||||
void SendSpells(Creature* npc, Player* player, LocaleConstant locale) const;
|
||||
bool CanTeachSpell(Player const* player, Spell const* trainerSpell);
|
||||
bool CanTeachSpell(Player const* player, Spell const* trainerSpell) const;
|
||||
void TeachSpell(Creature* npc, Player* player, uint32 spellId);
|
||||
|
||||
[[nodiscard]] Type GetTrainerType() const { return _type; }
|
||||
|
||||
Reference in New Issue
Block a user