Core/Chat: Allow incorrect spell/skill language assignments to mirror client behavior

Port From (https://github.com/TrinityCore/TrinityCore/commit/14098b28b39bc9d1ea17d18a7ecd3dd610f29cdc)
This commit is contained in:
hondacrx
2021-05-03 22:15:02 -04:00
parent 89633000d1
commit cbb22d291e
10 changed files with 89 additions and 132 deletions
+30
View File
@@ -10887,6 +10887,36 @@ namespace Game
{
public uint SpellId;
public uint SkillId;
public LanguageDesc() { }
public LanguageDesc(uint spellId, uint skillId)
{
SpellId = spellId;
SkillId = skillId;
}
public override int GetHashCode()
{
return SpellId.GetHashCode() ^ SkillId.GetHashCode();
}
public override bool Equals(object obj)
{
if (obj is LanguageDesc)
return (LanguageDesc)obj == this;
return false;
}
public static bool operator ==(LanguageDesc left, LanguageDesc right)
{
return left.SpellId == right.SpellId && left.SkillId == right.SkillId;
}
public static bool operator !=(LanguageDesc left, LanguageDesc right)
{
return !(left == right);
}
}
class ItemSpecStats