Jump to content
  • 0

R> One Char per GM Src Edit


Question

Posted

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!

2 answers to this question

Recommended Posts

  • 0
Posted

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);

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...