summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c5
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pet.c4
-rw-r--r--src/map/skill.c11
-rw-r--r--src/map/unit.c9
5 files changed, 15 insertions, 16 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 0a133884e..f87418c6b 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3875,7 +3875,7 @@ int atcommand_produce(
return -1;
}
item_id = item_data->nameid;
- if (itemdb_isequip2(item_data) && item_data->type == IT_WEAPON) {
+ if (itemdb_isequip2(item_data)) {
if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE)
attribute = ATTRIBUTE_NORMAL;
if (star < MIN_STAR || star > MAX_STAR)
@@ -3885,7 +3885,8 @@ int atcommand_produce(
tmp_item.amount = 1;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_FORGE;
- tmp_item.card[1] = ((star * 5) << 8) + attribute;
+ tmp_item.card[1] = item_data->type==IT_WEAPON?
+ ((star*5) << 8) + attribute:0;
tmp_item.card[2] = GetWord(sd->char_id, 0);
tmp_item.card[3] = GetWord(sd->char_id, 1);
clif_produceeffect(sd, 0, item_id);
diff --git a/src/map/mob.c b/src/map/mob.c
index 7a499bc09..27743fd26 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1096,7 +1096,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
{
if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) &&
((!can_move && battle_config.mob_ai&2) ||
- (!mob_can_reach(md, tbl, dist+2, MSS_RUSH))))
+ (!mob_can_reach(md, tbl, md->min_chase, MSS_RUSH))))
{ //Rude-attacked (avoid triggering due to can-walk delay).
if (DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
md->attacked_count++ >= RUDE_ATTACKED_COUNT)
diff --git a/src/map/pet.c b/src/map/pet.c
index 3e63e1251..68b0510e0 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -410,11 +410,11 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *pet)
pd->bl.x = pd->ud.to_x;
pd->bl.y = pd->ud.to_y;
pd->bl.id = npc_get_new_npc_id();
- pd->db = mob_db(pd->pet.class_);
+ pd->db = mob_db(pet->class_);
pd->bl.subtype = MONS;
pd->bl.type = BL_PET;
pd->msd = sd;
- status_set_viewdata(&pd->bl, pd->pet.class_);
+ status_set_viewdata(&pd->bl, pet->class_);
unit_dataset(&pd->bl);
pd->ud.dir = sd->ud.dir;
pd->last_thinktime = gettick();
diff --git a/src/map/skill.c b/src/map/skill.c
index 681ff215e..75ae90425 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3734,11 +3734,18 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case NJ_KASUMIKIRI:
case NJ_UTSUSEMI:
case NJ_NEN:
- case HLIF_AVOID: //[orn]
- case HAMI_DEFENCE: //[orn]
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;
+ case HLIF_AVOID: //[orn]
+ case HAMI_DEFENCE:
+ i = skill_get_time(skillid,skilllv);
+ clif_skill_nodamage(src,bl,skillid,skilllv,
+ sc_start(src,type,100,skilllv,i));
+ if (bl != src)
+ clif_skill_nodamage(src,bl,skillid,skilllv,
+ sc_start(bl,type,100,skilllv,i));
+ break;
case NJ_BUNSINJYUTSU:
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
diff --git a/src/map/unit.c b/src/map/unit.c
index b70c88a97..9f1163387 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -773,15 +773,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
return 0;
}
break;
- //TODO: here we should place and correct skills that should target homun automatically. However some work still needs be done as "dead homuns" are deleted from memory, and as such, you can't really target them. [Skotlex]
- case AM_REST:
-// case AM_RESURRECTHOMUN:
- target = (struct block_list*)sd->hd;
- if (!target) {
- clif_skill_fail(sd,skill_num,0,0);
- return 0;
- }
- break;
}
if (target)
target_id = target->id;