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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user