Re: [RELEASE] Soul of Ultimate Nation Emulator, Server Files, GM-Tools & More!
For the bug with the creating characters, if the code seems ok, check the mssql procedures.
@
0x4233
The Stored Procedure for Creating a Character looks fine to me.
Stored Procedure Code:
USE [sunonline]
GO
/****** Object: StoredProcedure [dbo].[S_CreateChar] Script Date: 12/27/2015 19:48:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/* ====================================================================================
1) Procedure Name : S_CreateChar
2) Date : 2009. 06. 25.
3) Team : UCD
-- ====================================================================================*/
ALTER Procedure [dbo].[S_CreateChar]
@
userGuid int, --//??GUID
@
userID varchar(12), --// ?? ??
@
CharName varchar(20), --// ??? ??
@
class tinyint,
@Height tinyint,
@
face tinyint,
@
Hair tinyint
AS
Begin
SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE @
result tinyint
--// ??? ???
SET @
result = 0
--====================================================================================
-- ??? ???? ??
--====================================================================================
If EXISTS ( SELECT CharName FROM T_Character (nolock) WHERE CharName = @
CharName )
begin
SET @
result = 1 --// ?? ???? ??
GOTO ProcEnd
end
--====================================================================================
-- ??? ???? ??
--====================================================================================
If NOT EXISTS ( SELECT UserGuid FROM T_Account (nolock) WHERE UserGuid @
userGuid )
begin
--====================================================================================
-- ??? ?? ? ?? ??
--====================================================================================
-- ??? ?? ??
Insert into T_Account values @
userGuid @
userID,0,0,0,0,0,0)
-- ?? ?? ??
insert T_Warehouse
select @
userGuid,WarehouseItem,Money,pw,getdate() from T_WarehouseSet
end
--====================================================================================
-- ?? ??
--====================================================================================
Declare @g1 int, @g2 int, @g3 int, @g4 int, @g5 int, @
slot int, @
CharGuid int
SELECT @g1=CharGuid1, @g2=CharGuid2, @g3=CharGuid3,@g4=CharGuid4, @g5=CharGuid5 FROM T_Account (nolock) Where UserGuid = @
userGuid
if @g1=0 SET @
slot=0
else if @g2=0 SET @
slot=1
else if @g3=0 SET @
slot=2
else if @g4=0 SET @
slot=3
else if @g5=0 SET @
slot=4
else
begin
set @
result = 2
GOTO ProcEnd
end
begin tran
-- ??? ?? ??
insert T_Character
select @
userGuid @
slot,ClassCode @
CharName,@Height @
face @
Hair,Level,Strength,Dexterity,Vitality,Intelligence,Spirit,SkillStat1,SkillStat2,UserPoint,Exp,MaxHP,MaxHP,MaxMP,MaxMP,Money,RemainStat,RemainSkill,SelectedStyle,1,1,1,Region,LocationX,LocationY,LocationZ,NULL,1,0,1,InventoryItem,TmpInventoryItem,EquipItem,Skill,Quick,Style,Quest,Mission,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,getdate(),getdate(),getdate(),0 FROM T_CharacterSet (nolock) where CharCode @
class
-- ??? ???? ??
select @
CharGuid=@@IDENTITY
--====================================================================================
-- ? ?? ?? ???? ??
--====================================================================================
if( @
slot=0)
begin
UPDATE T_Account SET CharGuid1 = @
CharGuid
WHERE UserGuid = @
userGuid
set @
result=@@ERROR
GOTO TranProcEnd
end
else if( @
slot =1)
begin
UPDATE T_Account SET CharGuid2 = @
CharGuid
WHERE UserGuid = @
userGuid
set @
result=@@ERROR
GOTO TranProcEnd
end
else if( @
slot = 2)
begin
UPDATE T_Account SET CharGuid3 = @
CharGuid
WHERE UserGuid = @
userGuid
set @
result=@@ERROR
GOTO TranProcEnd
end
else if( @
slot= 3)
begin
UPDATE T_Account SET CharGuid4 = @
CharGuid
WHERE UserGuid = @
userGuid
set @
result=@@ERROR
GOTO TranProcEnd
end
else if( @
slot = 4)
begin
UPDATE T_Account SET CharGuid5 = @
CharGuid
WHERE UserGuid = @
userGuid
set @
result=@@ERROR
GOTO TranProcEnd
end
TranProcEnd: -- GOTO
if @
result<>0)
begin
ROLLBACK TRAN
set @
result=3
return @
result
end
ELSE
begin
COMMIT TRAN
select UserGuid,CharGuid,Slot,CharName,HeightCode,FaceCode,HairCode,ClassCode,LV,Region,LocationX,LocationY,LocationZ,EquipItem
from T_Character (nolock)
where CharGuid @
CharGuid
return @
result
end
ProcEnd: -- GOTO
if @
result<>0
return @
result
SET NOCOUNT OFF
SET XACT_ABORT OFF
end
Server Files, Source, & Database!
Here is the Source, Server, and Database for the files I am using. I posted the client I am using in a earlier post on this thread (page 2).
PLEASE SEE THE NEW LINKS ON PAGE 5.
Download Link (Mega): [STRIKE]
You must be registered to see links
[/STRIKE]