summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-03-16 12:36:24 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-03-16 12:36:24 +0800
commit5b1fee9ef54dbfc27fef5f6125a678fa88eba1be (patch)
tree6c98dfacc605296b32afcbef94190b7d72c3d0a8 /src/char/char.c
parentf214021bb14aa3ab976730b32dd79d843ff8e93e (diff)
downloadhercules-5b1fee9ef54dbfc27fef5f6125a678fa88eba1be.tar.gz
hercules-5b1fee9ef54dbfc27fef5f6125a678fa88eba1be.tar.bz2
hercules-5b1fee9ef54dbfc27fef5f6125a678fa88eba1be.tar.xz
hercules-5b1fee9ef54dbfc27fef5f6125a678fa88eba1be.zip
Enhance Pincode Feature.
-added a hack check for pincode feature. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 9e63a682c..260f7a5cf 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3741,6 +3741,18 @@ int parse_char(int fd)
int slot = RFIFOB(fd,2);
RFIFOSKIP(fd,3);
+ if( *pincode->enabled ){ // hack check
+ struct online_char_data* character;
+ character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
+ if( character && character->pincode_enable == -1){
+ WFIFOHEAD(fd,3);
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd,3);
+ break;
+ }
+ }
+
if ( SQL_SUCCESS != Sql_Query(sql_handle, "SELECT `char_id` FROM `%s` WHERE `account_id`='%d' AND `char_num`='%d'", char_db, sd->account_id, slot)
|| SQL_SUCCESS != Sql_NextRow(sql_handle)
|| SQL_SUCCESS != Sql_GetData(sql_handle, 0, &data, NULL) )
@@ -3936,6 +3948,18 @@ int parse_char(int fd)
{
int cid = RFIFOL(fd,2);
+ if( *pincode->enabled ){ // hack check
+ struct online_char_data* character;
+ character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
+ if( character && character->pincode_enable == -1 ){
+ WFIFOHEAD(fd,3);
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd,3);
+ break;
+ }
+ }
+
ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid);
memcpy(email, RFIFOP(fd,6), 40);
RFIFOSKIP(fd,( cmd == 0x68) ? 46 : 56);