Hive1991
-
Posts
3 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by Hive1991
-
-
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+
-
Closed Solutionlink posted
Item buy requirements
in OldCore modifications
Posted
Hi,
I want to make a patch witch allows you to write into the db witch item or honour an item costs.
ATM im searching the cpp where the client get the informations for that for example at the T8 set.
If someone knows where this is it would be a great help
Hive