Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[SOLVED]sp_EndGuBattle

Newbie Spellweaver
Joined
Apr 19, 2018
Messages
60
Reaction score
15
sp_EndGuBattle

who has this sript on database, pls share, thank you
USE [RanGame1]
GO
/****** Object: StoredProcedure [dbo].[sp_EndGuBattle] Script Date: 5/20/2022 8:34:21 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE Procedure [dbo].[sp_EndGuBattle]
@GuSNum int,
@GuPNum int,
@GuFlag int,
@GuKillNum int,
@GuDeathNum int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0

BEGIN

IF @GuFlag = 6 --Win
begin

UPDATE GuildInfo
SET GuBattleWin = GuBattleWin + 1
WHERE GuNum=@GuSNum
End
else IF @GuFlag = 5 --Lose
Begin

UPDATE GuildInfo
SET GuBattleLose = GuBattleLose + 1
WHERE GuNum=@GuSNum
End
else IF @GuFlag = 1 --Draw
Begin

UPDATE GuildInfo
SET GuBattleDraw = GuBattleDraw + 1
WHERE GuNum=@GuPNum
End


--INSERT INTO GuildBattle (GuSNum, GuPNum, GuFlag, GuKillNum,GuDeathNum)
--VALUES (@GuSNum, @GuPNum, @GuFlag, @GuKillNum,@GuDeathNum)

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
END
SET @nReturn = 1
SET NOCOUNT OFF
RETURN @nReturn




set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
 
Upvote 0
Junior Spellweaver
Joined
Feb 28, 2014
Messages
117
Reaction score
11
USE [RanGame1]
GO
/****** Object: StoredProcedure [dbo].[sp_EndGuBattle] Script Date: 5/20/2022 8:34:21 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE Procedure [dbo].[sp_EndGuBattle]
@GuSNum int,
@GuPNum int,
@GuFlag int,
@GuKillNum int,
@GuDeathNum int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0

BEGIN

IF @GuFlag = 6 --Win
begin

UPDATE GuildInfo
SET GuBattleWin = GuBattleWin + 1
WHERE GuNum=@GuSNum
End
else IF @GuFlag = 5 --Lose
Begin

UPDATE GuildInfo
SET GuBattleLose = GuBattleLose + 1
WHERE GuNum=@GuSNum
End
else IF @GuFlag = 1 --Draw
Begin

UPDATE GuildInfo
SET GuBattleDraw = GuBattleDraw + 1
WHERE GuNum=@GuPNum
End


--INSERT INTO GuildBattle (GuSNum, GuPNum, GuFlag, GuKillNum,GuDeathNum)
--VALUES (@GuSNum, @GuPNum, @GuFlag, @GuKillNum,@GuDeathNum)

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
END
SET @nReturn = 1
SET NOCOUNT OFF
RETURN @nReturn




set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
Thank You Very Much sir for your kindness, šŸ„°šŸ„°šŸ„°
 
Upvote 0
Back
Top