Core/Items: Refactored learning spells from items to check for ITEM_SPELLTRIGGER_LEARN_SPELL_ID instead of hardcoded spell ids

Port From (https://github.com/TrinityCore/TrinityCore/commit/6b69338990a651c54dd9d2b5ad3281a4d702efb7)
This commit is contained in:
hondacrx
2021-10-16 18:18:28 -04:00
parent e9c6424cd8
commit d2c62555c1
4 changed files with 25 additions and 48 deletions
-5
View File
@@ -2592,11 +2592,6 @@ namespace Game.Entities
public void SetChildItem(ObjectGuid childItem) { m_childItem = childItem; }
public ItemEffectRecord[] GetEffects() { return _bonusData.Effects[0.._bonusData.EffectCount]; }
public ItemEffectRecord GetEffect(int i)
{
Cypher.Assert(i < _bonusData.EffectCount, $"Attempted to get effect at index {i} but item has only {_bonusData.EffectCount} effects!");
return _bonusData.Effects[i];
}
//Static
public static bool ItemCanGoIntoBag(ItemTemplate pProto, ItemTemplate pBagProto)