diff options
author | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
commit | ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db (patch) | |
tree | e121e6c1e25ff47a26090437c937b022d2bfebc6 /src/map/pc.c | |
parent | dc6b470e4aaf252cb4f960b8b5585e51da821893 (diff) | |
parent | f70d54001cd1b975db6f4668a6d54dbae7a8ac92 (diff) | |
download | hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.gz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.bz2 hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.xz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.zip |
Merge pull request #425 from 4144/fixes
Different fixes after automatic checks
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index e39ddbff2..b8902d753 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1422,6 +1422,7 @@ int pc_calc_skilltree(struct map_session_data *sd) { //Enable Bard/Dancer spirit linked skills. if( sd->status.sex ) { //Link dancer skills to bard. + // i can be < 8? if( sd->status.skill[i-8].lv < 10 ) continue; sd->status.skill[i].id = skill->db[i].nameid; @@ -1430,6 +1431,7 @@ int pc_calc_skilltree(struct map_session_data *sd) } else { //Link bard skills to dancer. if( sd->status.skill[i].lv < 10 ) continue; + // i can be < 8? sd->status.skill[i-8].id = skill->db[i-8].nameid; sd->status.skill[i-8].lv = sd->status.skill[i].lv; // Set the level to the same as the linking skill sd->status.skill[i-8].flag = SKILL_FLAG_TEMPORARY; // Tag it as a non-savable, non-uppable, bonus skill @@ -3564,7 +3566,7 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag) { uint16 index = 0; nullpo_ret(sd); - if( !(index = skill->get_index(id)) || skill->db[index].name == NULL) { + if (!(index = skill->get_index(id))) { ShowError("pc_skill: Skill with id %d does not exist in the skill database\n", id); return 0; } @@ -4857,7 +4859,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil //A Rare Steal Global Announce by Lupus if(md->db->dropitem[i].p<=battle_config.rare_drop_announce) { char message[128]; - sprintf (message, msg_txt(542), (sd->status.name != NULL)?sd->status.name :"GM", md->db->jname, data->jname, (float)md->db->dropitem[i].p/100); + sprintf (message, msg_txt(542), sd->status.name, md->db->jname, data->jname, (float)md->db->dropitem[i].p / 100); //MSG: "'%s' stole %s's %s (chance: %0.02f%%)" intif->broadcast(message, strlen(message)+1, BC_DEFAULT); } @@ -6913,6 +6915,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { int i=0,j=0; int64 tick = timer->gettick(); + nullpo_retr(0, sd); + for(j = 0; j < 5; j++) { if (sd->devotion[j]){ struct map_session_data *devsd = map->id2sd(sd->devotion[j]); |