[FIXED] Raid bosses minions not spawn on server launch

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
jonhanon
Posts: 3
Joined: Wed Sep 19, 2018 10:21 pm

[FIXED] Raid bosses minions not spawn on server launch

Post by jonhanon »

Hello. So i have problem and seems cant find solution. I using latest development branch of h5.
So problem is when gameserver just launched, all bosses that must have minions just standing alone. If rb get killed and respawned by normal means or another instance of rb is spawned through admin console, minions are spawned as well and all seems working fine, but if server restarted after that minions are gone again.
And there is no any errors in console output, so i even dont know where to look...
Edoogel
Posts: 58
Joined: Wed Mar 23, 2016 2:05 am
Location: Russia
Contact:

Re: Raid bosses minions not spawn on server launch

Post by Edoogel »

I confirm, there is such a problem on the server. And how to fix, too, can not find.
jonhanon
Posts: 3
Joined: Wed Sep 19, 2018 10:21 pm

Re: Raid bosses minions not spawn on server launch

Post by jonhanon »

Looks like at last i found problem.
In gameserver.java its needed to be RaidBossSpawnManager.getInstance().load(); not just RaidBossSpawnManager.getInstance();
At least all rb now spawning with minions, and no any compile errors
Edoogel
Posts: 58
Joined: Wed Mar 23, 2016 2:05 am
Location: Russia
Contact:

Re: Raid bosses minions not spawn on server launch

Post by Edoogel »

Checked, everything works fine. Thank you jonhanon! :+1:
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: Raid bosses minions not spawn on server launch

Post by Sacrifice »

Code: Select all

RaidBossSpawnManager.getInstance();
in gameserver class is sufficient for all, because the constructor calls, on instantiation of the class at the method

Code: Select all

load();
or something like that, that's meaning that you're duplicating things if you completed the code with this stuff... :think:

RaidBossSpawnManager class require too much rework and not only 6 characters that you're adding.

Without no mention internal class

Code: Select all

MinionData
... That require some things more... :shifty:
Edoogel
Posts: 58
Joined: Wed Mar 23, 2016 2:05 am
Location: Russia
Contact:

Re: Raid bosses minions not spawn on server launch

Post by Edoogel »

Sacrifice wrote: โ†‘Tue Jun 25, 2019 4:37 pm

Code: Select all

RaidBossSpawnManager.getInstance();
in gameserver class is sufficient for all, because the constructor calls, on instantiation of the class at the method

Code: Select all

load();
or something like that, that's meaning that you're duplicating things if you completed the code with this stuff... :think:

RaidBossSpawnManager class require too much rework and not only 6 characters that you're adding.

Without no mention internal class

Code: Select all

MinionData
... That require some things more... :shifty:
I understand, but here it works (RaidBossSpawnManager.getInstance (). load ()) and all raid bosses stand with minenes, and when spelled out (RaidBossSpawnManager.getInstance ()) then redBosses stand without miniens.
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: Raid bosses minions not spawn on server launch

Post by Sacrifice »

I tell you that this is not the best fix, does it work? Yes, but it is not the best fix.

At least I edited about 100 lines of that class and eliminated many more, and in the datapack I also made quite a few deletions and editions related to that.

If that makes you happy ... Ole!
Edoogel
Posts: 58
Joined: Wed Mar 23, 2016 2:05 am
Location: Russia
Contact:

Re: Raid bosses minions not spawn on server launch

Post by Edoogel »

Sacrifice wrote: โ†‘Thu Jun 27, 2019 4:44 am I tell you that this is not the best fix, does it work? Yes, but it is not the best fix.

At least I edited about 100 lines of that class and eliminated many more, and in the datapack I also made quite a few deletions and editions related to that.

If that makes you happy ... Ole!
it's not about happiness. I'm not saying that this is a panacea, it can just be used until the fix for this bug is released.
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: Raid bosses minions not spawn on server launch

Post by Sacrifice »

Okey, no problem them :clap: :wave:
User avatar
Avanael92
Advanced User
Advanced User
Posts: 189
Joined: Thu Aug 07, 2014 5:26 pm
Location: Germany

Re: Raid bosses minions not spawn on server launch

Post by Avanael92 »

I don't think that's the problem. With your "fix" you're calling load() twice, nothing else. You're just putting a band-aid on without knowing what's the cause. What about codes that are supposed to launch one time? That's really bad practice what you're doing.

For me minions are spawning just fine after launch and restart. So I guess the problem lies somewhere else.
Edoogel
Posts: 58
Joined: Wed Mar 23, 2016 2:05 am
Location: Russia
Contact:

Re: Raid bosses minions not spawn on server launch

Post by Edoogel »

Avanael92 wrote: โ†‘Sat Jun 29, 2019 11:27 am I don't think that's the problem. With your "fix" you're calling load() twice, nothing else. You're just putting a band-aid on without knowing what's the cause. What about codes that are supposed to launch one time? That's really bad practice what you're doing.

For me minions are spawning just fine after launch and restart. So I guess the problem lies somewhere else.
here is a completely revised and revised script. Now everything will spawn without the above mentioned addition.
You do not have the required permissions to view the files attached to this post.
User avatar
Avanael92
Advanced User
Advanced User
Posts: 189
Joined: Thu Aug 07, 2014 5:26 pm
Location: Germany

Re: Raid bosses minions not spawn on server launch

Post by Avanael92 »

I don't see how that's revised. You didn't change anything related to minions not spawning. The code is literally 99% the same as mine, you just shorted the code a little bit and changed respawntime from long to int. :think:

You should consider changing respawntime back to long asap. The respawn time is saved as unix timestamp in milliseconds and those go way over the max value of int.

Example:
Unix Timestamp: +1,561,916,406,096
Max int value: +2,147,483,647
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: Raid bosses minions not spawn on server launch

Post by Sacrifice »

Avanael92, will he have to learn one day? Don't?...

Edoogel, not are sufficient mister.
gfigueroav
Posts: 1
Joined: Fri Jun 26, 2020 4:42 pm

Re: Raid bosses minions not spawn on server launch

Post by gfigueroav »

Hello.

In public void addNewSpawn() function in RaidBossSpawnManager class, i have added after the following line:

Code: Select all

final long time = Calendar.getInstance().getTimeInMillis();
this:

Code: Select all

...
		if (respawnTime == 0L) {
			respawnTime = time + 50000;
		}
...
This activates the scheduling mechanism. The raid bosses that are alive should not be loaded directly, but should simulate being loaded with a delay. This way you can "temporarily" fix the problem without affecting the overall system performance.

Obviously, this technique should be improved and implemented in a better way or keep looking for the previous error.

I'm not quite sure, but I think something must be happening in the script loading order.

Regards!
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: Raid bosses minions not spawn on server launch

Post by Zoey76 »

The problem seems to be that MinionSpawnManager (datapack script) is loaded after onSpawn() event was already notified, seems it was not tested when it was moved from core to datapack.
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.2.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
Post Reply