![]() |
|
|
#26 |
|
Архивный участник
Join Date: May 2005
Posts: 2,033
|
nope, as far as i know l2 will go on after c5.
just a new storyline and all, but it will take some time till l3 comes out. also notice that it will be using unreal engine 3 which is not even available yet. well, maybe i'm totally wrong^^ |
|
|
|
|
#27 |
|
Архивный участник
Join Date: Oct 2005
Posts: 330
|
yes they will keep most of the code same but my hunch is that packet format will be totally different but that is not a big prob i guess.
well as i said i'm in |
|
|
|
|
#28 |
|
Архивный участник
Join Date: Dec 2005
Posts: 242
|
I think that we could do a definitive source, then when a new cronichle is out only modify some things we have the new server =)
For L2C: I'm In! |
|
|
|
|
#29 |
|
Архивный участник
Join Date: Jul 2005
Posts: 371
|
http://www.torune.com/lineage2/AuthdC.rar
packet assembling function added (dummy copy from original with small modification) the following code is from l2server. Code:
int VAssemble(char* buf, int bufLen, const char* format, va_list ap)
{
//guard(int VAssemble(char* buf, int bufLen, const char* format, va_list ap));
const char* f = format;
char* start = buf;
char* end = buf + bufLen;
int t;
char* p;
int len;
int i;
double d;
while ((t = *format++))
{
switch (t)
{
case 's':
p = va_arg(ap, char*);
if (p)
{
len = strlen(p);
if (buf + len + 1 > end)
{
goto overflow;
}
strcpy(buf, p);
buf += len + 1;
}
else
{
// p is null. Is it correct?
if (buf + 1 > end)
{
goto overflow;
}
*buf++ = 0;
}
break;
case 'S':
{
wchar_t* p = va_arg(ap, wchar_t*);
if (p)
{
len = (wcslen(p) + 1)* sizeof(wchar_t);
if (buf + len > end)
{
goto overflow;
}
memcpy(buf, p, len);
buf += len;
}
else
{
// p is null. Is it correct?
if (buf + 2 > end)
{
goto overflow;
}
*buf++ = 0;
*buf++ = 0;
}
}
break;
case 'b': // blind copy
len = va_arg(ap, int);
p = va_arg(ap, char*);
if (buf + len > end)
{
goto overflow;
}
memcpy(buf, p, len);
buf += len;
break;
case 'c':
i = va_arg(ap, int);
if (buf + 1 > end)
{
goto overflow;
}
*buf++ = i;
break;
case 'h':
i = va_arg(ap, int);
if (buf + 2 > end)
{
goto overflow;
}
#ifdef _WIN32
*((short *)buf) = i;
buf += 2;
#else
*buf++ = i;
*buf++ = i >> 8;
#endif
break;
case 'd':
i = va_arg(ap, int);
if (buf + 4 > end)
{
goto overflow;
}
#ifdef _WIN32
*((int *)buf) = i;
buf += 4;
#else
*buf++ = i;
*buf++ = i >> 8;
*buf++ = i >> 16;
*buf++ = i >> 24;
#endif
break;
case 'f':
d = va_arg(ap, double);
if (buf + 8 > end)
{
goto overflow;
}
#ifdef _WIN32
CopyMemory(buf, &d, 8);
/*
*(((int*)buf)+0) = *(((int*)&d)+0);
*(((int*)buf)+1) = *(((int*)&d)+1);
*/
/*
*((double *)buf) = d;
*/
buf += 8;
#else
*buf++ = d;
*buf++ = d >> 8;
*buf++ = d >> 16;
*buf++ = d >> 24;
*buf++ = d >> 32
*buf++ = d >> 40;
*buf++ = d >> 48;
*buf++ = d >> 56;
#endif
break;
}
}
return (buf - start);
overflow:
Log.Add(LOG_ERROR, L"Buffer overflow in Assemble");
return 0;
//unguard;
}
|
|
|
|
|
#30 | |
|
Архивный участник
Join Date: Dec 2005
Posts: 242
|
Quote:
Do u want a cup of coffe ? =P gLuck! |
|
|
|
|
|
#31 |
|
Архивный участник
Join Date: Sep 2005
Posts: 198
|
quicq question, if you guys go ahead and build an auth and mabey more, are you planning on adding the petition system stuff back into them?
|
|
|
|
|