Server Tanitimi , Ko Tanitimi , Silkroad Pvp Serverler , Metin2 Pvp Serverler Server Tanitimi , Ko Tanitimi , Silkroad Pvp Serverler , Metin2 Pvp Serverler

PAYLAŞIM Vsro Academy Mezun,Lvl,Puan Edit

Konu Bilgileri

Kategori Adı Vsro Kod Paylaşımları
Konu Başlığı Vsro Academy Mezun,Lvl,Puan Edit
Konbuyu başlatan VsroEdit
Başlangıç tarihi
Cevaplar
Görüntüleme
İlk mesaj tepki puanı
Son Mesaj Yazan VsroEdit

VsroEdit

Admin
Katılım
28 Ocak 2020
Mesajlar
76
Tepkime puanı
11
Puanları
8
Yaş
24
Vsro Academy Mezun,Lvl,Puan Edit
Kodları inceleyin Lvl puan giriş ve çıkış lvli yarar vs editlemeniz gereken yerleri göreceksiniz.
GS den de academy kurulum lvlini editleyebilirseniz kullanışlı hale gelebilir.


USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_TRAINING_CAMP_MEMBER_GRADUATE] Script Date: 27.03.2020 18:12:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_TRAINING_CAMP_MEMBER_GRADUATE]
@CampID INT,
@MemberID INT,
@Evaluation INT
AS
SET NOCOUNT ON

IF NOT EXISTS (SELECT [ID] FROM _TrainingCamp WITH (NOLOCK) WHERE [ID] = @CampID)
BEGIN
RETURN -2000
END

DECLARE @MemberClass TINYINT
SELECT @MemberClass = MemberClass FROM _TrainingCampMember WHERE CampID = @CampID AND CharID = @MemberID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0 OR @MemberClass = 0)
BEGIN
RETURN -2001
END

BEGIN TRANSACTION

-- º¸Á¶ ÈÄ°ßÀÎÀÇ Á¹¾÷
IF @MemberClass = 1
BEGIN
-- À̳ÑÀº Æò°¡ Á¡¼ö°¡ ¾ø´Ù. ´Ù¸¸, ÀÌ ³ÑÀÇ HonorPoint¸¦ ÀúÀ常 ÇØÁÖ¸é µÈ´Ù.
DECLARE @HonorPoint INT
SELECT @HonorPoint = HonorPoint FROM _TrainingCampMember WHERE CampID = @CampID AND CharID = @MemberID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -2002
END

-- Å×ÀÌºí¿¡ ¸í¿¹ Æ÷ÀÎÆ®¸¦ ÀúÀå.
IF @HonorPoint > 0
BEGIN
INSERT INTO _TrainingCampSubMentorHonorPoint VALUES (@MemberID, @HonorPoint)
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -2
END
END
END
ELSE
-- ¼ö·Ã»ýÀÇ Á¹¾÷
BEGIN

-- ¸â¹öµé¿¡°Ô ¸í¿¹ Æ÷ÀÎÆ®¸¦ ¹Ý¿µÇغ¸ÀÚ.
DECLARE @JoinLvl INT

SELECT @JoinLvl = CharJoinedLevel FROM _TrainingCampMember WHERE CampID = @CampID AND CharID = @MemberID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -2003
END

-- °¡ÀÔ·¹º§ÀÌ 30 ÀÌÇÏ¿©¾ß ¿©·¯°¡Áö ºÎ°¡ ÇýÅÃÀÌ Á¸ÀçÇÑ´Ù.
IF (@JoinLvl <= 30)
BEGIN
DECLARE @MentorPoint INT
DECLARE @SubMentorPoint INT

SET @MentorPoint = (40 - @JoinLvl)
SET @SubMentorPoint = (@MentorPoint / 10)

UPDATE _TrainingCampMember SET HonorPoint = (HonorPoint + @MentorPoint) WHERE CampID = @CampID AND MemberClass = 0
IF (@@ERROR <> 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -4
END

UPDATE _TrainingCampMember SET HonorPoint = (HonorPoint + @SubMentorPoint) WHERE CampID = @CampID AND MemberClass = 1
IF (@@ERROR <> 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -5
END

-- Æò°¡Á¡¼ö¸¦ ¹Ý¿µÇغ¸ÀÚ.
UPDATE _TrainingCamp SET GraduateCount = (GraduateCount + 1),
EvaluationPoint = (EvaluationPoint + @Evaluation),
LatestEvaluationDate = GETDATE()
WHERE [ID] = @CampID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -3
END
END
ELSE
BEGIN
UPDATE _TrainingCamp SET GraduateCount = (GraduateCount + 1) WHERE [ID] = @CampID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -3
END
END


DELETE FROM _TrainingCampBuffStatus WHERE CampID = @CampID AND RecipientCharID = @MemberID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -2005
END
END

-- ÇöÀç Ä·ÇÁ ¸â¹ö¿¡¼ »èÁ¦
DELETE FROM _TrainingCampMember WHERE CampID = @CampID AND CharID = @MemberID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -1
END

COMMIT TRANSACTION

SET NOCOUNT OFF

RETURN 1

USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_TrainingCamp_FnAddMember] Script Date: 27.03.2020 18:17:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_TrainingCamp_FnAddMember]
@CampID INT,
@MemberID INT,
@HonorPoint INT
AS
SET NOCOUNT ON

IF EXISTS (SELECT CharID FROM _TrainingCampMember WHERE CharID = @MemberID)
BEGIN
RETURN -1001
END

DECLARE @MemberName VARCHAR(64)
DECLARE @MemberMaxLvl TINYINT
DECLARE @MemberCurLvl TINYINT

SELECT @MemberName = CharName16, @MemberMaxLvl = MaxLevel, @MemberCurLvl = CurLevel FROM _Char WITH (NOLOCK) WHERE CharID = @MemberID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
RETURN -1
END

IF EXISTS (SELECT CharID FROM _TrainingCampMember WITH (NOLOCK) WHERE CampID = @CampID 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 -3
END

/* commented by novice. ¾Æ·¡·Î ¿Å±ä´Ù!! 2007. 07. 16.
----------------------------------------------------------------------------------------------------------
-- by novice
DECLARE @ApprenticeCount INT
DECLARE @SubMentorCount INT

-- Àý´ë nolockÀ¸·Î ÇÏÁö ¸»ÀÚ!!
SELECT @SubMentorCount = COUNT(*) FROM _TrainingCampMember WHERE CampID = @CampID AND MemberClass = 1
IF ( @SubMentorCount >= 2 )
BEGIN
RETURN -11
END

-- Àý´ë nolockÀ¸·Î ÇÏÁö ¸»ÀÚ!!
SELECT @ApprenticeCount = COUNT(*) FROM _TrainingCampMember WHERE CampID = @CampID AND MemberClass = 2
IF ( @ApprenticeCount >= 5 )
BEGIN
RETURN -12
END
----------------------------------------------------------------------------------------------------------
*/

DECLARE @MemberClass TINYINT
SET @MemberClass = 0

IF @MemberMaxLvl < 40
BEGIN
SET @MemberClass = 2
END
ELSE IF @MemberMaxLvl < 60
BEGIN
SET @MemberClass = 1
END

----------------------------------------------------------------------------------------------------------
-- by novice 2007. 07. 16.
-- °¡ÀÔ½ÃÅ°´Â »ç¶÷ÀÇ ·¹º§¿¡ µû¶ó¼ Ŭ·¡½º¸¦ °áÁ¤Çϴµ¥..
-- ±×³É ¹«ÀÛÁ¤ °¢ Ŭ·¡½º¿¡ ´ëÇØ ÀοøÀ» °Ë»çÇÏ¸é ´ç±Ù ¹®Á¦°¡ ÀÖ´Ù
-- °¡ÀÔÇÏ´Â »ç¶÷ÀÇ Å¬·¡½º¿¡ ¸Â´Â Àοø °Ë»ç¸¦ ½ÃµµÇØ¾ß ÇÑ´Ù!!
-- ±Ùµ¥.. ³»°¡ Àü¿¡´Â ¿Ö Àú·¸°Ô Çß¾úÀ»±î.......... ¤Ð_¤Ð
----------------------------------------------------------------------------------------------------------
IF @MemberClass = 0
BEGIN
DECLARE @MentorCount INT

-- Àý´ë nolockÀ¸·Î ÇÏÁö ¸»ÀÚ!!
SELECT @MentorCount = COUNT(*) FROM _TrainingCampMember WHERE CampID = @CampID AND MemberClass = 0
IF ( @MentorCount >= 1 )
BEGIN
RETURN -14 -- ADD DBÀÛ¾÷ ½ÇÆжó´Â ·Î±×·Î ¾´´Ù..
END
END
ELSE IF @MemberClass = 1
BEGIN
DECLARE @SubMentorCount INT

-- Àý´ë nolockÀ¸·Î ÇÏÁö ¸»ÀÚ!!
SELECT @SubMentorCount = COUNT(*) FROM _TrainingCampMember WHERE CampID = @CampID AND MemberClass = 1
IF ( @SubMentorCount >= 2 )
BEGIN
RETURN -11
END
END
ELSE IF @MemberClass = 2
BEGIN
DECLARE @ApprenticeCount INT

-- Àý´ë nolockÀ¸·Î ÇÏÁö ¸»ÀÚ!!
SELECT @ApprenticeCount = COUNT(*) FROM _TrainingCampMember WHERE CampID = @CampID AND MemberClass = 2
IF ( @ApprenticeCount >= 5 )
BEGIN
RETURN -12
END
END
----------------------------------------------------------------------------------------------------------


INSERT _TrainingCampMember VALUES
(@CampID, @MemberID, @RefObjID, @MemberName, GETDATE(), @MemberClass, @MemberMaxLvl, @MemberCurLvl, @MemberMaxLvl, @HonorPoint)
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
RETURN -5
END

IF ( 0 < (SELECT COUNT(*) FROM _TrainingCampBuffStatus
WHERE CampID = @CampID and RecipientCharID = @MemberID) )
BEGIN
RETURN -2006
END

IF @MemberClass = 0 OR @MemberClass = 2
BEGIN
-- °æÇèÄ¡ ´©Àû ¹öÇÁ¿¡ ´ëÇÑ ³»¿ë
INSERT _TrainingCampBuffStatus
VALUES (@CampID, @MemberID, 0, 0, default, 0, 0)
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
RETURN -2005
END
END

-- °æÇèÄ¡ Àû¸³ ¹öÇÁ¿¡ ´ëÇÑ ³»¿ë
IF @MemberClass = 0
BEGIN
INSERT _TrainingCampBuffStatus
SELECT @CampID, @MemberID, cnt + 1, 0, '2000-01-01', 0, 3
FROM _RefDummySlot with( nolock )
WHERE cnt < 5
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
RETURN -2005
END
END
ELSE IF @MemberClass = 2
BEGIN
INSERT _TrainingCampBuffStatus
SELECT @CampID, @MemberID, 1, 0, '2000-01-01', 0, 3
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
RETURN -2005
END
END

SET NOCOUNT OFF

RETURN 1
 
Üst Alt