كان jayden من trigger unique silk with out program
كود PHP:
USE [SRO_VT_ACCOUNT]
GO
/****** Object: Trigger [dbo].[_UniquesForSilk] Script Date: 4/1/2016 6:40:50 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[_UniquesForSilk]
ON [SRO_VT_ACCOUNT].[dbo].[Evangelion_uniques]
after insert
as begin
DECLARE @MobName varchar(128) , @CharName varchar(128) SELECT @MobName = MobName,@CharName=CharName FROM [SRO_VT_ACCOUNT].[dbo].[Evangelion_uniques]
DECLARE @CharID int = (SELECT CharID FROM SRO_VT_SHARD.dbo._Char where (CharName16 = @CharName OR NickName16 = @CharName))
DECLARE @UserID varchar(56) = (SELECT JID FROM SRO_VT_ACCOUNT.dbo.TB_User U WITH(NOLOCK)JOIN SRO_VT_SHARD.dbo._User U2 WITH(NOLOCK) ON U.JID = U2.UserJID WHERE CharID = @CharID)
DECLARE @SILK int
SELECT @SILK =
CASE WHEN @MobName = 'MOB_CH_TIGERWOMAN' Then '3'
WHEN @MobName = 'MOB_EU_KERBEROS' Then '3'
WHEN @MobName = 'MOB_OA_URUCHI' Then '5'
WHEN @MobName = 'MOB_AM_IVY' Then '3'
WHEN @MobName = 'MOB_KK_ISYUTARU' Then '5'
WHEN @MobName = 'MOB_TK_BONELORD' Then '7'
WHEN @MobName = 'MOB_RM_TAHOMET' Then '7'
WHEN @MobName = 'MOB_RM_ROC' Then '15'
WHEN @MobName = 'MOB_SD_NEITH' Then '6'
WHEN @MobName = 'MOB_SD_SELKIS' Then '6'
WHEN @MobName = 'MOB_SD_SETH' Then '10'
WHEN @MobName = 'MOB_SD_ANUBIS' Then '7'
WHEN @MobName = 'MOB_SD_ISIS' Then '6'
WHEN @MobName = 'MOB_SD_HAROERIS' Then '13'
ELSE 0 END
BEGIN
EXEC SRO_VT_ACCOUNT.CGI.[CGI_WebPurchaseSilk] @UserID,@SILK
END
END