|
IF (@Operation = 41) -- If item used! Begin IF (@ItemRefID = 42160) -- RefObjCommon ID Begin Declare @InvID INT = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) Declare @RefItemID INT = (Select RefItemID From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @InvID) IF @RefItemID in (24414,24972,24974,24976,24978,24406,24408,24410,24412) -- IF found your Devil is Male Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24413',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24414 --@Devil B Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24971',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24972 --@Devil A Red Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24973',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24974 --@Devil A Yellow Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24975',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24976 --@Devil A Blue Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24977',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24978 --@Devil S Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24405',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24406 --@Devil A Red Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24407',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24408 --@Devil A Yellow Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24409',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24410 --@Devil A Blue Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24411',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24412 --@Devil S Mall End ELSE IF @RefItemID in (24413,24971,24973,24975,24977,24405,24407,24409,24411) -- IF found your Devil is Female Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24414',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24413 --@Devil B Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24972',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24971 --@Devil A Red Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24974',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24973 --@Devil A Yellow Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24976',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24975 --@Devil A Blue Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24978',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24977 --@Devil S Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24406',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24405 --@Devil A Red Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24408',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24407 --@Devil A Yellow Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24410',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24409 --@Devil A Blue Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24412',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24411 --@Devil S Mall End End End
|