From e1eab1687c962cc3bea25cb66981c28be65e6e3b Mon Sep 17 00:00:00 2001 From: celest Date: Tue, 15 Feb 2005 03:12:29 +0000 Subject: * Corrected Investigate's damage calculation * Generate the remaining entries of the stat point DB if the number of entries in db/statuspoints.txt is less than MAX_LEVEL, or statuspoints.txt was not found * Try to spawn the player at a default map ("prontera.gat") when logging in if the save point map was not found git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1107 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-SVN.txt | 8 ++++++++ src/map/battle.c | 8 ++++---- src/map/pc.c | 39 ++++++++++++++++++++++++++------------- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index d639683fb..1f437757a 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -1,5 +1,13 @@ Date Added +02/15 + * Corrected Investigate's damage calculation, thanks to matthias [celest] + * Generate the remaining entries of the stat point DB if the number of + entries in db/statuspoints.txt is less than MAX_LEVEL, or statuspoints.txt + was not found [celest] + * Try to spawn the player at a default map ("prontera.gat") when logging in if + the save point map was not found [celest] + 02/13 * added an @autoloot switch that Upa-kun has forgotten [Shinomori] * changed pet_skillattack_timer and corrected the poison spore attack diff --git a/src/map/battle.c b/src/map/battle.c index 9f3361237..f7eb6bf6c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -864,7 +864,7 @@ static struct Damage battle_calc_pet_weapon_attack( break; case MO_INVESTIGATE: // 発 勁 if(def1 < 1000000) - damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/100; + damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/50; hitrate = 1000000; s_ele = 0; break; @@ -1366,7 +1366,7 @@ static struct Damage battle_calc_mob_weapon_attack( break; case MO_INVESTIGATE: // 発 勁 if(def1 < 1000000) - damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/100; + damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/50; hitrate = 1000000; s_ele = 0; break; @@ -2173,8 +2173,8 @@ static struct Damage battle_calc_pc_weapon_attack( break; case MO_INVESTIGATE: // 発 勁 if(def1 < 1000000) { - damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/100; - damage2 = damage2*(100+ 75*skill_lv)/100 * (def1 + def2)/100; + damage = damage*(100+ 75*skill_lv)/100 * (def1 + def2)/50; + damage2 = damage2*(100+ 75*skill_lv)/100 * (def1 + def2)/50; } hitrate = 1000000; s_ele = 0; diff --git a/src/map/pc.c b/src/map/pc.c index af2297083..4c5438d50 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -766,6 +766,12 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sprintf(buf, "Last_point_map %s not found\n", sd->status.last_point.map); ShowError (buf); } + // try warping to a default map instead + if (pc_setpos(sd, "prontera.gat", 273, 354, 0) != 0) { + // if we fail again + clif_authfail_fd(sd->fd, 0); + return 1; + } } // pet @@ -6861,22 +6867,29 @@ int pc_readdb(void) // スキルツリ? memset(statp,0,sizeof(statp)); + i=0; + j=45; // base points fp=fopen("db/statpoint.txt","r"); - if(fp==NULL){ - printf("can't read db/statpoint.txt\n"); - return 1; + if(fp == NULL){ + sprintf(tmp_output,"Can't read '"CL_WHITE"%s"CL_RESET"'... Generating DB.\n","db/statpoint.txt"); + //return 1; + } else { + while(fgets(line, sizeof(line)-1, fp)){ + if(line[0]=='/' && line[1]=='/') + continue; + if ((j=atoi(line))<0) + j=0; + statp[i]=j; + i++; + } + fclose(fp); + sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/statpoint.txt"); } - i=0; - while(fgets(line, sizeof(line)-1, fp)){ - if(line[0]=='/' && line[1]=='/') - continue; - if ((j=atoi(line))<0) - j=0; - statp[i]=j; - i++; + // generate the remaining parts of the db if necessary + for (; i < MAX_LEVEL; i++) { + j += (i+15)/5; + statp[i] = j; } - fclose(fp); - sprintf(tmp_output,"Done reading '"CL_WHITE"%s"CL_RESET"'.\n","db/statpoint.txt"); ShowStatus(tmp_output); return 0; -- cgit v1.2.3-70-g09d2