Jump to content

Skirnir

Members
  • Posts

    220
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Skirnir

  1. Well if I see it right, in his case it would be easier to just fetch the rev. he's looking for from old and still working mangosproject svn (git versions aren't taged in revs. so he would have to do some deep searching):

    svn co [url]https://mangos.svn.sourceforge.net/svnroot/mangos[/url] mangos
    

    and then

    svn up -r 3400
    

    Regards

    Skir.

  2. Wouldn't it be the easiest way simply revert 8302? Or re-apply the function? Just because mangos doesn't use it anymore mustn't mean ahbot shouldn't use it anymore.

    diff --git a/src/game/Player.cpp b/src/game/Player.cpp
    index 044739e..087b6f7 100644
    --- a/src/game/Player.cpp
    +++ b/src/game/Player.cpp
    @@ -13851,6 +13851,61 @@ void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, uint64 guid, u
    /***                   LOAD SYSTEM                     ***/
    /*********************************************************/
    
    +bool Player::MinimalLoadFromDB( QueryResult *result, uint32 guid )
    +{
    +    bool delete_result = true;
    +    if (!result)
    +    {
    +        //                                        0     1     2     3           4           5           6    7          8          9         10    11
    +        result = CharacterDatabase.PQuery("SELECT guid, data, name, position_x, position_y, position_z, map, totaltime, leveltime, at_login, zone, level FROM characters WHERE guid = '%u'",guid);
    +        if (!result)
    +            return false;
    +    }
    +    else
    +        delete_result = false;
    +
    +    Field *fields = result->Fetch();
    +
    +    if (!LoadValues( fields[1].GetString()))
    +    {
    +        sLog.outError("Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid));
    +        if (delete_result)
    +            delete result;
    +        return false;
    +    }
    +
    +    // overwrite possible wrong/corrupted guid
    +    SetUInt64Value(OBJECT_FIELD_GUID, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
    +
    +    m_name = fields[2].GetCppString();
    +
    +    Relocate(fields[3].GetFloat(),fields[4].GetFloat(),fields[5].GetFloat());
    +    SetLocationMapId(fields[6].GetUInt32());
    +
    +    // the instance id is not needed at character enum
    +
    +    m_Played_time[PLAYED_TIME_TOTAL] = fields[7].GetUInt32();
    +    m_Played_time[PLAYED_TIME_LEVEL] = fields[8].GetUInt32();
    +
    +    m_atLoginFlags = fields[9].GetUInt32();
    +
    +    // I don't see these used anywhere ..
    +    /*_LoadGroup();
    +
    +    _LoadBoundInstances();*/
    +
    +    if (delete_result)
    +        delete result;
    +
    +    for (int i = 0; i < PLAYER_SLOTS_COUNT; ++i)
    +        m_items[i] = NULL;
    +
    +    if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
    +        m_deathState = DEAD;
    +
    +    return true;
    +}
    +
    void Player::_LoadDeclinedNames(QueryResult* result)
    {
        if(!result)
    diff --git a/src/game/Player.h b/src/game/Player.h
    index d31a575..f951af9 100644
    --- a/src/game/Player.h
    +++ b/src/game/Player.h
    @@ -1335,6 +1335,7 @@ class MANGOS_DLL_SPEC Player : public Unit
    
            bool LoadFromDB(uint32 guid, SqlQueryHolder *holder);
    
    +        bool MinimalLoadFromDB(QueryResult *result, uint32 guid);
            static bool   LoadValuesArrayFromDB(Tokens& data,uint64 guid);
            static uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index);
            static float  GetFloatValueFromArray(Tokens const& data, uint16 index);
    

    And so far it seem to work :)

    But I'm just a mangos "hobby-user" without big C++ knowledge so you better check twice ;) or wait for Naicisum to come up with a better version.

    Regards

    Skirnir

  3. Rev: For rev8120

    Who:Skirnir

    Fix: Build on Debian testing

    First EXTRA_DIST needs a `=' others a `+='

    diff --git a/Makefile.am b/Makefile.am
    index f26fa66..767eda7 100644
    --- a/Makefile.am
    +++ b/Makefile.am
    @@ -21,7 +21,7 @@ SUBDIRS = dep doc sql src
    
    ## Additional files to include when running 'make dist'
    # Win32 project workspace for Visual Studio .NET 2005
    -EXTRA_DIST += \\
    +EXTRA_DIST = \\
        win/mangosdVC80.sln \\
        win/VC80/framework.vcproj \\
        win/VC80/game.vcproj \\
    @@ -43,7 +43,7 @@ EXTRA_DIST += \\
        win/VC90/g3dlite.vcproj
    
    # Win32 project workspace for Visual Studio .NET 2010
    -EXTRA_DIST = \\
    +EXTRA_DIST += \\
        win/mangosdVC100.sln \\
        win/VC100/framework.vcxproj \\
        win/VC100/game.vcxproj \\
    

    Similar patch got accepted here: http://github.com/mangos/mangos/commit/577e7619070b0923bdecccf13f00ad3320cb2bf8

    Can be closed.

  4. After applying this patch to your MaNGOS folder you should find inside your MaNGOS/sql folder two new sql Files. characters_auctionhousebot.sql and charcaters_auctionhousebot_update.sql.

    You run these two sql files on your mangos characters database, first the characters_auctionhousebot.sql and after that the ..._update.sql with these second sql file you'll get an error but that doesn't matter. After running these sql files you'll find a mangos characters database table called "auctionhousebot" there you'll find the valuse of the auctionhousebot.

    hth

    Skirnir

  5. Hello,

    since 3.1.3 spell force_of_nature does not work. You only recive error messages.

    This patch will allow players to cast it. Since I'm not familiar with mangos spell system (nor do I know if this spell does work as intended) and do not know if this is a proper way of fixing I choose this section instead of "Under review ..." I hope you don't mind.

    What bug does the patch fix? What features does the patch add?

    Fixes spell 33831 force_of_nature witch changed (?) in 3.1.3

    For which repository revision was the patch created?

    8044

    Who has been writing this patch? Please include either forum user names or email addresses.

    Skirnir

    diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
    index f07ec80..8392167 100644
    --- a/src/game/SharedDefines.h
    +++ b/src/game/SharedDefines.h
    @@ -2373,7 +2373,7 @@ enum SummonType
        SUMMON_TYPE_UNKNOWN5    = 409,
        SUMMON_TYPE_UNKNOWN2    = 427,
        SUMMON_TYPE_POSESSED2   = 428,
    -    SUMMON_TYPE_FORCE_OF_NATURE = 669,
    +    SUMMON_TYPE_FORCE_OF_NATURE = 1562,
        SUMMON_TYPE_GUARDIAN2   = 1161
    };
    

    Regards

    Skirnir

×
×
  • 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