stoneharry

Untitled

Dec 19th, 2012
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. /*
  2. Output from string:
  3. INSERT INTO playerpets VALUES('216','1','Wolf','69','0','11','1','117440514 0,
  4. 117440513 0,117440512 0,0 49408,0 49408,0 49408,0 49408,100663298 0,100663297 0,
  5. 100663296 0,','500','0','0','883','1','1','1','100','310','8308733','1','1')
  6. Returned True.
  7. */
  8.  
  9. void ObjectMgr::CreateCharCreationPet(uint32 entry, uint32 ownerGUID)
  10. {
  11.     string name;
  12.     if (entry == 3122)
  13.         name = "Raptor";
  14.     else
  15.         name = "Wolf";
  16.  
  17.     std::stringstream ss;
  18.  
  19.     ss.rdbuf()->str("");
  20.  
  21.     ss << "INSERT INTO playerpets VALUES('"
  22.         << ownerGUID << "','"
  23.         << 1 << "','"
  24.         << name << "','"
  25.         << entry << "','"
  26.         << 0 << "','"
  27.         << 11 << "','"
  28.         << 1 << "','"
  29.         << "117440514 0,117440513 0,117440512 0,0 49408,0 49408,0 49408,0 49408,100663298 0,100663297 0,100663296 0," << "','"
  30.         << 500 << "','"
  31.         << 0 << "','"
  32.         << 0 << "','"
  33.         << 883 << "','"
  34.         << 1 << "','"
  35.         << 1 << "','"
  36.         << 1 << "','"
  37.         << 100 << "','"
  38.         << 310 << "','"
  39.         << 8308733 << "','"
  40.         << 1 << "','"
  41.         << 1 << "')";
  42.  
  43.     Log.Success("\n", ss.str().c_str());
  44.  
  45.     if (CharacterDatabase.Execute(ss.str().c_str()))
  46.         Log.Success("DBQuery", "Returned True.");
  47.     else
  48.         Log.Success("DBQuery", "Returned False.");
  49. }
Advertisement
Add Comment
Please, Sign In to add comment