summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-27 03:12:38 +0000
committerDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-27 03:12:38 +0000
commitd47798d24da91a2f14ef95f3a8d5cd7cef1a2978 (patch)
treef64e79957a69f5c6da7db06bd10425240115bb55 /src
parent1d699d1f9ba6facaba5f6e817d9b6b2730d6872e (diff)
downloadhercules-d47798d24da91a2f14ef95f3a8d5cd7cef1a2978.tar.gz
hercules-d47798d24da91a2f14ef95f3a8d5cd7cef1a2978.tar.bz2
hercules-d47798d24da91a2f14ef95f3a8d5cd7cef1a2978.tar.xz
hercules-d47798d24da91a2f14ef95f3a8d5cd7cef1a2978.zip
- I'm back, and I begin with an implementation of a good old Aegis bug : Assassins should now be able to use the infamous status arrow + Grimtooth method
- Also added some random stuff about storage password system git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9723 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c146
-rw-r--r--src/map/skill.c3
2 files changed, 82 insertions, 67 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4ca568318..fe0c5a1f6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1481,71 +1481,6 @@ void clif_homskillup(struct map_session_data *sd, int skill_num) { //[orn]
return;
}
-void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) {
- RFIFOHEAD(fd);
- merc_hom_change_name(sd,RFIFOP(fd,2));
-}
-
-void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) { //[orn]
-
- nullpo_retv(sd);
-
- if(!merc_is_hom_active(sd->hd))
- return;
-
- if (!unit_can_move(&sd->hd->bl))
- return;
- unit_walktoxy(&sd->hd->bl, sd->bl.x,sd->bl.y-1, 0);
-}
-
-void clif_parse_HomMoveTo(int fd,struct map_session_data *sd) { //[orn]
- int x,y,cmd;
- RFIFOHEAD(fd);
- nullpo_retv(sd);
-
- if(!merc_is_hom_active(sd->hd))
- return;
-
- cmd = RFIFOW(fd,0);
- x = RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]) * 4 +
- (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 1) >> 6);
- y = ((RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]+1) & 0x3f) << 4) +
- (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 2) >> 4);
-
- if (!unit_can_move(&sd->hd->bl))
- return;
-
- unit_walktoxy(&(sd->hd->bl),x,y,0);
-}
-
-void clif_parse_HomAttack(int fd,struct map_session_data *sd) { //[orn]
- struct block_list *target;
- RFIFOHEAD(fd);
- nullpo_retv(sd);
-
- if(!merc_is_hom_active(sd->hd))
- return;
-
- if ((target = map_id2bl(RFIFOL(fd,6))) == NULL || status_isdead(target))
- return;
-
- merc_stop_walking(sd->hd, 1);
- merc_stop_attack(sd->hd);
- unit_attack(&sd->hd->bl,RFIFOL(fd,6),1) ;
-}
-
-void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
- int cmd;
-
- RFIFOHEAD(fd);
- cmd = RFIFOW(fd,0);
-
- if(!merc_is_hom_active(sd->hd))
- return;
-
- merc_menu(sd,RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]));
-}
-
int clif_hom_food(struct map_session_data *sd,int foodid,int fail) //[orn]
{
int fd=sd->fd;
@@ -10290,6 +10225,15 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
}
/*==========================================
+ * Kafra storage protection password system
+ *------------------------------------------
+ */
+void clif_parse_StoragePassword(int fd, struct map_session_data *sd) {
+ //TODO
+}
+
+
+/*==========================================
* パーティを作る
*------------------------------------------
*/
@@ -11685,6 +11629,77 @@ void clif_parse_AdoptRequest(int fd,struct map_session_data *sd) {
WFIFOSET(fd, packet_len(0x1f9));
}
}
+
+
+/*==========================================
+ * Homunculus packets
+ *------------------------------------------
+ */
+void clif_parse_ChangeHomunculusName(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ merc_hom_change_name(sd,RFIFOP(fd,2));
+}
+
+void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) { //[orn]
+
+ nullpo_retv(sd);
+
+ if(!merc_is_hom_active(sd->hd))
+ return;
+
+ if (!unit_can_move(&sd->hd->bl))
+ return;
+ unit_walktoxy(&sd->hd->bl, sd->bl.x,sd->bl.y-1, 0);
+}
+
+void clif_parse_HomMoveTo(int fd,struct map_session_data *sd) { //[orn]
+ int x,y,cmd;
+ RFIFOHEAD(fd);
+ nullpo_retv(sd);
+
+ if(!merc_is_hom_active(sd->hd))
+ return;
+
+ cmd = RFIFOW(fd,0);
+ x = RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]) * 4 +
+ (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 1) >> 6);
+ y = ((RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]+1) & 0x3f) << 4) +
+ (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 2) >> 4);
+
+ if (!unit_can_move(&sd->hd->bl))
+ return;
+
+ unit_walktoxy(&(sd->hd->bl),x,y,0);
+}
+
+void clif_parse_HomAttack(int fd,struct map_session_data *sd) { //[orn]
+ struct block_list *target;
+ RFIFOHEAD(fd);
+ nullpo_retv(sd);
+
+ if(!merc_is_hom_active(sd->hd))
+ return;
+
+ if ((target = map_id2bl(RFIFOL(fd,6))) == NULL || status_isdead(target))
+ return;
+
+ merc_stop_walking(sd->hd, 1);
+ merc_stop_attack(sd->hd);
+ unit_attack(&sd->hd->bl,RFIFOL(fd,6),1) ;
+}
+
+void clif_parse_HomMenu(int fd, struct map_session_data *sd) { //[orn]
+ int cmd;
+
+ RFIFOHEAD(fd);
+ cmd = RFIFOW(fd,0);
+
+ if(!merc_is_hom_active(sd->hd))
+ return;
+
+ merc_menu(sd,RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]));
+}
+
/*==========================================
* パケットデバッグ
*------------------------------------------
@@ -12133,6 +12148,7 @@ static int packetdb_readdb(void)
{clif_parse_HomMoveTo,"hommoveto"},
{clif_parse_HomAttack,"homattack"},
{clif_parse_HomMenu,"hommenu"},
+ {clif_parse_StoragePassword,"storagepassword"},
{NULL,NULL}
};
diff --git a/src/map/skill.c b/src/map/skill.c
index c144b4c5d..f3e2f24d8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1369,8 +1369,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
for(i=0; i < MAX_PC_BONUS && sd->addeff[i].flag; i++)
{
rate = sd->addeff[i].rate;
- type = sd->state.arrow_atk; //Ranged?
- if (type)
+ if (attack_type&BF_RANGED) // Any ranged physical attack takes status arrows into account (Grimtooth...) [DracoRPG]
rate += sd->addeff[i].arrow_rate;
if (!rate) continue;