Dev. iLegend
24-01-2015, 07:28 PM
http://www2.0zz0.com/2012/10/22/15/311256858.gif
http://www2.0zz0.com/2012/10/22/16/593531309.png
http://im45.gulfup.com/wsCcCQ.png
Full Useful Procedure Scroll
باختصار يا جماعة دا Procedure لامم فيه حاجات كتيرة وميزته انه بيضيف أيتم للـ 2 Gender
بسكرولاية واحدة يعني مثلاً ممكن تعمل بيه Devils Full Blue ويتضاف مكان الديفل
للكراكتر الـ Male والـ Female بنفس الاسكرول بس طبعاً مع التعديل ع الـ Procedure
انا عامله على Dragon Flag - Slot 3 الديفيل Slot 5 وهكذا. ممكن اصلا تمسح حاجات منه وتعيد صياغة حجات بسيطه فيه
وتخليه على حسب منتا عاوز انا اقصد انه مش مرتبط بحاجة معينة وفى نفس الوقت ممكن تشغله بـ Scroll .
وضايف فيه شرح بسيط بخطوات تفهمك الـ Procedure ماشي إزاي عشان لما تعدل تكون عارف كل حاجة بتعمل ايه.
نيجي للمهم ..
dbo._RefObjCommon
1 42155 ITEM_MALL_NEW_SCROLL ????? (????) xxx SN_ITEM_MALL_NEW_SCROLL SN_ITEM_MALL_NEW_SCROLL_TT_DESC 0 0 3 3 3 1 180000 3 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\archemy_potiontablet_immun_frozen.ddj xxx xxx 21630
dbo._RefObjItem
21630 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ???? 1 ?????? -1 RESURRECT -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0 0
Itemdata_4500.txt
1 42155 ITEM_MALL_NEW_SCROLL ????? (????) xxx SN_ITEM_MALL_NEW_SCROLL SN_ITEM_MALL_NEW_SCROLL_TT_DESC 0 0 3 3 3 1 180000 3 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\archemy_potiontablet_immun_frozen.ddj xxx xxx 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ???? 1 ?????? -1 RESURRECT -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0
Textdata_Object.txt
1 SN_ITEM_MALL_NEW_SCROLL Useful Scroll
1 SN_ITEM_MALL_NEW_SCROLL_TT_DESC <sml2>Useful Scroll Added :)<br><br><strong><font color="255,236,219,156">Created by:</font></strong><br><strong><font color="255,0,255,127">iLegend</font></strong></sml2>
SRO_VT_SHARDLOG
dbo._AddLogItem
IF (@Operation = 41) -- If item used!
Begin
IF (@ItemRefID = 42156) -- RefObjCommon ID
Begin
Execute [SRO_VT_SHARD].[dbo].[_ADD_FLAG] @CharID
End
End
Copy This Procedure then execute it by Shard Name
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_ADD_FLAG] Script Date: 01/24/2015 16:57:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
CREATE PROCEDURE [dbo].[_ADD_FLAG]
@CharID Int
As
-- This Procedure created by [iLegend] for several uses.
-- Main of them is adding item for both gender by 1 scroll, etc.
-- You can change values and parameters as u want.
-- For change to add the item to inventory :
-- Work with this Parameter. Slot = @Empty_Slot and change every _InventoryForAvatar to _Inventory
-- ================================================== ==============================================
Declare @RefObjID Int = (Select RefObjID From [SRO_VT_SHARD].[dbo].[_Char] Where CharID = @CharID)
Declare @ID64 Int = (Select MAX (ID64) FROM [SRO_VT_SHARD].[dbo].[_Items]) +1
Declare @ItemID Int = (Select ItemID From [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Where CharID = @CharID and Slot = 3)
Declare @RefItemID Int
Declare @FreeItemID Bigint
Declare @Inv_Capacity int
Declare @Empty_Slot Int
Declare @SN Bigint = (Select LatestItemSerial From [SRO_VT_SHARD].[dbo].[_LatestItemSerial])
Select @FreeItemID = MAX (ItemID) From [SRO_VT_SHARD].[dbo].[_ItemPool] With (Nolock) Where InUse = 0
Set @Inv_Capacity = (Select InventorySize From [SRO_VT_SHARD].[dbo].[_Char] Where CharID = @CharID)
Select Top 1 @Empty_Slot = Slot From [SRO_VT_SHARD].[dbo].[_Inventory] With (Nolock) Where CharID = @CharID and Slot >= 13 and Slot < @Inv_Capacity and ItemID = 0 Order By Slot
-- IF Char Gender = [M]
-- =====================
IF (@RefObjID between 1907 and 1919) or (@RefObjID between 14875 and 14887)
Begin
-- Step 1 : *If item exist in the selected slot.
-- Actions :
-- 1- Update the exist item by a new parameters that we want.
-- ================================================== ===============
IF (@ItemID > 0)
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set OptLevel = 0 , CreaterName = 'iLegend' , MagParamNum = 2 , MagParam1 = 30064771305 , MagParam2 = 30064771304
Where ID64 = @ItemID
End
-- Step 2 : *If item not exist in the selected slot and free item is exist from dbo._ItemPool.
-- Actions :
-- 1- Update the free item by a new parameters that we want.
-- 2- Update dbo.ItemPool for change the free item to InUse Item.
-- 3- Update the free slot item to the updated item that we do.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID > 0)
Begin
Set @RefItemID = 9374 -- Male Item ID
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID=@RefItemID,OptLevel=0,Variance=0,Data=0, CreaterName='iLegend',MagParamNum=2,MagParam1=3006 4771305,MagParam2=30064771304,MagParam3=NULL,MagPa ram4=NULL,MagParam5=NULL,MagParam6=NULL,MagParam7= NULL,MagParam8=NULL,MagParam9=NULL,MagParam10=NULL ,MagParam11=NULL,MagParam12=NULL
Where ID64 = @FreeItemID
Update [SRO_VT_SHARD].[dbo].[_ItemPool] Set InUse = 1 Where ItemID = @FreeItemID
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @FreeItemID Where CharID = @CharID and Slot = 3
End
-- Step 3 : *If item not exist in the selected slot and item free is not exist from dbo._ItemPool.
-- Actions :
-- 1- Create new item in dbo._Items by a new parameters that we want.
-- 2- Create a line in dbo.ItemPool for make the new item to InUse Item.
-- 3- Update the free slot item to the created item that we create.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID = 0)
Begin
Exec [SRO_VT_SHARD].[dbo].[_GetLatestItemSerial] @SN
Set @RefItemID = 9374 -- Male Item ID
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] ON
Insert InTo [SRO_VT_SHARD].[dbo].[_Items]
(ID64,RefItemID,OptLevel,Variance,Data,CreaterName ,MagParamNum,MagParam1,MagParam2,MagParam3,MagPara m4,MagParam5,MagParam6,MagParam7,MagParam8,MagPara m9,MagParam10,MagParam11,MagParam12,Serial64)
Values (@ID64,@RefItemID,0,0,0,'iLegend',2,30064771305,30 064771304,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,@SN)
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] OFF
Insert InTo [SRO_VT_SHARD].[dbo].[_ItemPool] Values (@ID64,1)
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @ID64 Where CharID = @CharID and Slot = 3
End
End
Else
-- IF Char Gender = [F]
-- =====================
IF (@RefObjID Between 1920 and 1932) Or (@RefObjID Between 14888 and 14900)
Begin
-- Step 1 : *If item exist in the selected slot.
-- Actions :
-- 1- Update the exist item by a new parameters that we want.
-- ================================================== ===============
IF (@ItemID > 0)
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set OptLevel = 0 , CreaterName = 'iLegend' , MagParamNum = 2 , MagParam1 = 30064771305 , MagParam2 = 30064771304
Where ID64 = @ItemID
End
-- Step 2 : *If item not exist in the selected slot and free item is exist from dbo._ItemPool.
-- Actions :
-- 1- Update the free item by a new parameters that we want.
-- 2- Update dbo.ItemPool for change the free item to InUse Item.
-- 3- Update the free slot item to the updated item that we do.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID > 0)
Begin
Set @RefItemID = 9375
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID=@RefItemID,OptLevel=0,Variance=0,Data=0, CreaterName='iLegend',MagParamNum=2,MagParam1=3006 4771305,MagParam2=30064771304,MagParam3=NULL,MagPa ram4=NULL,MagParam5=NULL,MagParam6=NULL,MagParam7= NULL,MagParam8=NULL,MagParam9=NULL,MagParam10=NULL ,MagParam11=NULL,MagParam12=NULL
Where ID64 = @FreeItemID -- Female Item ID
Update [SRO_VT_SHARD].[dbo].[_ItemPool] Set InUse = 1 Where ItemID = @FreeItemID
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @FreeItemID Where CharID = @CharID and Slot = 3
End
-- Step 3 : *If item not exist in the selected slot and item free is not exist from dbo._ItemPool.
-- Actions :
-- 1- Create new item in dbo._Items by a new parameters that we want.
-- 2- Create a line in dbo.ItemPool for make the new item to InUse Item.
-- 3- Update the free slot item to the created item that we create.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID = 0)
Begin
Exec [SRO_VT_SHARD].[dbo].[_GetLatestItemSerial] @SN
Set @RefItemID = 9375 -- Female Item ID
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] ON
Insert InTo [SRO_VT_SHARD].[dbo].[_Items]
(ID64,RefItemID,OptLevel,Variance,Data,CreaterName ,MagParamNum,MagParam1,MagParam2,MagParam3,MagPara m4,MagParam5,MagParam6,MagParam7,MagParam8,MagPara m9,MagParam10,MagParam11,MagParam12,Serial64)
Values (@ID64,@RefItemID,0,0,0,'iLegend',2,30064771305,30 064771304,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,@SN)
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] OFF
Insert InTo [SRO_VT_SHARD].[dbo].[_ItemPool] Values (@ID64,1)
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @ID64 Where CharID = @CharID and Slot = 3
End
End
http://www2.0zz0.com/2012/10/22/16/593531309.png
http://im45.gulfup.com/wsCcCQ.png
Full Useful Procedure Scroll
باختصار يا جماعة دا Procedure لامم فيه حاجات كتيرة وميزته انه بيضيف أيتم للـ 2 Gender
بسكرولاية واحدة يعني مثلاً ممكن تعمل بيه Devils Full Blue ويتضاف مكان الديفل
للكراكتر الـ Male والـ Female بنفس الاسكرول بس طبعاً مع التعديل ع الـ Procedure
انا عامله على Dragon Flag - Slot 3 الديفيل Slot 5 وهكذا. ممكن اصلا تمسح حاجات منه وتعيد صياغة حجات بسيطه فيه
وتخليه على حسب منتا عاوز انا اقصد انه مش مرتبط بحاجة معينة وفى نفس الوقت ممكن تشغله بـ Scroll .
وضايف فيه شرح بسيط بخطوات تفهمك الـ Procedure ماشي إزاي عشان لما تعدل تكون عارف كل حاجة بتعمل ايه.
نيجي للمهم ..
dbo._RefObjCommon
1 42155 ITEM_MALL_NEW_SCROLL ????? (????) xxx SN_ITEM_MALL_NEW_SCROLL SN_ITEM_MALL_NEW_SCROLL_TT_DESC 0 0 3 3 3 1 180000 3 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\archemy_potiontablet_immun_frozen.ddj xxx xxx 21630
dbo._RefObjItem
21630 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ???? 1 ?????? -1 RESURRECT -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0 0
Itemdata_4500.txt
1 42155 ITEM_MALL_NEW_SCROLL ????? (????) xxx SN_ITEM_MALL_NEW_SCROLL SN_ITEM_MALL_NEW_SCROLL_TT_DESC 0 0 3 3 3 1 180000 3 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\archemy_potiontablet_immun_frozen.ddj xxx xxx 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ???? 1 ?????? -1 RESURRECT -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0
Textdata_Object.txt
1 SN_ITEM_MALL_NEW_SCROLL Useful Scroll
1 SN_ITEM_MALL_NEW_SCROLL_TT_DESC <sml2>Useful Scroll Added :)<br><br><strong><font color="255,236,219,156">Created by:</font></strong><br><strong><font color="255,0,255,127">iLegend</font></strong></sml2>
SRO_VT_SHARDLOG
dbo._AddLogItem
IF (@Operation = 41) -- If item used!
Begin
IF (@ItemRefID = 42156) -- RefObjCommon ID
Begin
Execute [SRO_VT_SHARD].[dbo].[_ADD_FLAG] @CharID
End
End
Copy This Procedure then execute it by Shard Name
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_ADD_FLAG] Script Date: 01/24/2015 16:57:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
CREATE PROCEDURE [dbo].[_ADD_FLAG]
@CharID Int
As
-- This Procedure created by [iLegend] for several uses.
-- Main of them is adding item for both gender by 1 scroll, etc.
-- You can change values and parameters as u want.
-- For change to add the item to inventory :
-- Work with this Parameter. Slot = @Empty_Slot and change every _InventoryForAvatar to _Inventory
-- ================================================== ==============================================
Declare @RefObjID Int = (Select RefObjID From [SRO_VT_SHARD].[dbo].[_Char] Where CharID = @CharID)
Declare @ID64 Int = (Select MAX (ID64) FROM [SRO_VT_SHARD].[dbo].[_Items]) +1
Declare @ItemID Int = (Select ItemID From [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Where CharID = @CharID and Slot = 3)
Declare @RefItemID Int
Declare @FreeItemID Bigint
Declare @Inv_Capacity int
Declare @Empty_Slot Int
Declare @SN Bigint = (Select LatestItemSerial From [SRO_VT_SHARD].[dbo].[_LatestItemSerial])
Select @FreeItemID = MAX (ItemID) From [SRO_VT_SHARD].[dbo].[_ItemPool] With (Nolock) Where InUse = 0
Set @Inv_Capacity = (Select InventorySize From [SRO_VT_SHARD].[dbo].[_Char] Where CharID = @CharID)
Select Top 1 @Empty_Slot = Slot From [SRO_VT_SHARD].[dbo].[_Inventory] With (Nolock) Where CharID = @CharID and Slot >= 13 and Slot < @Inv_Capacity and ItemID = 0 Order By Slot
-- IF Char Gender = [M]
-- =====================
IF (@RefObjID between 1907 and 1919) or (@RefObjID between 14875 and 14887)
Begin
-- Step 1 : *If item exist in the selected slot.
-- Actions :
-- 1- Update the exist item by a new parameters that we want.
-- ================================================== ===============
IF (@ItemID > 0)
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set OptLevel = 0 , CreaterName = 'iLegend' , MagParamNum = 2 , MagParam1 = 30064771305 , MagParam2 = 30064771304
Where ID64 = @ItemID
End
-- Step 2 : *If item not exist in the selected slot and free item is exist from dbo._ItemPool.
-- Actions :
-- 1- Update the free item by a new parameters that we want.
-- 2- Update dbo.ItemPool for change the free item to InUse Item.
-- 3- Update the free slot item to the updated item that we do.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID > 0)
Begin
Set @RefItemID = 9374 -- Male Item ID
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID=@RefItemID,OptLevel=0,Variance=0,Data=0, CreaterName='iLegend',MagParamNum=2,MagParam1=3006 4771305,MagParam2=30064771304,MagParam3=NULL,MagPa ram4=NULL,MagParam5=NULL,MagParam6=NULL,MagParam7= NULL,MagParam8=NULL,MagParam9=NULL,MagParam10=NULL ,MagParam11=NULL,MagParam12=NULL
Where ID64 = @FreeItemID
Update [SRO_VT_SHARD].[dbo].[_ItemPool] Set InUse = 1 Where ItemID = @FreeItemID
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @FreeItemID Where CharID = @CharID and Slot = 3
End
-- Step 3 : *If item not exist in the selected slot and item free is not exist from dbo._ItemPool.
-- Actions :
-- 1- Create new item in dbo._Items by a new parameters that we want.
-- 2- Create a line in dbo.ItemPool for make the new item to InUse Item.
-- 3- Update the free slot item to the created item that we create.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID = 0)
Begin
Exec [SRO_VT_SHARD].[dbo].[_GetLatestItemSerial] @SN
Set @RefItemID = 9374 -- Male Item ID
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] ON
Insert InTo [SRO_VT_SHARD].[dbo].[_Items]
(ID64,RefItemID,OptLevel,Variance,Data,CreaterName ,MagParamNum,MagParam1,MagParam2,MagParam3,MagPara m4,MagParam5,MagParam6,MagParam7,MagParam8,MagPara m9,MagParam10,MagParam11,MagParam12,Serial64)
Values (@ID64,@RefItemID,0,0,0,'iLegend',2,30064771305,30 064771304,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,@SN)
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] OFF
Insert InTo [SRO_VT_SHARD].[dbo].[_ItemPool] Values (@ID64,1)
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @ID64 Where CharID = @CharID and Slot = 3
End
End
Else
-- IF Char Gender = [F]
-- =====================
IF (@RefObjID Between 1920 and 1932) Or (@RefObjID Between 14888 and 14900)
Begin
-- Step 1 : *If item exist in the selected slot.
-- Actions :
-- 1- Update the exist item by a new parameters that we want.
-- ================================================== ===============
IF (@ItemID > 0)
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set OptLevel = 0 , CreaterName = 'iLegend' , MagParamNum = 2 , MagParam1 = 30064771305 , MagParam2 = 30064771304
Where ID64 = @ItemID
End
-- Step 2 : *If item not exist in the selected slot and free item is exist from dbo._ItemPool.
-- Actions :
-- 1- Update the free item by a new parameters that we want.
-- 2- Update dbo.ItemPool for change the free item to InUse Item.
-- 3- Update the free slot item to the updated item that we do.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID > 0)
Begin
Set @RefItemID = 9375
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID=@RefItemID,OptLevel=0,Variance=0,Data=0, CreaterName='iLegend',MagParamNum=2,MagParam1=3006 4771305,MagParam2=30064771304,MagParam3=NULL,MagPa ram4=NULL,MagParam5=NULL,MagParam6=NULL,MagParam7= NULL,MagParam8=NULL,MagParam9=NULL,MagParam10=NULL ,MagParam11=NULL,MagParam12=NULL
Where ID64 = @FreeItemID -- Female Item ID
Update [SRO_VT_SHARD].[dbo].[_ItemPool] Set InUse = 1 Where ItemID = @FreeItemID
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @FreeItemID Where CharID = @CharID and Slot = 3
End
-- Step 3 : *If item not exist in the selected slot and item free is not exist from dbo._ItemPool.
-- Actions :
-- 1- Create new item in dbo._Items by a new parameters that we want.
-- 2- Create a line in dbo.ItemPool for make the new item to InUse Item.
-- 3- Update the free slot item to the created item that we create.
-- ================================================== ===============
IF (@ItemID = 0) and (@FreeItemID = 0)
Begin
Exec [SRO_VT_SHARD].[dbo].[_GetLatestItemSerial] @SN
Set @RefItemID = 9375 -- Female Item ID
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] ON
Insert InTo [SRO_VT_SHARD].[dbo].[_Items]
(ID64,RefItemID,OptLevel,Variance,Data,CreaterName ,MagParamNum,MagParam1,MagParam2,MagParam3,MagPara m4,MagParam5,MagParam6,MagParam7,MagParam8,MagPara m9,MagParam10,MagParam11,MagParam12,Serial64)
Values (@ID64,@RefItemID,0,0,0,'iLegend',2,30064771305,30 064771304,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,@SN)
SET IDENTITY_INSERT [SRO_VT_SHARD].[dbo].[_Items] OFF
Insert InTo [SRO_VT_SHARD].[dbo].[_ItemPool] Values (@ID64,1)
Update [SRO_VT_SHARD].[dbo].[_InventoryForAvatar] Set ItemID = @ID64 Where CharID = @CharID and Slot = 3
End
End