Jump to content

Recommended Posts

  • 39 years later...
Posted

Hi,

this is the second step to get rid of the data blob.

The player skills are now stored in a new table called character_skills.

Here is the patch: http://pastebin.ca/1517785

Thanks to vladimir for the update query.

Please test and report your results.

Attention:

The update query can take quite a while to execute with big databases.

  • 3 weeks later...
Posted

Theoretically it should work in 2.x as well, since all that has been changed is the value of the update field names. But, keep in mind, the SQL query might not work, since it uses hardcoded numbers.

  • 3 weeks later...
Posted

Hey, I checked this patch, but there is one mistake I think, because I applied it and i cannot logout anymore.

Solution:

I think this part in void Player::_SaveSkills() should be removed:

if(itr->second.uState == SKILL_UNCHANGED)
   continue;

After that it works for me so far ;)

Posted
Hi,

this is the second step to get rid of the data blob.

The player skills are now stored in a new table called character_skills.

Here is the patch: http://pastebin.ca/1517785

Thanks to vladimir for the update query.

Please test and report your results.

Attention:

The update query can take quite a while to execute with big databases.

dear hunuza

think the pastebin link is broken.

Sorry, an error has occurred. Reason: That is an invalid ID, or the post has expired.
Posted

Is this something Vlad would consider? I know it's important to unscramble that ball of crap that is the player data blob;

but the whole reason the Dual Spec had to be recoded was he didn't want to add any new tables.

As was said, getting invalid ID on the link. Personally I like this idea though. Hope use it. :cool:

Posted

Patch: http://pastebin.ca/1571623

The new tables were not the reason why Vladimir did not like the dual spec patch. The problem with that dual spec patch was that it is less flexible than the solution Vladimir favored. If you want to add for example a third spec you would have to add an additional table again etc.

Another problem with the new table solution was consistency. Whenever you change one table's structure you would have to change it for the other tables as well...

Anyway, Vladimir likes this patch and even supported me with writing the update query etc.

Posted
Hey, I checked this patch, but there is one mistake I think, because I applied it and i cannot logout anymore.

Solution:

I think this part in void Player::_SaveSkills() should be removed:

if(itr->second.uState == SKILL_UNCHANGED)
   continue;

After that it works for me so far ;)

this just means skip this one and continue with next ... has nothing to do with loop

if you deleted this your char data might get bugged now...

Posted

I think the best way to test it is to add it to the main branch. Since atm this patch modifyes the characters tables and it's preutty hard to test with the risk of not beeing added.

I would gladly test it and report but yet again if it's not added ...

  • 3 weeks later...
  • 2 weeks later...
Posted

Mangos rev. 8782

Thread 2 (process 981):
#0  Player::_SaveSkills (this=0x1954830) at ../../../src/game/Player.cpp:16011
   valueData = <value optimized out>
   value = <value optimized out>
   max = <value optimized out>
#1  0x000000000068fca0 in Player::SaveToDB (this=0x1954830)
   at ../../../src/game/Player.cpp:15742
   sql_name = {static npos = 18446744073709551615, 
 _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f5a94014fb8 "Patapala"}}
   ss = <incomplete type>
   i = <value optimized out>
#2  0x0000000000692be5 in Player::Update (this=0x1954830, p_time=100)
   at ../../../src/game/Player.cpp:1287
   now = 1257631182
   pet = <value optimized out>


---Type <return> to continue, or q <return> to quit---
#3  0x00000000005da5ac in Map::Update (this=0x7f5aa073d740, 
   t_diff=@0x7f5a9affd074) at ../../../src/game/Map.cpp:595
   plr = (class Player *) 0x1954830
   updater = {i_timeDiff = 100}
   grid_object_update = {i_visitor = @0x7f5a9affd000}
   world_object_update = {i_visitor = @0x7f5a9affd000}
   __PRETTY_FUNCTION__ = "virtual void Map::Update(const uint32&)"
#4  0x00000000005e9328 in MapManager::Update (.omp_data_i=0x7f5ab4bd5fb0)
   at ../../../src/game/MapManager.cpp:280
   update_queue = {<std::_Vector_base<Map*, std::allocator<Map*> >> = {
   _M_impl = {<std::allocator<Map*>> = {<__gnu_cxx::new_allocator<Map*>> = {<No data fields>}, <No data fields>}, _M_start = 0x191bf10, 
     _M_finish = 0x191bf90, _M_end_of_storage = 0x191bf90}}, <No data fields>}
#5  0x00007f5abdd5ac85 in ?? () from /usr/lib/libgomp.so.1
No symbol table info available.
#6  0x00007f5abd6403ba in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x00007f5abcc02fcd in clone () from /lib/libc.so.6
No symbol table info available.
#8  0x0000000000000000 in ?? ()
No symbol table info available.

Player.cpp:15742

   _SaveBGData();
   _SaveInventory();
   _SaveQuestStatus();
   _SaveDailyQuestStatus();
   _SaveSpells();
   _SaveSpellCooldowns();
   _SaveActions();
   _SaveAuras();
  [color=Red] _SaveSkills();[/color]
   m_achievementMgr.SaveToDB();
   m_reputationMgr.SaveToDB();
   _SaveEquipmentSets();
   GetSession()->SaveTutorialsData();                      // changed only while character in game

Player.cpp:1287

    if(m_nextSave > 0)
   {
       if(p_time >= m_nextSave)
       {
           // m_nextSave reseted in SaveToDB call
           [color=Red]SaveToDB();[/color]
           sLog.outDetail("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
       }
       else
       {
           m_nextSave -= p_time;
       }
   }

Att DarkTerror

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use