Hello,
It depends on the version of Wow, but in WOTLK by sample :
using System.Runtime.InteropServices;
using wManager.Wow.Patchables;
namespace wManager.Wow.Helpers
{
/// <summary>
/// Class WoWLock
/// </summary>
public class WoWLock
{
private readonly LockDbcRecord _lockDbcRecord0;
private static DBC<LockDbcRecord> _lockDBC;
private WoWLock(uint id)
{
if (_lockDBC == null)
_lockDBC = new DBC<LockDbcRecord>(0x00AD40F4 - 0x400000);
_lockDbcRecord0 = _lockDBC.GetRow((int) id);
}
/// <summary>
/// By id.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>WoWLock.</returns>
public static WoWLock FromId(uint id)
{
return new WoWLock(id);
}
/// <summary>
/// Get record.
/// </summary>
/// <value>The record.</value>
public LockDbcRecord Record
{
get { return _lockDbcRecord0; }
}
[StructLayout(LayoutKind.Sequential)]
public struct LockDbcRecord
{
// 1 + 4*8 = 33 fields
public uint Id;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public uint[] KeyType;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public uint[] LockType;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public uint[] Skill;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public uint[] Action;
}
}
}
Which DB do you want to read?