NightShadow start in Juno
#1

Hi!

I'm pretty new in the dev community of LCKB, BUT this community have helped me a lot, and i wanna share my little knowledge!

Today i wanna release the method for allow the NS to spawn in Juno!

Just go: GameServer -> DBProcess_SelectChar.cpp

if (!bValidZone)
{
// nZone = Juno (zone start)
nZone = ZONE_START;

// IF THE CHARACTER SELECTED IS A NS...
if(pChar->m_job == JOB_NIGHTSHADOW) //ns start eghea (Hira)
//SPAWN ZONE = EGHEA!
nZone = ZONE_EGEHA;

pZone = gserver->FindZone(nZone);

bValidZone = true;
}

And as you seen from my comments just need to comments the line about "eghea" like that:

 

if (!bValidZone)
{
// nZone = Juno (zone start)
nZone = ZONE_START;

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

pZone = gserver->FindZone(nZone);
bValidZone = true;
}

Hope it is useful for someone!!

#2

Lol Doing this is Impropper way to do it

 

if (!bValidZone)
{
// nZone = Juno (zone start)
nZone = ZONE_START;

/*if(pChar->m_job == JOB_NIGHTSHADOW) //ns start eghea (by Scura)
nZone = ZONE_EGEHA;*/

pZone = gserver->FindZone(nZone);
bValidZone = true;
}

 

 

This is the Proper way to do it, In GameServer source DBProcess_SelectChar.cpp on or around Line 206

Change:

// 잘못된 존 번호일때

        nZone = ZONE_START;        // TODO : 시작 존이 직업별/종족별로 다를 경우 수정 필요

        if(pChar->m_job == JOB_NIGHTSHADOW)

            nZone = ZONE_EGEHA;

 

 

TO

 

// 잘못된 존 번호일때

        nZone = ZONE_START;        // TODO : 시작 존이 직업별/종족별로 다를 경우 수정 필요

        if(pChar->m_job == JOB_NIGHTSHADOW)

            nZone = ZONE_START;

#3

same [CeNsOrEd] ... is not necessary reinitialize the variable nZone once the default is set for juno ... that's why i've just commented those lines, what you wrote is just redundancy ! 

#4

@Hira im not going to sit here and argue with you, i was just trying to help you out, but no offence but your method is just noobish lol, and im pretty sure that any of the higher lc developers that is in this lc community will agree with me however my account on here might say im a newbie as its a new account but when it comes to developing LC im not a Newbie lol

#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

#6

wanna tag just some skilled dev for understand if i fail something and what they think about that 

/index.php?/profile/6038-romainlastchaos/&do=hovercard" data-mentionid="6038" href="/index.php?/profile/6038-romainlastchaos/" rel="">@RomainLastChaos /index.php?/profile/2-wizatek/&do=hovercard" data-mentionid="2" href="/index.php?/profile/2-wizatek/" rel="">@Wizatek /index.php?/profile/19661-rondo157/&do=hovercard" data-mentionid="19661" href="/index.php?/profile/19661-rondo157/" rel="">@rondo157 /index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija /index.php?/profile/267-sutwick/&do=hovercard" data-mentionid="267" href="/index.php?/profile/267-sutwick/" rel="">@SutWick /index.php?/profile/18312-assasin/&do=hovercard" data-mentionid="18312" href="/index.php?/profile/18312-assasin/" rel="">@Assasin

 

I'm pretty new, i just know those dev soz for the others! ? 

#7

I'm a noob, too, and I'd do it like Hira ? it's just repeated unnecessarily in my opinion if u assign it again

#8

if(pChar->m_job == JOB_NIGHTSHADOW)
nZone = ZONE_EGEHA;

Just remove it ?

#9


6 minutes ago, rondo157 said:





if(pChar->m_job == JOB_NIGHTSHADOW)
nZone = ZONE_EGEHA;


Just remove it ?




Which began as I wrote:

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

 

#10

Yeah



Forum Jump:


Users browsing this thread: 2 Guest(s)