protected void NpcStateUpdate(byte type, List<byte> data)
{
byte[] packet = data.ToArray();
UInt32 id = BitConverter.ToUInt32(packet, 1);
byte state = packet[5];
if (!m_owner.BotGameData.Npcs.ContainsKey(id))
{
Console.WriteLine("{0}: [D2GS] Npc ({1}) not found in map... Adding with type = 0", m_owner.Account, id);
m_owner.BotGameData.Npcs.Add(id, new NpcEntity(id, 0, 0, 0, 0));
}
if (state == 0x09 || state == 0x08)
m_owner.BotGameData.Npcs[id].Life = 0;
else
m_owner.BotGameData.Npcs[id].Life = packet[10];
m_owner.BotGameData.Npcs[id].Location.X = BitConverter.ToUInt16(packet,6);
m_owner.BotGameData.Npcs[id].Location.Y = BitConverter.ToUInt16(packet, 8);
}