Quote:
Originally Posted by blapanda
Nice queries. I am most intrested into the _Memo Limit removal.
Just the case about "_Memo" won't record any kind of conversation, neither save anything.
Do you have a hint about that one? How to activate it? Is it Module or Database related?
|
Its stored procedure, called _Memo_Add
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_Memo_Add] Script Date: 05/01/2014 07:54:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
------------------------------------------------
-- # PROCEDURE _Memo_Add ¼ö?¤
------------------------------------------------
ALTER procedure [dbo].[_Memo_Add]
--???ä ÆÄ¶ó¹?Å?
@TargetCharName varchar(64),
@SenderCharName varchar(64),
@Message varchar(300),
--??°? ÆÄ¶ó¹?Å?
@MAX_MEMO_COUNT int
as
begin transaction
declare @target_charid int
set @target_charid = (select CharID from _Char where CharName16 = @TargetCharName)
if (@@error <> 0 or @@rowcount = 0 )
begin
--±×·±¾Ö´? ¾ø¾?~
rollback transaction
return -1
end
declare @memo_count int
select @memo_count = count(*) from _Memo where CharID = @target_charid
if( @memo_count >= @MAX_MEMO_COUNT )
begin
-- ???ö???? ²???³×~
rollback transaction
return -2
end
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
-- EUROPE_SYSTEM (?Ö???£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
declare @RefObjID int
select @RefObjID = RefObjID from _Char with (nolock) where CharName16 = @SenderCharName
if (@@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
return -4
end
declare @RecordDate smalldatetime
set @RecordDate = GetDate()
insert _Memo (CharID, FromCharName,Message,Date,Status,RefObjID) values( @target_charid, @SenderCharName, @Message, @RecordDate, 0, @RefObjID )
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
if (@@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
--?£°?!!
return -3
end
commit transaction
return @@identity
EDIT: Oke, i think i misunderstood you, you want to remove the limite of messages ? if it is so then check this spoiler:
(its something that i made fast, but it should work)
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_Memo_Add] Script Date: 05/01/2014 07:54:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
------------------------------------------------
-- # PROCEDURE _Memo_Add ¼ö?¤
------------------------------------------------
ALTER procedure [dbo].[_Memo_Add]
--???ä ÆÄ¶ó¹?Å?
@TargetCharName varchar(64),
@SenderCharName varchar(64),
@Message varchar(300),
--??°? ÆÄ¶ó¹?Å?
@MAX_MEMO_COUNT int
as
begin transaction
declare @target_charid int
set @target_charid = (select CharID from _Char where CharName16 = @TargetCharName)
if (@@error <> 0 or @@rowcount = 0 )
begin
--±×·±¾Ö´? ¾ø¾?~
rollback transaction
return -1
end
--This part contains information about Limit of messages, if u read it then u can see that if memo count is higher then max count it will send you message like "your message box is full" (it was just an example i dont know what it will exactly tell you)
--declare @memo_count int
--select @memo_count = count(*) from _Memo where CharID = @target_charid
--if( @memo_count >= @MAX_MEMO_COUNT )
--begin
-- ???ö???? ²???³×~
--rollback transaction
--return -2
--end
--you can simple just remove those lines and you can have endless messages
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
-- EUROPE_SYSTEM (?Ö???£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
declare @RefObjID int
select @RefObjID = RefObjID from _Char with (nolock) where CharName16 = @SenderCharName
if (@@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
return -4
end
declare @RecordDate smalldatetime
set @RecordDate = GetDate()
insert _Memo (CharID, FromCharName,Message,Date,Status,RefObjID) values( @target_charid, @SenderCharName, @Message, @RecordDate, 0, @RefObjID )
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@
if (@@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
--?£°?!!
return -3
end
commit transaction
return @@identity