From 4677ae74054a6a110e27a7c1be68b35a1dad249b Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Tue, 2 Sep 2014 05:27:36 +0800 Subject: Update hunting_missions.txt to follow author's method on fixing character deletion bug https://github.com/rathena/rathena/commit/3c24f45 --- npc/custom/quests/hunting_missions.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'npc/custom/quests') diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt index c4e8187de..d4999648f 100644 --- a/npc/custom/quests/hunting_missions.txt +++ b/npc/custom/quests/hunting_missions.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.4a +//= 1.4b //===== Description: ========================================= //= Random hunting missions. //= Rewards are based on quest difficulty. @@ -17,6 +17,8 @@ //= 1.4 Fix ranking table using new SQL database [ossi0110] //= 1.4a Fix a bug when a character has deleted, that account //= can't do mission. [AnnieRuru] +//= 1.4b Update to follow author's method on fixing +//= character deletion bug [AnnieRuru] //============================================================ prontera,152,187,6 script Hunting Missions 4_F_EDEN_MASTER,{ @@ -44,9 +46,21 @@ function Chk; function Cm; switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) { case 1: mes "[Hunting Missions]"; - if ( query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(3) +" )", .@dummy ) && #Mission_Count ) { + if ( #Mission_Count ) { mes "You've started a mission"; mes "on another character."; + if ( !@hm_char_del_check ) { + if ( !query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(3) +" )", .@dummy ) ) { + next; + mes "[Hunting Missions]"; + mes "I can't seem to find any records"; + mes "for that character, though..."; + mes "One moment, please."; + emotion e_hmm; + set #Mission_Count, 0; + } + set @hm_char_del_check, 1; + } close; } if (#Mission_Delay > gettimetick(2) && .Delay) { -- cgit v1.2.3-60-g2f50