Core/Spell: allow Northrend Inscription Research to unlock three recipes the first time it is cast.

Port From (https://github.com/TrinityCore/TrinityCore/commit/6b7bc82641e0cb7cf8add1089d8dde0aad93edbe)
This commit is contained in:
hondacrx
2021-12-17 17:52:44 -05:00
parent 613fa25096
commit d5aa3ed8ab
2 changed files with 31 additions and 4 deletions
@@ -185,6 +185,19 @@ namespace Game.Spells
return true;
}
public static bool HasDiscoveredAnySpell(uint spellId, Player player)
{
var tab = SkillDiscoveryStorage.LookupByKey((int)spellId);
if (tab.Empty())
return false;
foreach (var item_iter in tab)
if (player.HasSpell(item_iter.spellId))
return true;
return false;
}
public static uint GetSkillDiscoverySpell(uint skillId, uint spellId, Player player)
{
uint skillvalue = skillId != 0 ? (uint)player.GetSkillValue((SkillType)skillId) : 0;