Core/Creatures: removed a unused argument from CanResetTalents

This commit is contained in:
Ovahlord
2020-01-13 14:50:37 +01:00
parent 0f73f8aeed
commit 09ebb0ed45
4 changed files with 6 additions and 6 deletions

View File

@@ -1109,7 +1109,7 @@ bool Creature::isCanInteractWithBattleMaster(Player* player, bool msg) const
return true;
}
bool Creature::CanResetTalents(Player* player, bool pet) const
bool Creature::CanResetTalents(Player* player) const
{
return player->getLevel() >= 10
&& player->getClass() == GetCreatureTemplate()->trainer_class;

View File

@@ -106,7 +106,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
/// @todo Rename these properly
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
bool CanResetTalents(Player* player, bool pet) const;
bool CanResetTalents(Player* player) const;
bool IsClassTrainerOf(Player const* player) const;
bool CanCreatureAttack(Unit const* victim, bool force = true) const;
void LoadTemplateImmunities();

View File

@@ -14372,15 +14372,15 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
}
case GOSSIP_OPTION_LEARNDUALSPEC:
case GOSSIP_OPTION_DUALSPEC_INFO:
if (!(GetSpecsCount() == 1 && creature->CanResetTalents(this, false) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
if (!(GetSpecsCount() == 1 && creature->CanResetTalents(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
canTalk = false;
break;
case GOSSIP_OPTION_UNLEARNTALENTS:
if (!creature->CanResetTalents(this, false))
if (!creature->CanResetTalents(this))
canTalk = false;
break;
case GOSSIP_OPTION_UNLEARNPETTALENTS:
if (!GetPet() || GetPet()->getPetType() != HUNTER_PET || GetPet()->m_spells.size() <= 1 || !creature->CanResetTalents(this, true))
if (!GetPet() || GetPet()->getPetType() != HUNTER_PET || GetPet()->m_spells.size() <= 1 || !creature->CanResetTalents(this))
canTalk = false;
break;
case GOSSIP_OPTION_TAXIVENDOR:

View File

@@ -90,7 +90,7 @@ void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData)
return;
}
if (!unit->CanResetTalents(_player, false))
if (!unit->CanResetTalents(_player))
return;
// remove fake death