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,Data2,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,Data2,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)
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,Data2,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
لو منفعش حط دول مكان اللى ف الاخر تبدلهم يعنى
كود PHP:
if (@JobID = 1 or @JobID = 2) BEGIN return -1 END ELSE