We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

Which function called when character dying?

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Which function called when character dying?

Post by KGB1st » Thu Sep 19, 2019 10:28 pm

Which function called when character dying from mob or other character? I tried to modify public boolean doDie(L2Character killer) but it not works.. I need in moment when character dies. I want to check some abnormal effects on them, but in doDie() it not possible.

Code: Select all

	public boolean doDie(L2Character killer) {
		final TerminateReturn returnBack = EventDispatcher.getInstance().notifyEvent(new OnCreatureKill(killer, this), this, TerminateReturn.class);
		if ((returnBack != null) && returnBack.terminate()) {
			return false;
		// killing is only possible one time
		synchronized (this) {
			if (isDead()) {
				return false;
			// now reset currentHp to zero
		// Set target to null and cancel Attack or Cast
		// Stop movement
		// Stop HP/MP/CP Regeneration task
		// Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform
		// Notify L2Character AI
		if (hasAI()) {
		if (getWorldRegion() != null) {
		if (isChannelized()) {
		return true;
And why function setIsDead() working on clear server, when no one character connected? :D L2Character called not only for characters?
Abnormal logic :'| How much instances of L2Character works on server?

Posts: 1
Joined: Thu May 21, 2020 11:32 am

Re: Which function called when character dying?

Post by PamelSpence » Fri May 22, 2020 1:35 pm

L2 server is working nicely for the movement of the information for all individuals. Partners of the team and zipjob reviews reddit is issued for the sharing for the training. Element is filed for the agile sources for the turns. Serveries built for the main hosting in for the citizens.

Post Reply