Change Name Scroll

TheBold

عضو
21 نوفمبر 2017
62
4
5
11
Bolak El Dakrour - Giza

المستوي:

بدون مقدمات كتير
انا عارف ان الموضوع اتعمل قبل كدا هنا بس ناقص
فــ زي فيلم (الباشا تلميذ) " حبيت اعمل حاجة صح "


ندخل على الشغل على طول بقى فـ هنبدأ بالكويري دة

كود:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_RenameCharNameByID]    Script Date: 06/06/2013 01:04:36 ******/
------ by The Bold ------
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-----------------------------------------------------------------------------------------------------

ALTER procedure [dbo].[_RenameCharNameByID]
@CharID        int,
@NewName    varchar(64)
as
   if (not exists (select charid from _char where charid = @CharID))
       return -1
   set xact_abort on
begin transaction
   if (exists (select charid from _charnamelist with (updlock) where charname16 = @NewName))
   begin
       rollback transaction
       return -3
   end
   declare @old_name varchar(64)
   select @old_name = charname16 from _char where charid = @CharID
   update _char set charname16 = @NewName where charid = @CharID
   if (@@error <> 0 or @@rowcount = 0)
   begin
       rollback transaction
       return -4        
   end
   insert _CharNameList values(@NewName, @CharID)
   UPDATE _Char set CharName16 = @NewName where CharID = @CharID
   update _Friend set friendcharname = @NewName where friendcharid = @CharID
   update _GuildMember set charname = @NewName where charid = @CharID
   update _Memo set fromcharname = @NewName where fromcharname = @old_name
   update _TrainingCampMember set charname = @NewName where charid = @CharID
   declare @cos_id int
   declare cos_cursor  cursor fast_forward for    
   select id
    from _charcos 
   where ownercharid = @CharID
   open cos_cursor 
   fetch next from cos_cursor  into @cos_id
   while( @@fetch_status = 0 )
   begin
       update _Items set CreaterName = @NewName 
       where ID64 in 
       (select ItemID from _InvCOS where COSID = @cos_id and ItemID > 0) 
       and CreaterName = @old_Name
       if (@@error <> 0 )
       begin
           close cos_cursor
           deallocate cos_cursor
           rollback transaction
           return -5
       end
       fetch next from cos_cursor  into @cos_id
   end
   close cos_cursor
   deallocate cos_cursor
   declare pc_inv_cursor cursor fast_forward for
   select it.Data                            
   from _Inventory as inv join _Items as it on inv.ItemID = it.ID64 
   where 
   (inv.CharID = @CharID and inv.Slot >= 13 and inv.ItemID > 0) and    
   (it.Data <> 0)  and                            
   (exists (select top 1 ID from _RefObjCommon where ID = it.RefItemID and TypeID1 = 3 and TypeID2 = 2))
   open pc_inv_cursor 
   fetch next from pc_inv_cursor  into @cos_id
   while( @@fetch_status = 0 )
   begin
       update _Items set CreaterName = @NewName 
       where ID64 in 
       (select ItemID from _InvCOS where COSID = @cos_id and ItemID > 0) 
       and CreaterName = @old_Name
       if (@@error <> 0 )
       begin
           close pc_inv_cursor
           deallocate pc_inv_cursor
           rollback transaction
           return -6
       end
       fetch next from pc_inv_cursor  into @cos_id
   end
   close pc_inv_cursor
   deallocate pc_inv_cursor
   if (CHARINDEX('@', @old_name, 0) > 0)
   begin
       select * from _Char
       where CharID = ''
   end
   commit transaction
return 1

و دة الـ Procedure

كود:
	      if(@JobID = '[COLOR="Red"]33844[/COLOR]')
          begin 
          declare @CharName16 varchar(64) 
          Select @CharName16=CharName16 from _Char where CharID = @CharID 
          Update _Char Set CharName16 = '@'+ @CharName16 Where CharID = @CharID 
          return -3 
          end

طبعاً هتحطوا في _AddTimedJob اللي هو في StoredProcedures اللي هو طبعاً في SRO_VT_SHARD " تفصيل ممل اهو "
و هتغير الرقم اللي باللون الاحمر لرقم السكيل بتاع السكرول عندك في الداتا بعد اضافتها


كدا فاضل اية يا اشف ؟! ااه تحميل السكرول ذات نفسها

الرابط مخفي تسجيل الدخول او تسجيل !!


الباسورد : Swagger1337
طبعا كل الحقوق ترجع لــ Swagger1337
 




التعديل الأخير بواسطة المشرف: