- Joined
- Dec 3, 2003
- Messages
- 391
- Reaction score
- 488
The couple system in the repack has one simple flaw;
If you break up, it doesn't remove the couple, so in turn you can't make a new couple due to having duplicate entries.
So for the sake of the good old spirit of ragezone, I'm sharing this basic fix for the couple deletion stored procedure.
Enjoy.
Don't like it? shove it.
If you break up, it doesn't remove the couple, so in turn you can't make a new couple due to having duplicate entries.
So for the sake of the good old spirit of ragezone, I'm sharing this basic fix for the couple deletion stored procedure.
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object: Stored Procedure dbo.uspDeleteCouple Script Date: 03/12/2009 19:27:05 ******/
ALTER PROCEDURE [dbo].[uspDeleteCouple]
@serverindex char(2),
@idHusbandOrWife char(7)
AS
SET NOCOUNT ON
declare @cid int
declare @idFirst int
declare @idSecond int
select @cid = cid from tblCouplePlayer where idPlayer = @idHusbandOrWife
select @idFirst = max(idPlayer) from tblCouplePlayer where cid = @cid and nServer = @serverindex
select @idSecond = min(idPlayer) from tblCouplePlayer where cid = @cid and nServer = @serverindex
delete from tblCouplePlayer where
nServer = @serverindex
AND
(idPlayer = @idFirst
OR
idPlayer = @idSecond)
delete from tblCouple where
nServer = @serverindex
AND
cid = @cid
SET NOCOUNT OFF
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
Don't like it? shove it.

