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