decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
52
decomp/schema/RustyHearts/procs/up_update_reward_coupon.sql
Normal file
52
decomp/schema/RustyHearts/procs/up_update_reward_coupon.sql
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
CREATE PROCEDURE [dbo].[up_update_reward_coupon]
|
||||
@auth_id uniqueidentifier,
|
||||
@character_id uniqueidentifier,
|
||||
@character_name nvarchar(16),
|
||||
@bcust_id nvarchar(50),
|
||||
@IP varchar(16),
|
||||
@coupon_type int,
|
||||
@coupon nvarchar(50),
|
||||
@use_date datetime,
|
||||
|
||||
@no int output,
|
||||
@use tinyint output,
|
||||
@item_code int output,
|
||||
@item_count smallint output
|
||||
as
|
||||
set nocount on
|
||||
|
||||
SET @use = 0;
|
||||
SET @no = 0;
|
||||
SET @item_code = 0;
|
||||
SET @item_count = 0;
|
||||
|
||||
select top 1
|
||||
@no = [no],
|
||||
@use = [use],
|
||||
@item_code = [item_code],
|
||||
@item_count = [item_count]
|
||||
from [dbo].[Coupon] with (READUNCOMMITTED) where [coupon] = @coupon and [coupon_type] = @coupon_type
|
||||
|
||||
if ( @no <> 0 )
|
||||
begin
|
||||
--search
|
||||
if( @use = 0 )
|
||||
begin
|
||||
--save
|
||||
UPDATE [dbo].[Coupon] SET
|
||||
[use] = 1,
|
||||
[use_date] = @use_date,
|
||||
[AuthID] = @auth_id,
|
||||
[character_id] = @character_id,
|
||||
[bcust_id] = @bcust_id,
|
||||
[Name] = @character_name,
|
||||
[IP] = @IP
|
||||
where [coupon] = @coupon and [coupon_type] = @coupon_type;
|
||||
|
||||
SET @use = 2
|
||||
end
|
||||
end
|
||||
|
||||
select @no, @use, @item_code, @item_count
|
||||
|
||||
return @@error
|
||||
Loading…
Add table
Add a link
Reference in a new issue