Jump to content

Hive1991

Members
  • Posts

    3
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Hive1991

  1. Made by Hive

    What does the patch do ?

    You can give GM permissions per server not only for all.

    How does this work?

    You can give global permissions at the account table at gmlevel or you can

    give rights for only one of the servers at the realmlist.

    This is at the account_forcepermission table.

    Think it is selfexplaining.

    PATCH:

    @@ -40,10 +40,12 @@

    #include "Auth/Sha1.h"

    #include "WorldSession.h"

    #include "WorldSocketMgr.h"

    #include "Log.h"

    #include "WorldLog.h"

    +#include "Config/ConfigEnv.h"

    #if defined( __GNUC__ )

    #pragma pack(1)

    #else

    #pragma pack(push,1)

    @@ -884,11 +886,24 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)

    return -1;

    }

    }

    id = fields[0].GetUInt32 ();

    - security = fields[1].GetUInt16 ();

    +

    + uint32 realmID = sConfig.GetIntDefault("RealmID", 0);

    +

    + QueryResult *result2 = loginDatabase.PQuery("SELECT Security FROM account_forcepermission WHERE AccountID = '%u' AND `realmID` = '%u'", id, realmID);

    +

    + if(fields[1].GetUInt16 () > 0)

    + security = fields[1].GetUInt16 ();

    + else if(result2)

    + security = (*result2)[0].GetUInt32();

    + else

    + security = SEC_PLAYER;

    +

    + delete result2;

    +

    if(security > SEC_ADMINISTRATOR) // prevent invalid security settings in DB

    security = SEC_ADMINISTRATOR;

    K.SetHexStr (fields[2].GetString ());

    here the table for the logon Database:

    CREATE TABLE `account_forcepermission` (

    `AccountID` int(11) unsigned NOT NULL default '0',

    `realmID` int(3) unsigned NOT NULL default '0',

    `Security` int(3) unsigned default '0',

    PRIMARY KEY (`AccountID`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    I will Update this from time to time

    Happy about rep+

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