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
38
decomp/schema/RustyHearts/procs/up_read_uni_account_info.sql
Normal file
38
decomp/schema/RustyHearts/procs/up_read_uni_account_info.sql
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
CREATE PROCEDURE [dbo].[up_read_uni_account_info]
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
declare @get_AuthID [uniqueidentifier]
|
||||
declare @diff_min int
|
||||
declare @TotalOff int
|
||||
set @diff_min = 0
|
||||
set @TotalOff = 0
|
||||
|
||||
select @get_AuthID = AuthID from UniAccountInfo with (READUNCOMMITTED) where AuthID = @auth_id;
|
||||
if( @get_AuthID IS NULL )
|
||||
begin
|
||||
insert into UniAccountInfo values( @auth_id, 0,0,4,0,0, getdate() );
|
||||
end
|
||||
|
||||
select @diff_min = DATEDIFF ( mi , LastLogout, getdate() ) from UniAccountInfo with (READUNCOMMITTED) where AuthID = @auth_id
|
||||
update UniAccountInfo set Accruable_OffTime = Accruable_OffTime + @diff_min, LastLogout = getdate()where AuthID = @auth_id
|
||||
|
||||
select @TotalOff = Accruable_OffTime from UniAccountInfo with (READUNCOMMITTED) where AuthID = @auth_id
|
||||
if( @TotalOff > 300 )
|
||||
begin
|
||||
update UniAccountInfo set Accruable_PlayTime = 0, Accruable_OffTime = 0, LastLogout = getdate() where AuthID = @auth_id
|
||||
end
|
||||
|
||||
select
|
||||
AuthID,
|
||||
AccountStorage_Count,
|
||||
AccountStorage_Gold,
|
||||
Use_CharacterSlot,
|
||||
Accruable_PlayTime
|
||||
|
||||
from dbo.UniAccountInfo with (nolock) where AuthID = @auth_id
|
||||
|
||||
return @@error
|
||||
Loading…
Add table
Add a link
Reference in a new issue