private void loadPlayerNpcs(dynamic resource) { foreach (dynamic npcRes in resource.PlayerNPCList) { var npc = new PlayerNpc(); loadPlayerNpc(npcRes, npc); _playerNpcs.Add(npc.Index, npc); } }
private void loadPlayerNpc(dynamic npcRes, PlayerNpc npc) { npc.Index = npcRes.Index; npc.Model = npcRes.NpcModel; npc.Hair = npcRes.NpcHAIR; npc.Face = npcRes.NpcFACE; npc.Upper = npcRes.NpcUPPER; npc.Pants = npcRes.NpcPANTS; npc.Legs = npcRes.NpcLEGS; npc.Foot = npcRes.NpcFOOT; npc.Hand = npcRes.NpcHAND; npc.Racket = npcRes.NpcRACKET; npc.Glasses = npcRes.NpcGLASSES; npc.Bag = npcRes.NpcBAG; npc.Cap = npcRes.NpcCAP; npc.Dye = npcRes.NpcDYE; }