Buenas gente. Les quería preguntar si alguien tiene la BD CORRECTA de estas files??? No quiero que me respondan "Es la que esta en los post anteriores" porque revise y ninguna es la correcta. Se los puedo asegurar ya que tuve que corregir muchas cosas a mano que de paso les dejo las soluciones.
1. Fix CashShop Esto no es ningún problema ni de configuración ni de base de datos ni nada, es un error a la hora de logear las compras y los usos de los ítem en el GS.
No encontré donde esta exactamente el error ni porque se origina, solo les traigo una o dos soluciones temporales para que lo puedan utilizar.
Solución 1: poner un try except en la función Output de CLogToFile. Esto es para que al guardar si hay algún error no explote el GS y siga su funcionamiento.
void CLogToFile::Output(LPSTR fmt, ...)
{
__try {
char szArgBuff[2048];
char szLogBuff[2048];
memset(szArgBuff, 0, sizeof(szArgBuff));
memset(szLogBuff, 0, sizeof(szLogBuff));
va_list lpArguments;
va_start(lpArguments, fmt);
vsprintf(szArgBuff, fmt, lpArguments);
va_end(lpArguments);
tm * today;
time_t ltime;
time(<ime);
today = localtime(<ime);
sprintf(szLogBuff, "[%.8s] ", asctime(today) + 11);
strcat(szLogBuff, szArgBuff);
EnterCriticalSection(&this->m_critLogToFile);
fprintf(this->m_fLogFile, "%s\n", szLogBuff);
fflush(this->m_fLogFile);
LeaveCriticalSection(&this->m_critLogToFile);
DataSet_Check();
}
__except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
{
}
}
Solución 2: Quitar el guardado de logs de todo el proceso de CashShop (hay algunos que si andan pero otros hacen que crashee el GS y no se porque, si alguien lo sabe que lo comparta por favor) Simplemente borren la linea o comentenla con //
2. Fix MuHelper: Me encontré con que el Helper no guardaba las configuraciones, esto es porque falta una columna en la BD en la tabla OptionData. Les dejo la Query
Use MuOnline
ALTER TABLE OptionData
ADD MuBot varbinary(515);
Use BattleCore
ALTER TABLE OptionData
ADD MuBot varbinary(515);
3. Fix GremoryCase: Ninguno de los eventos que dan GremoryCase estaban entregando correctamente los premios. Esto se debe también a un problemas en BD. Hay que agregar algunas columnas y borrar otra y también modificar el StoreProcedure asociado. Aqui van las 2 querys.
Use MuOnline
ALTER TABLE IGC_GremoryCase
DROP COLUMN ItemSocketCount;
ALTER TABLE IGC_GremoryCase
ADD ItemSocket1 tinyint NOT NULL,
ItemSocket2 tinyint NOT NULL,
ItemSocket3 tinyint NOT NULL,
ItemSocket4 tinyint NOT NULL,
ItemSocket5 tinyint NOT NULL;
USE [MuOnline]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[IGC_GremoryCase_AddItem]
@szAccountID nvarchar(10),
@szName nvarchar(10),
@StorageType tinyint,
@RewardSource tinyint,
@ItemID smallint,
@ItemLevel tinyint,
@ItemDurability smallint,
@ItemOp1 tinyint,
@ItemOp2 tinyint,
@ItemOp3 tinyint,
@ItemExcOption smallint,
@ItemSetOption smallint,
@ItemSocket1 tinyint,
@ItemSocket2 tinyint,
@ItemSocket3 tinyint,
@ItemSocket4 tinyint,
@ItemSocket5 tinyint,
@ItemMainAttribute tinyint,
@ItemMuunEvoItemType smallint,
@ItemMuunEvoItemIndex smallint,
@ReceiveDate bigint,
@ExpireDate bigint
AS
BEGIN
SET NOCOUNT ON;
DECLARE @ItemsInStorage int
SET @ItemsInStorage = (SELECT COUNT(*) FROM IGC_GremoryCase WHERE AccountID = @szAccountID AND ((Name = @szName AND StorageType = 2) OR StorageType = 1))
IF (@ItemsInStorage >= 50)
BEGIN
WHILE (@ItemsInStorage >= 50)
BEGIN
DELETE FROM IGC_GremoryCase WHERE AccountID = @szAccountID AND ((Name = @szName AND StorageType = 2) OR StorageType = 1) AND ReceiveDate =
(SELECT MIN(ReceiveDate) FROM IGC_GremoryCase WHERE AccountID = @szAccountID AND ((Name = @szName AND StorageType = 2) OR StorageType = 1))
SET @ItemsInStorage = @ItemsInStorage - 1
END
END
DECLARE @FreeItemGUID int
SET @FreeItemGUID = 0
WHILE (1 = 1)
BEGIN
IF NOT EXISTS (SELECT * FROM IGC_GremoryCase WHERE AccountID = @szAccountID AND ((Name = @szName AND StorageType = 2) OR StorageType = 1) AND ItemGUID = @FreeItemGUID)
BEGIN
BREAK
END
SET @FreeItemGUID = @FreeItemGUID + 1
END
DECLARE @FreeAuthCode int
SET @FreeAuthCode = 0
WHILE (1 = 1)
BEGIN
SET @FreeAuthCode = ROUND(((2000000000 - 1 -1) * RAND() + 1), 0)
IF NOT EXISTS (SELECT * FROM IGC_GremoryCase WHERE AuthCode = @FreeAuthCode)
BEGIN
BREAK
END
END
INSERT INTO IGC_GremoryCase (AccountID, Name, StorageType, RewardSource, ItemGUID, AuthCode, ItemID, ItemLevel, ItemDurability, ItemOp1, ItemOp2, ItemOp3, ItemExcOption, ItemSetOption, ItemSocket1, ItemSocket2, ItemSocket3, ItemSocket4, ItemSocket5, ItemMainAttribute, ItemMuunEvoItemType, ItemMuunEvoItemIndex, ReceiveDate, ExpireDate) VALUES
(@szAccountID, @szName, @StorageType, @RewardSource, @FreeItemGUID, @FreeAuthCode, @ItemID, @ItemLevel, @ItemDurability, @ItemOp1, @ItemOp2, @ItemOp3, @ItemExcOption, @ItemSetOption, @ItemSocket1, @ItemSocket2, @ItemSocket3, @ItemSocket4, @ItemSocket5, @ItemMainAttribute, @ItemMuunEvoItemType, @ItemMuunEvoItemIndex, @ReceiveDate, @ExpireDate)
SELECT @FreeItemGUID AS ItemGUID, @FreeAuthCode AS AuthCode
END
Seguiré revisando los files en busca de mas cosas, si alguien conoce mas bugs ademas de los que se comentaron en este Thread que los comparta. Ademas cuando tenga algunos mas fixeados posteare el .exe ya compilado para los que no entienden mucho de Sources.
Tengo un amigo que esta armando un servidor muy importante con estas files así que le estamos metiendo ganas a los Fixs asi que se agradece también cualquier ayuda.
Saludos.