المستوي:
عاوز اشيل الoptlevel من البروسيد دة يعنى يعدل علية من غير بلص
PHP:
IF (@Operation = 41 and @ItemRefID = 'Scroll CommonID')
Begin
Declare @NewItemID Int , @ID64 Int, @Slot Int, @ReqPlus Int, @NewPlus Int, @Name Varchar(100), @Codename Varchar(128), @Msg Varchar(128);
Set @Slot = 13; -- Upgrade Slot
Set @ReqPlus = 8; -- Required Optlevel
Set @NewPlus = 0; -- New Item OptLevel
Set @Codename = 'ITEM_MALL_UPGRADE_SCROLL_ALL_SLOT_13'; -- Upgrade Scroll CodeName128
Set @Msg = 'Target item cannot be upgraded, scroll has returned to your inventory.'; -- Private Message for fail upgrading process
Set @Name = (Select Charname16 From [SRO_VT_SHARD].[dbo].[_Char] Where CharID = @CharID);
Select @NewItemID = U.NewRefItemID , @ID64 = I.ID64 From [dbo].[ItemsUpgrade] U Inner Join [SRO_VT_SHARD].[dbo].[_Items] I
ON U.OldRefItemID = I.RefItemID Inner Join [SRO_VT_SHARD].[dbo].[_Inventory] V ON I.ID64 = V.ItemID Where V.CharID = @CharID
and V.Slot = @Slot and I.OptLevel = @ReqPlus;
IF (@NewItemID Is Not Null)
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @NewItemID , OptLevel = @NewPlus Where ID64 = @ID64;
End ELSE Begin
-- Vsro Multi Tool Table
Insert Into [iLegendBot].[dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values ('1','Private',@Name,@Msg,Getdate());
Exec [SRO_VT_SHARD].[dbo].[_ADD_ITEM_EXTERN] @Name,@Codename,1,0;
End
End