aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/authserver/Server/AuthSession.cpp2
-rw-r--r--src/server/database/Updater/DBUpdater.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp38
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp6
4 files changed, 12 insertions, 36 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp
index bcb1dd3fddc..60e9b734b13 100644
--- a/src/server/authserver/Server/AuthSession.cpp
+++ b/src/server/authserver/Server/AuthSession.cpp
@@ -540,7 +540,7 @@ bool AuthSession::HandleLogonProof()
packet << uint8(3);
packet << uint8(0);
SendPacket(packet);
- return false;
+ return true;
}
}
diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp
index 529e236d1ed..170954a86f4 100644
--- a/src/server/database/Updater/DBUpdater.cpp
+++ b/src/server/database/Updater/DBUpdater.cpp
@@ -311,7 +311,7 @@ bool DBUpdater<T>::Populate(DatabaseWorkerPool<T>& pool)
}
case LOCATION_DOWNLOAD:
{
- TC_LOG_ERROR("sql.updates", ">> File \"%s\" is missing, download it from \"http://www.trinitycore.org/f/files/category/1-database/\"" \
+ TC_LOG_ERROR("sql.updates", ">> File \"%s\" is missing, download it from \"https://github.com/TrinityCore/TrinityCore/releases\"" \
" and place it in your server directory.", base.filename().generic_string().c_str());
break;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index f9b9acea2fb..52291cb6bf5 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -22602,46 +22602,16 @@ void Player::LearnQuestRewardedSpells(Quest const* quest)
if (!found)
return;
- // prevent learn non first rank unknown profession and second specialization for same profession)
uint32 learned_0 = spellInfo->Effects[0].TriggerSpell;
- if (sSpellMgr->GetSpellRank(learned_0) > 1 && !HasSpell(learned_0))
+ if (!HasSpell(learned_0))
{
SpellInfo const* learnedInfo = sSpellMgr->GetSpellInfo(learned_0);
if (!learnedInfo)
return;
- // not have first rank learned (unlearned prof?)
- if (!HasSpell(learnedInfo->GetFirstRankSpell()->Id))
- return;
-
- SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr->GetSpellsRequiredForSpellBounds(learned_0);
- for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second; ++itr2)
- {
- uint32 profSpell = itr2->second;
-
- // specialization
- if (learnedInfo->Effects[0].Effect == SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effects[1].Effect == 0 && profSpell)
- {
- // search other specialization for same prof
- for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
- {
- if (itr->second->state == PLAYERSPELL_REMOVED || itr->first == learned_0)
- continue;
-
- SpellInfo const* itrInfo = sSpellMgr->GetSpellInfo(itr->first);
- if (!itrInfo)
- return;
-
- // compare only specializations
- if (itrInfo->Effects[0].Effect != SPELL_EFFECT_TRADE_SKILL || itrInfo->Effects[1].Effect != 0)
- continue;
-
- // compare same chain spells
- if (sSpellMgr->IsSpellRequiringSpell(itr->first, profSpell))
- return;
- }
- }
- }
+ // profession specialization can be re-learned from npc
+ if (learnedInfo->Effects[0].Effect == SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effects[1].Effect == 0 && !learnedInfo->SpellLevel)
+ return;
}
CastSpell(this, spell_id, true);
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index fbe5febdbb1..3fa16cf4517 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -1042,6 +1042,12 @@ std::vector<ChatCommand> ScriptMgr::GetChatCommands()
table.insert(table.end(), cmds.begin(), cmds.end());
}
+ // Sort commands in alphabetical order
+ std::sort(table.begin(), table.end(), [](const ChatCommand& a, const ChatCommand&b)
+ {
+ return strcmp(a.Name, b.Name) < 0;
+ });
+
return table;
}