|
1.02Q版本宝石交易消失的解决方法,运行以下语句:
在查询分析器里导入这个存储过程
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WHS_SELECT]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[WHS_SELECT]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WHS_UPD_Items]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[WHS_UPD_Items]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WHS_UPD_MnyPwDbv]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[WHS_UPD_MnyPwDbv]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WHS_UPD_Money]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[WHS_UPD_Money]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc WHS_SELECT
@op int,
@Accountid varchar(10)
as
set nocount on
declare @aid varchar(10)
,@cknum int
if @op=1 begin --读取ID,检查仓库是否存在
SELECT @aid=AccountID,@cknum=NeedExtCK FROM warehouse WHERE AccountID=@accountid
if @cknum is null begin --打开主仓库
INSERT INTO warehouse (AccountID, Items, Money, EndUseDate, DbVersion)
VALUES (@accountid,cast(REPLICATE(char(0xff),1920) as varbinary(1920))
,0, getdate(),3)
Select @accountid AS AccountID
end else begin
Update warehouse Set ExtCKNum=NeedExtCK WHERE AccountID=@accountid
if @cknum=0
Select @aid AS AccountID
else begin
if not EXISTS (select AccountID FROM ExtWareHouse WHERE AccountID=@accountid and Number=@cknum) begin
INSERT INTO ExtWarehouse (AccountID,Number,Items, Money, EndUseDate, DbVersion)
VALUES (@accountid,@cknum,cast(REPLICATE(char(0xff),1920) as varbinary(1920))
,0, getdate(), 3)
end
Select @accountid AS AccountID
end
end
end else if @op=2 begin
SELECT @cknum=ExtCKNum FROM warehouse WHERE AccountID=@accountid
if @cknum=0
SELECT Items from warehouse where AccountID=@accountid
else
SELECT Items from ExtWareHouse WHERE AccountID=@Accountid AND Number=@cknum
end else begin
SELECT @cknum=ExtCKNum FROM warehouse WHERE AccountID=@accountid
if @cknum=0
SELECT Money, DbVersion, pw from warehouse where AccountID=@accountid
else
SELECT Money, DbVersion, pw from ExtWareHouse where AccountID=@accountid AND Number=@cknum
end
set nocount off
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc WHS_UPD_Items
@items varchar(4000),
@Accountid varchar(10)
as
set nocount on
declare @cknum int
SELECT @cknum=ExtCKNum FROM warehouse WHERE AccountID=@accountid
if @cknum=0 --主仓库
UPDATE warehouse set Items=cast(@items as varbinary(1920))
where AccountID=@accountid
else
UPDATE ExtWareHouse set Items=cast(@items as varbinary(1920))
where AccountID=@accountid AND Number=@cknum
--waitfor delay '00:00:10'
set nocount off
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc WHS_UPD_MnyPwDbv
@mny int,
@pw int,
@dbv int,
@Accountid varchar(10)
as
set nocount on
declare @cknum int
SELECT @cknum=ExtCKNum FROM warehouse WHERE AccountID=@accountid
if @cknum=0 begin --主仓库
if @pw=0
UPDATE warehouse set Money=@mny,pw=@pw,DbVersion=@dbv
where AccountID=@accountid
else
UPDATE warehouse set Money=@mny,pw=@pw,DbVersion=@dbv
where AccountID=@accountid
UPDATE ExtWareHouse set pw=@pw where AccountID=@accountid
end else begin
UPDATE ExtWareHouse set Money=@mny,pw=@pw,DbVersion=@dbv
where AccountID=@accountid AND Number=@cknum
UPDATE ExtWareHouse set pw=@pw where AccountID=@accountid
if @pw=0
UPDATE WareHouse set pw=@pw where AccountID=@accountid
else
UPDATE WareHouse set pw=@pw where AccountID=@accountid
end
--waitfor delay '00:00:10'
set nocount off
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc WHS_UPD_Money
@mny int,
@Accountid varchar(10)
as
set nocount on
declare @cknum int
SELECT @cknum=ExtCKNum FROM warehouse WHERE AccountID=@accountid
if @cknum=0 --主仓库
UPDATE warehouse set Money=@mny
where AccountID=@accountid
else
UPDATE ExtWareHouse set Money=@mny
where AccountID=@accountid AND Number=@cknum
--waitfor delay '00:00:10'
set nocount off
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
请大家切记本站:奇迹私服大全 HTTP://WWW.530IDC.COM
|