mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -2524,6 +2524,11 @@ void Player::GiveLevel(uint8 level)
|
||||
sScriptMgr->OnPlayerLevelChanged(this, oldLevel);
|
||||
}
|
||||
|
||||
bool Player::IsMaxLevel() const
|
||||
{
|
||||
return GetLevel() >= GetUInt32Value(PLAYER_FIELD_MAX_LEVEL);
|
||||
}
|
||||
|
||||
void Player::InitTalentForLevel()
|
||||
{
|
||||
uint32 talentPointsForLevel = CalculateTalentsPoints();
|
||||
@@ -14166,24 +14171,21 @@ void Player::ResummonPetTemporaryUnSummonedIfAny()
|
||||
|
||||
bool Player::CanResummonPet(uint32 spellid)
|
||||
{
|
||||
switch (getClass())
|
||||
if (getClass() == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
case CLASS_DEATH_KNIGHT:
|
||||
if (CanSeeDKPet())
|
||||
return true;
|
||||
else if (spellid == 52150) //Raise Dead
|
||||
return false;
|
||||
break;
|
||||
case CLASS_MAGE:
|
||||
if (HasSpell(31687) && HasAura(70937)) //Has [Summon Water Elemental] spell and [Glyph of Eternal Water].
|
||||
return true;
|
||||
break;
|
||||
case CLASS_HUNTER:
|
||||
case CLASS_WARLOCK:
|
||||
if (CanSeeDKPet())
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
else if (spellid == 52150) // Raise Dead
|
||||
return false;
|
||||
}
|
||||
else if (getClass() == CLASS_MAGE)
|
||||
{
|
||||
if (HasSpell(31687) && HasAura(70937)) //Has [Summon Water Elemental] spell and [Glyph of Eternal Water].
|
||||
return true;
|
||||
}
|
||||
else if (getClass() == CLASS_HUNTER)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return HasSpell(spellid);
|
||||
|
||||
@@ -1686,6 +1686,7 @@ public:
|
||||
void SetFreeTalentPoints(uint32 points);
|
||||
bool resetTalents(bool noResetCost = false);
|
||||
[[nodiscard]] uint32 resetTalentsCost() const;
|
||||
bool IsMaxLevel() const;
|
||||
void InitTalentForLevel();
|
||||
void BuildPlayerTalentsInfoData(WorldPacket* data);
|
||||
void BuildPetTalentsInfoData(WorldPacket* data);
|
||||
|
||||
@@ -2352,7 +2352,7 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP)
|
||||
WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4 + 4 + 4 + 4 + 4));
|
||||
data << uint32(questid);
|
||||
|
||||
if (GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
if (!IsMaxLevel())
|
||||
{
|
||||
data << uint32(XP);
|
||||
data << uint32(quest->GetRewOrReqMoney(GetLevel()));
|
||||
|
||||
Reference in New Issue
Block a user