vSRO Guild Player Limit Düzenleme ( Ayarlama ) Anlatım.

Spare

Machine Man
.
.
Katılım
28 May 2018
Mesajlar
2,985
Tepkime puanı
3,143
Puanları
605
Yaş
26
Konum
İstanbul
Kredi
89.43[TL]
vsro
Kod:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_Guild_FnAddMember]    Script Date: 15.06.2014 11:08:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO




ALTER PROCEDURE [dbo].[_Guild_FnAddMember]
 @guildID        int,
 @MemberID     int,
 @MemberClass    tinyint,
 @joinDate     smalldatetime,
 @permission     int    
    
as
Declare @LiMiT int = '24' -- << Userr Limit Credits by $Apollo
    if (exists (select CharID from _GuildMember where CharID = @MemberID))
    begin
        return -1001
    end


    declare @MemberName    varchar(64)
    declare @curLevel    tinyint
    select @MemberName = CharName16, @curLevel = CurLevel from _Char with (nolock) where CharID = @MemberID
    if (@@error <> 0 or @@rowcount = 0)
    begin
        return -1
    end
    if (exists (select CharID from _GuildMember with (nolock) where GuildID = @guildID and CharID = @MemberID))
    begin 
        return -2
    end
    
        declare @ReFObjID int
    select @ReFObjID = RefObjID from _Char with (nolock) where CharID = @MemberID
    
    if (@@error <> 0 or @@rowcount = 0)
    begin
        return -5
    end






    declare @siegeAuthority tinyint
    set @siegeAuthority = 0


    if @MemberClass = 0  -- ±æ¸¶ÀÌ¸é °ø¼º±ÇÇÑÀ» commander·Î ¼¼ÆÃ! ±× ¿Ü´Â ÀÏ¹Ý member·Î ¼¼ÆÃÇÑ´Ù.
    begin
        set @siegeAuthority = 1
    end
    Declare @GC int = (Select COUNT(*) from _GuildMember where GuildID = @guildID )
   if @GC  <= @LiMiT begin 
    insert _GuildMember values @guildID, @MemberID, @MemberName, @MemberClass, @curLevel, 0, @joinDate @permission, 0, 0, 0, null, @ReFObjID, @siegeAuthority)
    end
    if (@@error <> 0 or @@rowcount = 0)
    begin
        return -3
    end
    
       if @GC  <= @LiMiT begin  
    update _Char Set GuildID = @guildID where CharID = @MemberID
    end
    if (@@error <> 0 or @@rowcount = 0)
    begin
        return -4
    end
    return 1


24 Yazan Yer Guild Player Limittir Shard a Excute Ediniz :)
 

Benzer konular

Üst