private void LeaderPacket_NPCInfo(ByteBuffer data) { NPC newnpc = new NPC(); int index = data.GetIndex(); newnpc.Load_2(data); //ok we have new NPC //now we need to add this to the list of either mobs or NPC if (newnpc.isAttackable) { if (!gs.moblist.ContainsKey(newnpc.objid)) { gs.moblist.Add(newnpc.objid, newnpc); } else { //Console.WriteLine("repeated mob"); data.SetIndex(index); gs.moblist[newnpc.objid].Load_2(data); } } else { if (!gs.npclist.ContainsKey(newnpc.objid)) { gs.npclist.Add(newnpc.objid, newnpc); } else { //Console.WriteLine("repeated npc"); data.SetIndex(index); gs.npclist[newnpc.objid].Load_2(data); } } }