Jump to content
  • 0

Claymore Trap Old behavior


Eross

Question


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.09
  • Content Count:  378
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Hi ! Does anyone here know how to revert the claymore trap behavior to its classic behavior ?? Claymore trap now can only hit 1 but my players want the old behavior which hits multiple .. Please help anyone .. I saw a guide in hercules but I think its not compatible with rathena 
 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  901
  • Reputation:   248
  • Joined:  01/30/13
  • Last Seen:  

On current rAthena, implementing the old behavior is actually pretty simple.

Find this code in skill.cpp:

			sg->limit = DIFF_TICK(tick, sg->tick) +
				(sg->unit_id == UNT_CLUSTERBOMB || sg->unit_id == UNT_ICEBOUNDTRAP ? 1000 : 0) + // Cluster Bomb/Icebound has 1s to disappear once activated.
				(sg->unit_id == UNT_FIRINGTRAP ? 0 : 1500); // Firing Trap gets removed immediately once activated.
			sg->unit_id = UNT_USED_TRAPS; // Change ID so it does not invoke a for each in area again.
		}

And change it to:

			sg->limit = DIFF_TICK(tick, sg->tick) +
				(sg->unit_id == UNT_CLUSTERBOMB || sg->unit_id == UNT_ICEBOUNDTRAP ? 1000 : 0) + // Cluster Bomb/Icebound has 1s to disappear once activated.
				(sg->unit_id == UNT_FIRINGTRAP ? 0 : 1500); // Firing Trap gets removed immediately once activated.
			unit->range = -1;
		}

This makes most traps work like previously. If you also want this system for Landmine you need to do the same change there (just replace setting of UNT_USED_TRAPS with setting of range to -1).

Behavior might change in the future, but currently setting range to -1 does the trick because the calling code handles removing the trap then.

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...