Показать сообщение отдельно
Старый 23.03.2017, 14:05   #1
Новичок
 
Регистрация: 25.08.2016
Сообщений: 21
Сказал Спасибо: 0
Имеет 0 спасибок в 0 сообщенях
wongerlt пока неопределено
По умолчанию [Lineage2] rGuard Interlude

Hello,
Any one tryed to adapt it on interlude?
Im trying, all work perfect except "Olympiad hero list tab" i get this error:
Цитата:
General protection fault!

History: UUIScript::execGetPledgeCrestTexFromPledgeCrestID <- UObject::ProcessEvent <- (HeroTowerWnd Transient.HeroTowerWnd0, Function Interface.HeroTowerWnd.OnEvent) <- XMLUIManager::ExecuteUIEvent <- NConsoleWnd::OnHeroList <- UGameEngine::OnHeroList <- ExHeroListPacket <- UNetworkHandler::Tick <- Function Name=ExHeroListPacke <- UGameEngine::Tick <- UpdateWorld <- MainLoop
Where can be problem?
rGaurd part of code:
Код:
void __cdecl new_SendPacket(unsigned int This, char *Format, ...)
{
	if(enumas==0)
		enumas=1;
	
	unsigned char buf[10240];
	int size = 0, len;
	wchar_t *wstr;

    va_list args;
	va_start(args, Format);

	while (*Format != 0)
	{
		
		switch (*Format)
		{
			case 'c':
				*(unsigned char*) (buf + size) = va_arg(args, unsigned char);
				size++;
				break;
			case 'h':
				*(unsigned short int*) (buf + size) = va_arg(args, unsigned short int);
				size += 2;
				break;
			case 'd':
				*(unsigned int*) (buf + size) = va_arg(args, unsigned int);
				size += 4;
				break;
			case 'Q':
				*(unsigned __int64*) (buf + size) = va_arg(args, unsigned __int64);
				size += 8;
				break;
			case 'b':
				len = va_arg(args, unsigned int);
				memcpy(buf + size, va_arg(args, void*), len);
				size += len;
				break;			
			case 'S':
				wstr = va_arg(args, wchar_t*);
				if (wstr == 0)
				{
					len = 2;
					*(unsigned short int*) (buf + size) = 0;
				}
				else
				{
					len = wcslen(wstr) * 2 + 2;
					memcpy(buf + size, wstr, len);
				}
				size += len;
				break;
			default:
				true_SendPacket(This, "cc", 0xA1, 0x04);
				ErrorExit("Send Packet Unknown Format!");
				break;
		}
		Format++;	
	}

	va_end(args);
	
	true_SendPacket(This, "b", size, (int)buf);
}

int __fastcall new_AddNetworkQueue(unsigned int This, unsigned int EDX, TNetworkPacket *NetworkPacket)
{
		if(enumas==0) enumas=1;
	if (SendPacket == NULL) {
				__asm {
			mov		ebx, ecx
				mov     ecx, [ebx + 0x48] ; see offset in disassembler
				mov     edx, [ecx]
				mov		_clientSocket, ecx
				mov     ecx, [edx + 0x68]; in disassembler too
				mov		_sendPacket, ecx;
		}
				true_SendPacket = (_SendPacket) splice((unsigned char*) _sendPacket, new_SendPacket);
				SendPacket = 1;
	}
return true_AddNetworkQueue(This, EDX, NetworkPacket);
}
wongerlt вне форума   Ответить с цитированием