Jump to content
  • 1
Hanashi

show viewpoint on minimap upon traps triggered by victim.

Question

3 answers to this question

Recommended Posts

  • 0

try this maybe

 src/map/skill.c | 10 ++++++++++
 src/map/skill.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/src/map/skill.c b/src/map/skill.c
index db8cc49..23c3a4c 100755
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -13500,6 +13500,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 				sg->limit=DIFF_TICK(tick,sg->tick)+1500;
 				//Target will be stopped for 3 seconds
 				sc_start(ss,bl,SC_STOP,100,0,skill_get_time2(sg->skill_id,sg->skill_lv));
+				skill_someoneStepOnMyTrap(ss, bl);
 			}
 			break;
 
@@ -21184,6 +21185,15 @@ static void skill_db_destroy(void) {
 	skill_db = NULL;
 }
 
+void skill_someoneStepOnMyTrap(struct block_list *src, struct block_list *bl) {
+	if (!bl || !src)
+		return;
+	if (src == bl || src->type != BL_PC || src->m != bl->m)
+		return;
+	/* clif_viewpoint need id, and it's bad! */
+	clif_viewpoint(BL_CAST(BL_PC, src), src->id, 0, bl->x, bl-> y, rnd()%255, 0xFF0000);
+}
+
 /*===============================
  * DB reading.
  * skill_db.txt
diff --git a/src/map/skill.h b/src/map/skill.h
index a5df73b..df669d8 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2135,6 +2135,7 @@ void skill_combo_toogle_inf(struct block_list* bl, uint16 skill_id, int inf);
 void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick);
 
 void skill_reveal_trap_inarea(struct block_list *src, int range, int x, int y);
+void skill_someoneStepOnMyTrap(struct block_list *src, struct block_list *bl);
 
 #ifdef ADJUST_SKILL_DAMAGE
 /// Skill Damage target

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.