summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-16 16:31:30 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-16 16:31:30 +0000
commit9b3a759edca28fa9445949aa0a3664d7dc8f6b2f (patch)
tree048521a0989fbea1662983dc2291d72688eb3e72
parentb035b0610206daff6e94f9d88297438e0ab93261 (diff)
downloadhercules-9b3a759edca28fa9445949aa0a3664d7dc8f6b2f.tar.gz
hercules-9b3a759edca28fa9445949aa0a3664d7dc8f6b2f.tar.bz2
hercules-9b3a759edca28fa9445949aa0a3664d7dc8f6b2f.tar.xz
hercules-9b3a759edca28fa9445949aa0a3664d7dc8f6b2f.zip
- @produce now can make any kind of equipment
- Fixed a warning on the mob_ai - Made HLIF_AVOID and HAMI_DEFENCE cause the status change on both caster and target. - AM_REST shouldn't be checking for a range now (since it's a self skill) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8318 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/char/int_pet.c2
-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
7 files changed, 21 insertions, 17 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index a80b29af3..e1ce5779c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/16
+ * @produce now can make any kind of equipment [Skotlex]
+ * Made HLIF_AVOID and HAMI_DEFENCE cause the status change on both caster
+ and target. [Skotlex]
+ * AM_REST shouldn't be checking for a range now (since it's a self skill)
+ [Skotlex]
* Updated mob_ai so that mobs will use their rude-attacked skill when they
can't reach their current target. [Skotlex]
* Fixed the default txt config making pets be saved to the homun file
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 67f3fb697..53a222393 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -175,7 +175,7 @@ int mapif_pet_created(int fd,int account_id,struct s_pet *p)
int mapif_pet_info(int fd,int account_id,struct s_pet *p)
{
- WFIFOHEAD(fd, sizeof(struct s_pet) + 9);
+ WFIFOHEAD(fd, sizeof(struct s_pet) + 9);
WFIFOW(fd,0)=0x3881;
WFIFOW(fd,2)=sizeof(struct s_pet) + 9;
WFIFOL(fd,4)=account_id;
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;