srodesign
remo
Askar Bilişim
Azel Bilişim
doca sro
Monster Bilişim

 
Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
vSro Char Silinmeme Fixleme
(Okunma: 385)
PurePower
#1
SQL ye kodu okutarak char silinmeme sorununu çözebilirsiniz. kodu okuttuktan sonra oyuna restart atınız.


Kod:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_DeleteCharPermanently_NoTX]    Script Date: 04/24/2012 18:32:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER  PROCEDURE [dbo].[_DeleteCharPermanently_NoTX]
    @UserJID    int,
    @CharID    int
as
    ------------------------------------
    -- Inventory랑 그안에 가지고 있던 아이템들 날려버리자...
    ------------------------------------
    -------------- 펫 소환 아이템부터 일단 삭제 ----------------
    declare @result int
    declare @Slot tinyint
    declare @RefItemID int
    
    declare pc_inv_cursor cursor fast_forward for
    select inv.slot
    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 @slot
    while @@fetch_status = 0
    begin
            exec @result = _STRG_DEL_ITEM_NoTX 1, @CharID, @Slot    
            if (@result < 0)
            begin
                close pc_inv_cursor
                deallocate pc_inv_cursor
                return @result
            end
                        
            fetch next from pc_inv_cursor  into @Slot
    end
    
    close pc_inv_cursor
    deallocate pc_inv_cursor
    ------------------- 남은 아이템들 몽창 삭제  -------------------
    -- 아이템이 하나라도 있다면...
    if (exists (select top 1 itemID from _Inventory where CharID = @CharID AND ItemID <> 0))
    begin
        update _ItemPool Set InUse = 0
        from _ItemPool as pool join _Inventory as inv on pool.ItemID = Inv.ItemID
        where Inv.CharID = @CharID and Inv.ItemID <> 0
    end
    ----------- 아이템들 날렸으니 최종적으루 인벤토리 삭제  ------------
    delete from _Inventory where CharID = @CharID
    if (@@error <> 0)
    begin
        return -10001
    end

    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        APPLY_AVATAR_SYSTEM (허승욱)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    ------------------- 남은 아바타 인벤토리 아이템들 몽창 삭제  -------------------
    -- 아이템이 하나라도 있다면...
    if (exists (select top 1 itemID from _InventoryForAvatar where CharID = @CharID AND ItemID <> 0))
    begin
        update _ItemPool Set InUse = 0
        from _ItemPool as pool join _InventoryForAvatar as InvAva on pool.ItemID = InvAva.ItemID
        where InvAva.CharID = @CharID and InvAva.ItemID <> 0
    end
    ----------- 아이템들 날렸으니 최종적으루 아바타 인벤토리 삭제  ------------
    delete from _InventoryForAvatar where CharID = @CharID
    if (@@error <> 0)
    begin
        return -10008
    end

    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        APPLY_AVATAR_SYSTEM (허승욱)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    ------------------------------------
    -- COS 삭제
    ------------------------------------
/*
    declare @engaged_cos int
    set @engaged_cos = 0
    select @engaged_cos = EngagedCOS from _char with (nolock) where CharID = @CharID
    
    if (@engaged_cos = 0)
    begin
        -- 왜 발?하는 지 잘 ?르겠지만... 아주 드물게 COS 만 남아있는 경우가 있더라고... -_-;
        select @engaged_cos = ID from _CharCOS with (nolock) where OwnerCharID = @CharID
        if (@engaged_cos is null)
            set @engaged_cos = 0
    end
    if (@engaged_cos is not null and @engaged_cos <> 0)
    begin
        declare @Return_Del_COS int
        exec @Return_Del_COS = _DeleteCharCOS_NoTX  @CharID, @engaged_cos
        if (@Return_Del_COS < 0)
        begin
            return -10002
        end
    end
*/
    ------------------------------------
    -- Trijob 데이터 삭제
    ------------------------------------
    delete from _CharTrijob where CharID = @CharID
    ------------------------------------
    -- 스킬 삭제
    ------------------------------------
    delete _CharSkill where CharId = @CharID
    delete _CharSkillMastery where charID = @CharID
    ------------------------------------
    -- 퀘스트 삭제
    ------------------------------------
    delete _CharQuest where CharID = @CharID
    ------------------------------------
    -- 길드 멤버 삭제
    ------------------------------------
    -- !!! 만약 여기서 Guild 멤버 삭제가 일어나지 않으면 ShardManager 에서
    -- _Guild_DelMember 호출해 주도록 수정해야 한다! 지?은 그 과정은 Skip하고
    -- ??리에서 삭제만 일어나게 되어 있거덩...
    declare @GuildID int
    set @GuildID = 0
    select @GuildID = GuildID from _char where charid = @CharID
    if (@GuildID is not null and @GuildID <> 0)
    begin
        if (not exists (select ID from _Guild where ID = @GuildID))
        begin
            update _Char set GuildID = 0 where CharID = @CharID
        end
        else
        begin
            declare @Return_Del_GuildMember int
            exec @Return_Del_GuildMember = _Guild_DelMember_NoTX @GuildID, @CharID
            if (@Return_Del_GuildMember < 0)
                return -10003
        end
    end

    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        APPLY_MENTOR_SYSTEM (최인호)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    DECLARE @CampID INT
    SET @CampID = 0
    SELECT @CampID = CampID FROM _TrainingCampMember WHERE CharID = @CharID
    IF (@CampID IS NOT NULL AND @CampID <> 0)
    BEGIN
        DECLARE @Ret_DelCampMember INT
        EXEC @Ret_DelCampMember = _TRAINING_CAMP_DELMEMBER @CampID, @CharID, 0
        IF (@Ret_DelCampMember < 0)
            RETURN -10007
    END

    -- 있으면 지워버리자~ 뭐.
    DELETE FROM _TrainingCampSubMentorHonorPoint WHERE CharID = @CharID

    -- 경험치 버프 레코드도~~ ㅋㅋ
    DELETE FROM _TrainingCampBuffStatus WHERE CampID = @CampID

    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        APPLY_MENTOR_SYSTEM (최인호)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    -----------------------------------
    -- 친구 리스트 삭제 ( 나의 친구 리스트 + 친구의 친구 리스트중 나 )
    -----------------------------------
    -- 내 친구들..
    declare @FriendCharID    int
    declare @cursor_var     cursor
    
    set @cursor_var = cursor fast_forward
    for
    select FriendCharID
    from _Friend
    where CharID = @CharID
    
    open @cursor_var
    
    fetch next from @cursor_var into @FriendCharID
    
    while( @@FETCH_STATUS = 0 )
    begin
        delete _Friend where CharID = @FriendCharID and FriendCharID = @CharID
    
        fetch next from @cursor_var into @FriendCharID
    end
    close @cursor_var
    deallocate @cursor_var
    -- 나..
    delete _Friend where CharID = @CharID
    -----------------------------------
    -- 쪽지 삭제
    -----------------------------------
    delete _Memo where CharID = @CharID
    ------------------------------------
    -- TimedJob 삭제하기
    ------------------------------------
    delete _TimedJob where CharID = @CharID
    ------------------------------------
    -- Static Avatar 정보 삭제
    ------------------------------------    
    delete from _staticavatar where charID = @charID
    ------------------------------------
    -- 귓말 블럭 정보 삭제
    ------------------------------------    
    -- Hyperdash 2009. 9. 3 현재는 테이블이 없어 캐릭터 삭제가 되지 않음, 추후 UI 개선 1차 ?치가 될 경우에는 주석 해제 필
    delete from _BlockedWhisperers where OwnerID = @charID    
    ------------------------------------
    -- _DeletedChar Entry 삭제
    ------------------------------------
    delete from _DeletedChar where CharID = @CharID
    if (@@error <> 0)
    begin
        return -10004
    end
    -- start by novice.
    DELETE FROM _User WHERE UserJID = @UserJID and CharID = @CharID
    -- finish by novice.

    ------------------------------------
    -- commit !!!
    ------------------------------------
    
    -- 클라이?트용 퀵슬롯 정보 저장 테이블 날리기!!!
    exec _RemoveClientConfig @CharID        -- by novice...... for saving client configurations...
    return @GuildID
Cevapla
Teşekkür Edenler:
 


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  vSro Trigger Öğrenme silverrains 9 134 Dün, Saat: 20:06
Son Yorum: BURAKSERIT
  vSro %5 Lucky Skill Ekleyiniz! dargdarg18 1 19 Dün, Saat: 17:54
Son Yorum: silverrains
  vSro Su Altı Kervan Yolu dargdarg18 0 24 Dün, Saat: 17:40
Son Yorum: dargdarg18
  Vsro Npc Programı İle Npc Ekleme Server Edit 13 1,344 28.03.2017, Saat: 21:51
Son Yorum: eatlam

Hızlı Menü:


Konuyu Okuyanlar: 1 Ziyaretçi
  Tarih: 30.03.2017, Saat: 10:48