diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/npc.c | 7 | ||||
-rw-r--r-- | src/map/script.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 1721e3db3..c66f6533b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3815,13 +3815,14 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char } else if (!strcmpi(w3,"battleground")) { struct map_zone_data *zone; - if( state ) { - if( sscanf(w4, "%d", &state) == 1 ) + if (state) { + if (w4 && sscanf(w4, "%d", &state) == 1) map->list[m].flag.battleground = state; else map->list[m].flag.battleground = 1; // Default value - } else + } else { map->list[m].flag.battleground = 0; + } if( map->list[m].flag.battleground && map->list[m].flag.pvp ) { map->list[m].flag.pvp = 0; diff --git a/src/map/script.c b/src/map/script.c index a86ccfdc9..1559a2cfa 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17288,7 +17288,9 @@ BUILDIN(waitingroom2bg) { return true; } + Assert_retr(false, cd->users < MAX_CHAT_USERS); n = cd->users; // This is always < MAX_CHAT_USERS + for (i = 0; i < n && i < MAX_BG_MEMBERS; i++) { struct map_session_data *sd = cd->usersd[i]; if (sd != NULL && bg->team_join(bg_id, sd)) diff --git a/src/map/skill.c b/src/map/skill.c index 41d872b77..77e9f24aa 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2320,9 +2320,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr if( damage && sc && sc->data[SC_GENSOU] && dmg.flag&BF_MAGIC ){ struct block_list *nbl; nbl = battle->get_enemy_area(bl,bl->x,bl->y,2,BL_CHAR,bl->id); - if( nbl ){ // Only one target is chosen. - int temp = (int)(damage / (float)(10 / skill_lv)); - clif->skill_damage(bl, nbl, tick, status_get_amotion(src), 0, status_fix_damage(bl,nbl,temp,0), 1, OB_OBOROGENSOU_TRANSITION_ATK, -1, 6); + if (nbl) { // Only one target is chosen. + clif->skill_damage(bl, nbl, tick, status_get_amotion(src), 0, status_fix_damage(bl,nbl,damage * skill_lv / 10,0), 1, OB_OBOROGENSOU_TRANSITION_ATK, -1, 6); } } |