丹药属性控制

社区服务
高级搜索
猴岛论坛综合游戏交流丹药属性控制
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

丹药属性控制

楼层直达
cscheat

ZxID:1000002

等级: 管理员
举报 只看楼主 使用道具 楼主   发表于: 2007-04-03 0

CREATE PROCEDURE RMS_USEMYSTERYPILL
@GameID varchar(14),
@WindowKind int,
@WindowIndex int
AS
set nocount on
declare @RemoveMysteryPillError int, @IncreaseBonusError int, @InsertLogError int,@STotalBonus int
set @RemoveMysteryPillError = 1
set @IncreaseBonusError = 1
set @InsertLogError = 1
begin transaction
select @STotalBonus=STotalBonus from tblGameID1 where GameID = @GameID
if @STotalBonus<15000
delete tblSpecialItem1 where ID in (select top 1 ID from tblSpecialItem1 where ItemKind = 6 AND ItemIndex = 66 AND Position = 1 AND GameID = @GameID AND WindowKind = @WindowKind AND WindowIndex = @WindowIndex)
if @@ROWCOUNT > 0 and @@ERROR = 0
begin
set @RemoveMysteryPillError = 0
end
update tblGameID1 set Bonus2 = Bonus2 + 4, STotalBonus = STotalBonus + 4 where GameID = @GameID
set @IncreaseBonusError = @@ERROR
set @STotalBonus = 0
select @STotalBonus = STotalBonus from tblGameID1 where GameID = @GameID
insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 4)
set @InsertLogError = @@ERROR
if @RemoveMysteryPillError = 0 AND @IncreaseBonusError = 0 AND @InsertLogError = 0
begin
commit transaction
end
else
begin
rollback transaction
end
GO

« 返回列表
发帖 回复