summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-15 03:12:29 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-15 03:12:29 +0000
commite1eab1687c962cc3bea25cb66981c28be65e6e3b (patch)
tree9e01b86118301e1b853b97f29bc4f80e932dcd98 /src/map
parent8fa0cea72c24c464e4e43b081316af34dcf30af7 (diff)
downloadhercules-e1eab1687c962cc3bea25cb66981c28be65e6e3b.tar.gz
hercules-e1eab1687c962cc3bea25cb66981c28be65e6e3b.tar.bz2
hercules-e1eab1687c962cc3bea25cb66981c28be65e6e3b.tar.xz
hercules-e1eab1687c962cc3bea25cb66981c28be65e6e3b.zip
* 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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/pc.c39
2 files changed, 30 insertions, 17 deletions
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;