Hello everyoneI would need help for a player problemhow do you delete items from a player or remove a player's character (without deleting their account)season 4.9I thank you in advance
Hello everyoneI would need help for a player problemhow do you delete items from a player or remove a player's character (without deleting their account)season 4.9I thank you in advance
you asking a query deleting item without deleting account and character?
yes , or tell me how to remove example the character nuri (item 67108864) from the player's accountand the same things for itemsthank you
in Pangya_Character_Information , there is UID field which is foreign key
in Pangya_Item_WareHouse, , there is also UID field which is foreign key
in Pangya_Member_Info there is UID field which is primary key
OK, but what do I do with that ???
haven't test yet, try to backup before giving a try
https://paste.ofcode.org/R5zKa9t2V362dCSJM9Xk98
or
USE [Pangya_S4_TH]
GO
/****** Object: StoredProcedure [dbo].[DeleteCharacter] Script Date: 11/07/2017 01:47:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[DeleteCharacter]
@LOGIN VARCHAR(20),
@CHAR_TYPEID INT
AS
BEGIN
SET NOCOUNT ON
DECLARE @UID INT = 0
-- IF ACCOUNT IS EXISTED
IF EXISTS (SELECT 1 FROM DBO.Pangya_Member_Info WHERE userid = @LOGIN) BEGIN
-- GET UID
SELECT @UID = UID FROM DBO.Pangya_Member_Info WHERE userid = @LOGIN
-- DELETE CHARACTER
DELETE FROM DBO.Pangya_Character_Information WHERE UID = @UID AND typeid = @CHAR_TYPEID
-- IF CHARACTER DELETED
IF (@@ROWCOUNT > 0) BEGIN
UPDATE DBO.Pangya_Item_WareHouse SET Valid = 0 WHERE UID = @UID AND DBO.UDF_PART_GET_CHAR(typeid) = (0x4000000 ^ @CHAR_TYPEID)
END
END
END
GO
it does not workhe still has the same problem that he takes again nuri after a shot he decoin addition there is that he who has this problem (I even test his account I have the same problem at home)
I'm not sure what it is. Take a look at server's log.