Advertisement
conan513

Untitled

Jul 24th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. // parse all slots
  2. xmlItem = xmlItem.first_child();
  3. while(!xmlItem.empty())
  4. {
  5. wiCharDataFull& w = ProfileData.ArmorySlots[ProfileData.NumSlots++];
  6. wiStats& st = w.Stats;
  7. if(ProfileData.NumSlots > wiUserProfile::MAX_LOADOUT_SLOTS)
  8. r3dError("more that 6 profiles!");
  9.  
  10. w.LoadoutID = xmlItem.attribute("CharID").as_uint();
  11. r3dscpy(w.Gamertag, xmlItem.attribute("Gamertag").value());
  12. w.Alive = xmlItem.attribute("Alive").as_int();
  13. w.Hardcore = xmlItem.attribute("Hardcore").as_int();
  14. st.XP = xmlItem.attribute("XP").as_int();
  15. st.TimePlayed = xmlItem.attribute("TimePlayed").as_int();
  16. w.Health = xmlItem.attribute("Health").as_float();
  17. w.Hunger = xmlItem.attribute("Hunger").as_float();
  18. w.Thirst = xmlItem.attribute("Thirst").as_float();
  19. w.Toxic = xmlItem.attribute("Toxic").as_float();
  20. st.Reputation = xmlItem.attribute("Reputation").as_int();
  21. w.DeathUtcTime= xmlItem.attribute("DeathTime").as_int64();
  22. w.SecToRevive = xmlItem.attribute("SecToRevive").as_int();
  23.  
  24. w.GameMapId = xmlItem.attribute("GameMapId").as_int();
  25. w.GameServerId= xmlItem.attribute("GameServerId").as_int();
  26. w.GamePos = r3dPoint3D(0, 0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement