Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 25.04.2005, 22:49   #14
astranger
Архивный участник
 
Join Date: Mar 2005
Posts: 41
Default

and here is the stored procedure which you should add in lin2_world
Code:
/********************************************
lin_GetIdSetAmount
	Set the adena amount for a user
INPUT
	@char_name	nvarchar(50)
	@amount    INT
OUTPUT
return
made by
	DiAvOl
date
	2005-04-25

DETAILS
	Checks if the user provided is online, if not changes
	will take effect, else an error message will be returned
********************************************/

CREATE PROCEDURE [DBO].[lin_GetIdSetAmmount]  ( @char_name nvarchar(50), @amount INT)    
AS    
SET NOCOUNT ON

DECLARE @char_id INT
DECLARE @isonline INT

SET @isonline = (SELECT char_id FROM user_data WHERE login > logout AND char_name = @char_name)

IF @isonline IS NULL
	BEGIN
		SET @char_id = (SELECT TOP 1 char_id FROM user_data WHERE char_name = @char_name)  
		exec lin_AdenaChange @char_id, @amount
	END
ELSE
	BEGIN
		print 'Character is Online, Cannot add adena right now'
	END
GO
astranger is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:13.