ソースを参照

- Fixed some 'input' max value checks not working after r12192. (bugreport:3436)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13982 54d463be-8e91-2dee-dedb-b68131a5f0ec
brianluau 16 年 前
コミット
219a527c17
2 ファイル変更6 行追加9 行削除
  1. 2 4
      npc/custom/banks/kafra_bank.txt
  2. 4 5
      npc/kafras/functions_kafras.txt

+ 2 - 4
npc/custom/banks/kafra_bank.txt

@@ -46,10 +46,9 @@ L_NoIncomeToday:
  mes"[Maniss]";
  mes "Please, tell me how much zeny you would like to deposit.";
  next;
- input @kafrabank;
+ if(input(@kafrabank) == 1) goto L_TOO_BIG_AMOUNT;
   
  if(@kafrabank<1000) goto L_LESS_1000;
- if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT;
  if(@kafrabank>zeny) goto L_NOT_ENOUGH;
  set zeny,zeny-@kafrabank;
  set #kafrabank,#kafrabank+@kafrabank;
@@ -65,10 +64,9 @@ M_WITHDRAW:
  mes "Your account: ^135445" + #kafrabank + "^000000 zeny.";
  mes "How much zeny would you like to withdraw?";
  next;
- input @kafrabank;
+ if(input(@kafrabank) == 1) goto L_TOO_BIG_AMOUNT;
   
  if(@kafrabank<1) goto B_EXIT2;
- if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT;
  if(@kafrabank>#kafrabank) goto L_NOT_ENOUGH;
  set #kafrabank,#kafrabank-@kafrabank;
  set zeny,zeny+@kafrabank;

+ 4 - 5
npc/kafras/functions_kafras.txt

@@ -665,13 +665,12 @@ function	script	F_EntKafCode	{
 		set @kafcode_try,0;
 		logmes "Hack: Tried to fit storage password.";
 	}
-	input @code_;
-	if(@code_<1000) {
-		mes "You shouldn't use such short password.";
+	if(input(@code_) == 1) {
+		mes "You can't use such big password.";
 		return 0;
 	}
-	if(@code_>10000000) {
-		mes "You can't use such big password.";
+	if(@code_<1000) {
+		mes "You shouldn't use such short password.";
 		return 0;
 	}
 	return @code_;