vsro
vsro vsro
vsro vsro

Paylaşım vSRO Satılan İtemin Geri Gelmesi Fix

iMonarch

coded poetry
.
Katılım
14 Tem 2018
Mesajlar
579
Tepkime puanı
402
Puanları
184
Konum
İstanbul
vsro
Merhaba vsro kullanıcıları;Vermiş olduğum bu prosedür ne işe yara sizlere onun hakkında bilgi vereyim.
Npcye sattığınız item return sonrası geri geliyorsa;


SRO_VT_SHARD => Programmabilty => _STRG_DEL_ITEM_NoTX aç Ctrl+a ile seçin komple silin bunu yapıştırın.
(Execute ettikten sonra shard ve Game serveri resetleyin sorun çözülecektir.)

USE [SRO_VT_SHARD]
GO
/ Object: StoredProcedure [dbo].[_STRG_DEL_ITEM_NoTX] Script Date: 22.04.2018 22:31:49 /
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO





ALTER procedure [dbo].[_STRG_DEL_ITEM_NoTX]
@DelFromPC_Inv AS TINYINT,
@CharID AS BIGINT, -- ¸ÅÁ÷ Å¥ºê Ãß°¡·Î ÀÎÇØ È®Àå
@Slot AS TINYINT

as
declare @Rvalue int
declare @ItemToDel bigint

if (@DelFromPC_Inv = 1)
select @ItemToDel = ItemID FROM _Inventory WHERE CharID = @CharID AND Slot = @Slot
else if ( @DelFromPC_Inv = 2 )
select @ItemToDel = ItemID FROM _InventoryForLinkedStorage WHERE LinkedItemID = @CharID AND Slot = @Slot
else
select @ItemToDel = ItemID FROM _InvCOS WHERE COSID = @CharID AND Slot = @Slot

if (@ItemToDel IS NULL or @ItemToDel = 0)
return -1

----------------------------------------
-- Á¹¶ó ÀÌ ¾Æ·¡ÂÊ ¼øÀüÈ÷ Æê ¼Òȯ¾ÆÀÌÅÛ ¶§¹®¿¡
-- µé¾î°£ ÄÚµåÀÌ´Ù. ºÐ¸í overheadÀ̱ä ÇÏÁö¸¸
-- _STRG_DEL_ITEM ÀÇ ½Å·Úµµ¿Í °ÔÀÓ¼¹ö ÄÚµå º¹Àâµµ
-- Áõ°¡¸¦ À¯¹ßÇÏÁö ¾Ê±â À§ÇØ ¾î¿ ¼ö ¾ø´Â ÆÇ´ÜÀ̾ú´Ù. T_T
----------------------------------------
declare @BoundCOS int
declare @RefItemID int
select @RefItemID = RefItemID, @BoundCOS = Data from _Items where ID64 = @ItemToDel
if (@@ROWCOUNT = 0)
return -2

----------------------------------------
-- Ȥ½Ã ÀÌ´® PET ¼Òȯ¾ÆÀÌÅÛÀΰ¡?
----------------------------------------
declare @TypeID1 tinyint
declare @TypeID2 tinyint
declare @TypeID3 tinyint
select @TypeID1 = TypeID1, @TypeID2 = TypeID2, @TypeID3 = TypeID3 from _RefObjCommon where ID = @RefItemID
if (@TypeID1 = 3 and @TypeID2 = 2 and @TypeID3 = 1 )
begin
----------------------------------------
-- ¿«¿©ÀÖ´Â PET ÀÌ ÀÖÀ¸¸é ±×³Ñ »èÁ¦
----------------------------------------
if (@BoundCOS <> 0)
begin
exec @Rvalue = _DeleteCharCOS_NoTX @BoundCOS
if (@Rvalue < 0)
return @Rvalue
end
end

----------------------------------------
-- Ȥ½Ã ÀÌ´® LinkedStorage¾ÆÀÌÅÛÀΰ¡?
----------------------------------------
else if( @TypeID1 = 3 and @TypeID2 = 2 and @TypeID3 = 3 )
begin
----------------------------------------
-- ¿«¿©ÀÖ´Â Storage ÀÖÀ¸¸é ±×³Ñ »èÁ¦
----------------------------------------
if (@BoundCOS <> 0)
begin
IF( NOT EXISTS( select LinkedItemID from _InventoryForLinkedStorage where LinkedItemID = @ItemToDel ) )
BEGIN return -1000 END
IF( EXISTS( select top 1 ItemID from _InventoryForLinkedStorage where LinkedItemID = @ItemToDel and ItemID <> 0 and ItemID IS NOT NULL ) )
BEGIN
update _ItemPool Set InUse = 0 from _ItemPool as IP join _InventoryForLinkedStorage as IFLS on IP.ItemID = IFLS.ItemID
where IFLS.LinkedItemID = @ItemToDel AND IFLS.ItemID <> 0
END
DELETE FROM _InventoryForLinkedStorage where LinkedItemID = @ItemToDel
IF( @@ERROR <> 0 )
BEGIN return -2 END
end
end


----------------------------------------------------------
-- ½½·Ô ºñ¿ì±â
----------------------------------------------------------
if (@DelFromPC_Inv = 1 )
update _Inventory SET ItemID = 0 WHERE CharID = @CharID AND Slot = @Slot
else if (@DelFromPC_Inv = 2 )
update _InventoryForLinkedStorage SET ItemID = 0 WHERE LinkedItemID = @CharID AND Slot = @Slot
else
update _InvCOS SET ItemID = 0 WHERE COSID = @CharID AND Slot = @Slot

if (@@error <> 0 OR @@rowcount = 0)
return -3

----------------------------------------------------------
-- »èÁ¦ ´ë»ó ¾ÆÀÌÅÛ¿¡ ¹ÀÎ ÀÓ´ë Á¤º¸ »èÁ¦
----------------------------------------------------------
if exists (select 1 from _RentItemInfo with (nolock) where nItemDBID = @ItemToDel)
begin
delete from _RentItemInfo where nItemDBID = @ItemToDel
if (@@ERROR <> 0 OR @@ROWCOUNT = 0)
begin
rollback transaction
return -6
end
end

----------------------------------------------------------
-- ÇØ´ç ¾ÆÀÌÅÛ »èÁ¦
----------------------------------------------------------
exec @Rvalue = _STRG_FREE_ITEM_NoTX @ItemToDel
if (@Rvalue < 0)
return -4

return 1
 

Benzer konular

Üst Alt