المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : مشكلة في delete char


Howdare
11-11-2017, 03:42 PM
بعد ما char بيتمسح ويعدي 7 اياام عليه مبيتمسحش بيفضل زي ما هو ب ال 7 ايام ثابتة !

افندينا ™Hamboka™
12-11-2017, 12:27 AM
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_AddTimedJob] Script Date: 11/11/2017 01:27:30 م ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER procedure [dbo].[_AddTimedJob]
@CharID int,
@Category tinyint,
@JobID int,
@TimeToKeep int,
@Data1 int,
@Data2 int,
--##begin due to develop composite item
@Data3 int,
@Data4 int,
@Data5 int,
@Data6 int,
@Data7 int,
@Data8 int,
@Serial64 bigint,
@JID int
--##end due to develop composite item
as



if(@JobID = '100005') -- Mudar nome do char
begin
declare @CharName16 varchar(64)
Select @CharName16=CharName16 from _Char where CharID = @CharID
Update _Char Set CharName16 = '@'+ @CharName16 Where CharID = @CharID

end













if(@JobID = '100003')
begin
declare @Strength int
declare @Intellect int
declare @MaxLevel int
declare @RemainStatPoint int
select @MaxLevel = MaxLevel from _Char where CharID = @CharID
set @RemainStatPoint = (@MaxLevel*3)-3
set @MaxLevel = @MaxLevel+19
UPDATE _Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID

end

if(@JobID = '100006') -- forgot World remove
begin
UPDATE _TimedJob SET TimeToKeep='7', Data1='0' WHERE CharID=@CharID AND Category='12'
DELETE FROM _TimedJob WHERE CharID=@CharID AND Category='6'

end

if(@JobID= '100007')-- Holy temple remove
begin
delete from _CharInstanceWorldData where CharID= @CharID

end



if (not exists (select CharID from _Char with (nolock) where CharID = @CharID))
return -1
if (@TimeToKeep <= 0)
return -2
declare @NewJobID int
set @NewJobID = 0

--##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
--##If you want to only have one not both, then just modify the line below!
if (@JobID = 1 and @Category = 2)
BEGIN
insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,D ata2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64, JID)
values(@CharID, @Category, @JobID, 4300, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
END
ELSE
BEGIN
--##begin due to develop composite item
insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,D ata2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64, JID)
values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
END
--##end due to develop composite item
set @NewJobID = @@identity
if (@@error <> 0 or @@rowcount = 0)

return -3
return @NewJobID

Howdare
17-11-2017, 02:09 AM
برده يا برنس مش بيتمسح

Mr Z!dane
17-11-2017, 04:19 AM
عملت ريستارت للجيم سيرفر بس الاول و حولت تجرب تاني ؟؟

Hero
17-11-2017, 05:25 AM
جرب ده
USE [SRO_VT_SHARD]
GO
/******By Jangan ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER procedure [dbo].[_AddTimedJob]
@CharID int,
@Category tinyint,
@JobID int,
@TimeToKeep int,
@Data1 int,
@Data2 int,
--##begin due to develop composite item
@Data3 int,
@Data4 int,
@Data5 int,
@Data6 int,
@Data7 int,
@Data8 int,
@Serial64 bigint,
@JID int
--##end due to develop composite item
as
if (not exists (select CharID from _Char with (nolock) where CharID = @CharID))
return -1
if (@TimeToKeep <= 0)
return -2
declare @NewJobID int
set @NewJobID = 0

--##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
--##If you want to only have one not both, then just modify the line below!
if (@JobID = 2)
BEGIN
return -1
END
ELSE
BEGIN
--##begin due to develop composite item
insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,D ata2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64, JID)
values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
END
--##end due to develop composite item
set @NewJobID = @@identity
if (@@error <> 0 or @@rowcount = 0)

return -3
return @NewJobID
لو منفعش حط دول مكان اللى ف الاخر تبدلهم يعنى
if (@JobID = 1 or @JobID = 2)
BEGIN
return -1
END
ELSE
مش لازم تقفل السيرفر

Howdare
17-11-2017, 04:47 PM
برده مش بيتمسح ورسترت الجيم سيرفر :sad2:

Hamza FiGo
18-11-2017, 01:34 PM
في رسالة بتيجي في الجيم سيرفر او الشيرد صورها ... الايرور دا كان في داتا بيز قديمه مش فاكر اسمها اية كدة

المهم صور الجيم سيرفر والشيرد هتلاقي فية كاتب اسم التابل او البروسيدر اللي فية المشكلة

افندينا ™Hamboka™
20-11-2017, 01:06 AM
##