Jump to content

[8874][patch] Extract player skills from data blob


Auntie Mangos

Recommended Posts

Because it was just made to "work". Nothing else.

And I thought that it was so because close to Bliz. data structures...

And because in case of split field "data" into several fields - there will be too many fields... may be it will bring DB to slower work and some other problems...

If you have to do some DB just make to "work" will you do it such hard way ?

Link to comment
Share on other sites

With all values saved in data blob there can be several issues with saving and loading them.

I.e. aura #73 is applied, values in data blob are changed (increased/decreased) but not changed back when the aura fades during character offline time. Sounds pretty strange, but it is.

Link to comment
Share on other sites

why not make a table "player_data" with fields: (playerguid, field, value)

would be a lot easier to mantain and update

And It would be much slower to load into core.

However, does _this_ patch has any problems now? Is it requires testing or there are some issues why it is not accepted?

Link to comment
Share on other sites

The patch will lead to server hang up when trying to save SKILL_UNCHANGED skill. The following patch will fix it.

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index fadfc43..38493d5 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -16273,8 +16273,11 @@ void Player::_SaveSkills()
    // we don't need transactions here.
    for( SkillStatusMap::iterator itr = mSkillStatus.begin(); itr != mSkillStatus.end(); )
    {
-        if(itr->second.uState == SKILL_UNCHANGED)
+        if(itr->second.uState == SKILL_UNCHANGED)
+        {
+            ++itr;
            continue;
+        }

        if(itr->second.uState == SKILL_DELETED)
        {

Link to comment
Share on other sites

Just one question. I've seen that the skills are inserted into character_skills, that means that they are deleted from the data blob right?

I'm just asking becouse i haven't seen anything like this in here.

http://github.com/mangos/mangos/blob/5151306ea49eb3bc1d4feee4d574edc30c096cb0/sql/updates/8874_01_characters_character_skills.sql

Link to comment
Share on other sites

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