summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStreusel <advance_me@hotmail.de>2013-02-21 16:49:52 -0800
committerStreusel <advance_me@hotmail.de>2013-02-21 16:49:52 -0800
commit6165590a1a68653ad1fa3dd14306a2e64dc9c5c9 (patch)
tree01c1d41bfbca9964046fb05135bd17105da7f34c /src
parent803169a68c6b3dcf9d0db07b479d4bad65894603 (diff)
parent84926b94e869a19f08a7a25df15b4c677316cd32 (diff)
downloadhercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.tar.gz
hercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.tar.bz2
hercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.tar.xz
hercules-6165590a1a68653ad1fa3dd14306a2e64dc9c5c9.zip
Merge branch 'master' of github.com:HerculesWS/Hercules
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c11
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/homunculus.c13
-rw-r--r--src/map/status.c1
-rw-r--r--src/map/unit.c6
5 files changed, 13 insertions, 20 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 0d56ce9bf..dbf66b6aa 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6884,7 +6884,7 @@ ACMD_FUNC(showmobs)
ACMD_FUNC(homlevel)
{
TBL_HOM * hd;
- int level = 0, i = 0;
+ int level = 0;
nullpo_retr(-1, sd);
@@ -6900,10 +6900,13 @@ ACMD_FUNC(homlevel)
hd = sd->hd;
- for (i = 1; i <= level && hd->exp_next; i++){
+ if ( battle_config.hom_max_level == hd->homunculus.level ) // Already reach maximum level
+ return 0;
+
+ do{
hd->homunculus.exp += hd->exp_next;
- merc_hom_levelup(hd);
- }
+ }while( hd->homunculus.level < level && merc_hom_levelup(hd) );
+
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
clif_specialeffect(&hd->bl,568,AREA);
diff --git a/src/map/battle.c b/src/map/battle.c
index 8d3edec4e..9bf3011bf 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5210,7 +5210,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
if(((((TBL_MOB*)target)->special_state.ai == 2 || //Marine Spheres
(((TBL_MOB*)target)->special_state.ai == 3 && battle_config.summon_flora&1)) && //Floras
- s_bl->type == BL_PC && src->type != BL_MOB) || ((TBL_MOB*)target)->special_state.ai == 4) //Zanzoe
+ s_bl->type == BL_PC && src->type != BL_MOB) || ((TBL_MOB*)target)->special_state.ai == 4 && t_bl->id != src->id) //Zanzoe
{ //Targettable by players
state |= BCT_ENEMY;
strip_enemy = 0;
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 9a0a1c898..4dc30934d 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -503,11 +503,7 @@ int merc_hom_gainexp(struct homun_data *hd,int exp)
}
//levelup
- do
- {
- merc_hom_levelup(hd) ;
- }
- while(hd->homunculus.exp > hd->exp_next && hd->exp_next != 0 );
+ while( hd->homunculus.exp > hd->exp_next && merc_hom_levelup(hd) );
if( hd->exp_next == 0 )
hd->homunculus.exp = 0 ;
@@ -983,7 +979,7 @@ void merc_reset_stats(struct homun_data *hd)
int merc_hom_shuffle(struct homun_data *hd)
{
struct map_session_data *sd;
- int lv, i, skillpts;
+ int lv, skillpts;
unsigned int exp;
struct s_skill b_skill[MAX_HOMUNSKILL];
@@ -998,10 +994,9 @@ int merc_hom_shuffle(struct homun_data *hd)
//Reset values to level 1.
merc_reset_stats(hd);
//Level it back up
- for (i = 1; i < lv && hd->exp_next; i++){
+ do{
hd->homunculus.exp += hd->exp_next;
- merc_hom_levelup(hd);
- }
+ }while( hd->homunculus.level < lv && merc_hom_levelup(hd) );
if(hd->homunculus.class_ == hd->homunculusDB->evo_class) {
//Evolved bonuses
diff --git a/src/map/status.c b/src/map/status.c
index b3cbf27ab..cf2c096c9 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -998,6 +998,7 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_HALLUCINATION] = SI_BLANK;
/* StatusChangeState (SCS_) NOMOVE */
+ StatusChangeStateTable[SC_ANKLE] |= SCS_NOMOVE;
StatusChangeStateTable[SC_AUTOCOUNTER] |= SCS_NOMOVE;
StatusChangeStateTable[SC_TRICKDEAD] |= SCS_NOMOVE;
StatusChangeStateTable[SC_BLADESTOP] |= SCS_NOMOVE;
diff --git a/src/map/unit.c b/src/map/unit.c
index 4ca64d7f8..388c3757d 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -353,8 +353,6 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
map_random_dir(bl, &ud->to_x, &ud->to_y);
if(ud->walktimer != INVALID_TIMER) {
- if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
- return 0;
// When you come to the center of the grid because the change of destination while you're walking right now
// Call a function from a timer unit_walktoxy_sub
ud->state.change_walk_target = 1;
@@ -430,8 +428,6 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int
map_random_dir(bl, &ud->to_x, &ud->to_y);
if(ud->walktimer != INVALID_TIMER) {
- if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
- return 0;
ud->state.change_walk_target = 1;
set_mobstate(bl, flag&2);
return 1;
@@ -938,8 +934,6 @@ int unit_can_move(struct block_list *bl) {
)
return 0;
- if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || ( !map_flag_gvg(bl->m) && !unit_is_walking(bl) ) ) ) // Ankle only stops you after you're done moving
- return 0;
if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && !(sc->opt1 == OPT1_CRYSTALIZE && bl->type == BL_MOB))
return 0;