Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

R> One Char per GM Src Edit


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Hi All,

 

As the title says, requesting the src edit that disables creation of new character if GM account has already one character.

 

Before, malufett posted it but can't be downloaded in the downloaded section. (Prohibited) the one created by Ind.

 

Hope someone could share it.

 

Thanks!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

Just saw this somewhere before. Maybe you can try it.

Index: src/char/char.c
===================================================================
--- src/char/char.c	(revision 15859)
+++ src/char/char.c	(working copy)
@@ -1366,6 +1366,13 @@
 			return -2; // character account limit exceeded
 	}
 
+	if( sd->group_id > 0 && sd->group_id < 99 ) {
+		if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d'", char_db, sd->account_id) )
+			Sql_ShowDebug(sql_handle);
+		if( Sql_NumRows(sql_handle) >= 1 )
+			return -2; // character account limit exceeded
+	}
+	
 	// check char slot
 	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' LIMIT 1", char_db, sd->account_id, slot) )
 		Sql_ShowDebug(sql_handle);

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   1
  • Joined:  10/18/12
  • Last Seen:  

not working on new svn?

this is not working anymore? OneCharPerGMAccount.patch 
anyone has a working patch for new SVN?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...