prosedürden dostum, mevcut olanı at inceleyelim
------------------BİRİNCİ PROCEDUR
USE SRO_VT_LOG
GO
/****** Object: StoredProcedure [dbo].[_SNR2_RARE] Script Date: 22.04.2017 00:17:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[_SNR2_RARE]
@CharID int,
@Slot int
AS
SET NOCOUNT ON;
DECLARE @ItemID int = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where CharID=@CharID and Slot=@Slot and ItemID > 0)
DECLARE @OLDITEMID int = (select RefItemID from SRO_VT_SHARD.dbo._Items where ID64=@ItemID)
UPDATE [SRO_VT_SHARD].[dbo].[_Items] SET
RefItemID = (select NewItemID from SNR1_RARE where OldItemID=@OldItemID), CreaterName = 'Switcher'
Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = @Slot and ItemID > 0) and RefItemID = @OLDITEMID
------------------------------İKİNCİ PROSEDUR
USE SRO_VT_LOG
GO
/****** Object: Table [dbo].[SNR2_RARE] Script Date: 22.04.2017 00:17:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SNR2_RARE](
[OldItemID] [int] NOT NULL,
[NewItemID] [int] NOT NULL
) ON [PRIMARY]
GO
--------------------------storeged procedure eklenen kod
if (@ItemRefID = 41888 and @Operation = 16)--41888 Yere Yazan kısım ekeldiğiniz swicther İD Yazılıcak
begin
exec SRO_VT_LOG.dbo._SNR2_RARE @CharID,13
WAITFOR DELAY '00:00:03'
END