NightShadow start in Juno
#5

I'm pretty new in community of lckb, but i've developed for years! My intention is not to arguing, but just to provide a real solution for a simple problem like the spawn of the ns in eghea!!

 

As i said, i don't wanna arguin, but if you read the code is pretty simple to understand what i mean...

This is the function:

1. if (!bValidZone)
2. {
3. // nZone = Juno (zone start)
4. nZone = ZONE_START;
5.
6. /*if(pChar->m_job == JOB_NIGHTSHADOW) //ns start eghea (by Hira)
7. nZone = ZONE_EGEHA;*/
8.
9. pZone = gserver->FindZone(nZone);
10. bValidZone = true;
11. }

As you can read from the line 4, the variable nZone has been already initialize with the ZONE_START's value...

1. if (!bValidZone)
2. {
3. ...
4. nZone = ZONE_START; //<-- here
5. ...
6. ...

...and it just change it if the line 6 result true:

6. if(pChar->m_job == JOB_NIGHTSHADOW) //ns start eghea (by Hira)
7. nZone = ZONE_EGEHA;

So, if you need to start all the characters in the juno spawn, you can simple skip this "if" value: the nZone variable has been already initialize at the line 4, you don't have to re-assign the value nZone.

 

If we wanna be perfect, the real function should be coded like this:

1. if (!bValidZone)
2. {
9. pZone = gserver->FindZone(ZONE_START);
10. bValidZone = true;
11. }

Hope to clearify the dubts, i'm pretty sure you are more skilled than me, but it is just a simple code, no need to be agreed from other dev, pretty sure they will say the same



Messages In This Thread
[No subject] - by Scura - 03-11-2021, 09:50 PM
[No subject] - by camaro3183 - 03-12-2021, 11:00 AM
[No subject] - by Scura - 03-12-2021, 11:13 AM
[No subject] - by camaro3183 - 03-13-2021, 05:33 AM
[No subject] - by Scura - 03-13-2021, 11:04 AM
[No subject] - by Scura - 03-13-2021, 11:12 AM
[No subject] - by Desarija - 03-13-2021, 11:41 AM
[No subject] - by rondo157 - 03-13-2021, 03:20 PM
[No subject] - by Scura - 03-13-2021, 03:26 PM
[No subject] - by rondo157 - 03-13-2021, 05:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)