قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة [ قسم خاص لأسئلة واستفسارات عمل السيرفرات الخاصة ] [ يرجى الالتزام بقوانين قسم الأسئلة والاستفسارات ] |
|
أدوات الموضوع | انواع عرض الموضوع |
06-03-2020, 02:46 PM | #2 | ||||||||||
|
USE [SRO_VT_SHARD] GO /****** Object: StoredProcedure [dbo].[_UPDATE_COST] Script Date: 9/24/2019 4:48:11 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- آ،أ*oA¢®آ،أ†©أ¸¨آ،i (AO¨ùآ،¾Eآ،أŒ) --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ALTER PROCEDURE [dbo].[_UPDATE_COST] @Operation tinyint, @CharID int, @PaymentDevice int, @PackageItemCodeName varchar(129), @RemainGold bigint, @OwnSilkToPay int, @GiftSilkToPay int, @OffsetOptionalPoint int, @MileageToPay int AS SET NOCOUNT ON declare @PaymentDeviceTemp int declare @RemainOwnSilk int declare @RemainGiftSilk int declare @RemainMileage int declare @Result int set @RemainOwnSilk = 0 set @RemainGiftSilk = 0 set @RemainMileage = 0 IF (@RemainGold < 0 or @MileageToPay < 0 or @OwnSilkToPay < 0 or @GiftSilkToPay < 0 or @OffsetOptionalPoint < 0) BEGIN RETURN -2001 END DECLARE @PC_ID INT set @PC_ID = @CharID ---------------------------------------------------------- -- Operation¢¯¢® ¥أ¬u¢أ’o¨ù* A?Au A©أ¸¢¬?AI ¨أ؛¨آ،AI¥أ¬أ°آ،أ†¢® ©أ¸N¨أ؛i ¢¯A¨ùo¥أ¬¥أ¬ AOآ،أ†i, cos ¨أ؛¨آ،AI¥أ¬أ°آ،أ†¢® ©أ¸N¨أ؛i ¢¯A ¨ùo¥أ¬¥أ¬ AO¢¥U. -- A©أ¸¢¬?AI ¨أ؛¨آ،AI¥أ¬أ°¢¬| ¨أ؛iA¢أ’¢¥©آھ ¨أ؛E¨أ؛¨آ،©أ¸آ،أ*¨أ؛©¬ CIآ،أ†U¢¥U. ---------------------------------------------------------- if (@Operation = 19) begin -- COS ¢¯e ©أ¶آ،أ†Cآ،أ†Aآ،أ* آ،¾¢¬AOCNآ،أ†A¢¥Iآ،¾n... A©أ¸¢¬? Aآ،أŒ¨أ؛¨آ،¨ù* ¥أ¬آ،¤ آ،أ*¨أڈAa¨أ؛©¬Ao... SELECT @PC_ID = OwnerCharID FROM _CharCOS WHERE ID = @PC_ID IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN RETURN -2002 END end /* #define EXPAND_DEVICE_GOLDPRICE 1 #define EXPAND_DEVICE_SILKPRICE 2 #define EXPAND_DEVICE_GIFTSILKPRICE 4 #define EXPAND_DEVICE_GUILDPOINT 8 #define EXPAND_DEVICE_MILEAGE 16 */ if ((@PaymentDevice & (2 | 4 | 16 )) > 0) begin -- ¨أ¶CA¨أڈ, ¨ùآ،¾©أ¶آ،أ†¨أ¶CA¨أڈ, ¢¬¢أ’AI¢¬¢çAo¢¬| آ،¾i¨أ؛©¬ CI¢¥Aآ،¾¢¬¢¬¢¬. -- ¢¥U, ¢¬¢أ’AI¢¬¢çAo¢¥A ¢¯E¨ùCAI¢¥U. -- A©أ¸¢¬?AIAC JID¢¬| ¨أ؛o¨أ؛i¢¯A©أ¸E¢أ’o. declare @JID int select top 1 @JID = UserJID from _User where CharID = @PC_ID IF (@@ROWCOUNT = 0 OR @@ERROR <> 0) BEGIN RETURN -2006 END DECLARE @PackageItemID int select @PackageItemID = ID from dbo._RefPackageItem where codename128 = @PackageItemCodeName DECLARE @rvalue int -- EXEC @rvalue = SRO_VT_ACCOUNT.DBO._ConsumeSilkByGameServer @JID, @OwnSilkToPay OUTPUT, @GiftSilkToPay OUTPUT, @MileageToPay output, 1, @CharID EXEC @rvalue = SRO_VT_ACCOUNT.DBO._ConsumeSilkByGameServer @JID, @OwnSilkToPay OUTPUT, @GiftSilkToPay OUTPUT, @MileageToPay output, 0, @CharID, @PackageItemID , 0 IF (@rvalue < 0 OR @@ERROR <> 0) BEGIN RETURN -2012 END -------------------------- --<< 1. ¨ùoA¢´ Au AU¥أ¬a >> -- AOE* -------------------------- -- -- آ،أ†OAO ¨ù*©أ¶oAE¢¯¢®¨ù* آ،أ†آ،أ*¨أ¶A ©أ¶أآ،¾a Aآ،×C¨آھ cost آ،أ†¨£Aآ،أ* آ،أ†aآ،أ†u Aآ،آ؟AI¨¬i¢¯¢® ©أ¸O¨أ؛i¥أ¬أگ¢¥U. -- insert into _ResultOfPackageItemToMappingWithServerSide -- values (@Operation, @CharID, 255, @OwnSilkToPay, 2, 0, 1) -- -- if (@@ERROR <> 0 or @@ROWCOUNT = 0) -- begin -- return -2007 -- end -- -- insert into _ResultOfPackageItemToMappingWithServerSide -- values (@Operation, @CharID, 254,@GiftSilkToPay, 4, 0, 1) -- -- if (@@ERROR <> 0 or @@ROWCOUNT = 0) -- begin -- return -2007 -- end -- -- insert into _ResultOfPackageItemToMappingWithServerSide -- values (@Operation, @CharID, 253,@MileageToPay, 16, 0, 1) -------------------------- --<< 1. ¨ùoA¢´ EA AU¥أ¬a >> -- -------------------------- -- آ،أ†OAO ¨ù*©أ¶oAE¢¯¢®¨ù* آ،أ†آ،أ*¨أ¶A ©أ¶أآ،¾a Aآ،×C¨آھ cost آ،أ†¨£Aآ،أ* آ،أ†aآ،أ†u Aآ،آ؟AI¨¬i¢¯¢® ©أ¸O¨أ؛i¥أ¬أگ¢¥U. insert into _ResultOfPackageItemToMappingWithServerSide values (@Operation, @CharID, 255, @OwnSilkToPay, 2, 0, 1, 0) if (@@ERROR <> 0 or @@ROWCOUNT = 0) begin return -2007 end insert into _ResultOfPackageItemToMappingWithServerSide values (@Operation, @CharID, 254,@GiftSilkToPay, 4, 0, 1, 0) if (@@ERROR <> 0 or @@ROWCOUNT = 0) begin return -2007 end insert into _ResultOfPackageItemToMappingWithServerSide values (@Operation, @CharID, 253,@MileageToPay, 16, 0, 1, 0) ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- if (@@ERROR <> 0 or @@ROWCOUNT = 0) begin return -2007 end end -- gold if ((@PaymentDevice & 1) > 0) begin UPDATE _Char SET RemainGold = @RemainGold WHERE CharID = @PC_ID IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN RETURN -2003 END end -- guildpoint if ((@PaymentDevice & 8) > 0) BEGIN -- آ،¾©آ،¥أ¬a¢¬| ¨أ؛E¨أ؛¨آ،¢¯I¢أ’o. declare @GuildID int select @GuildID = GuildID from _GuildMember where CharID = @PC_ID IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN RETURN -2004 END -- آ،¾©آ،¥أ¬a ¨آ،آ،أ€AI¨آ،¢ç آ،¾i¢أ’o. update _Guild set GatheredSP = GatheredSP - @OffsetOptionalPoint where GatheredSP >= @OffsetOptionalPoint and ID = @GuildID IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN /* -- ¨أ؛©آھAآ،أ*¨ùo¥أ¬¥أ¬ AO¢¥Aآ،أ†A¢¥U. -- by novice. 2010-01-15 ¢¯¢®آ،¤?AU¥أ¬a ¥أ¬آ،أچAIAICu E¢çAa -- ¢¯©آھآ،¤¢® AO¨ù¢ç¥أ¬C¨أ؛i AO¢¥©آھ AU¥أ¬aAIAo¢¬¢¬, A©¬EA آ،أ†©أ¸©أ¶©¬CI¢¥A آ،أ*c¢أ’آ،أ€¥أ¬eAI -- ¨ùoA¢´¥أ¬CAo ¨أ؛EA¨¬ ©أ¸آ،أ*¢¯eAآ،أ* ¨¬¢¬آ،أ†i Eآ،أچ¢أ’o¨أ¶¨¬آ،¤?¢¯o CO ¨ùo AO¨أ؛i¨ù* -- AI ¨¬I¨¬أگآ،¾iAo ¨ùoA¢´C¨آھ©أ¶o¢¬©÷! -- declare @Slot tinyint declare @Slot int declare @RefItemSerial64 bigint declare @RefItemDBID bigint declare @RefItemID int declare @Type tinyint -- by novice. 2010-01-15 ¢¯¢®آ،¤?AU¥أ¬a ¥أ¬آ،أچAIAICu E¢çAa -- set @Slot = 0xd0 -- error_num ¨ù*©أ¶o¢¯¢®¨ù* آ،أ*c¢¯eCI¢¥A ¢¯¢®آ،¤? -- MAKE_SRO_SP_ERR_TYPE( _UPDATE_COST, 0x0004); -- DEFINE_SRO_SP_ERR( SRO_SP_ERR_NOT_ENOUGH_GUILD_POINT, _UPDATE_COST, 0x8001 ); // ==> 0x80010004 -- BIND_SRO_SP_ERR_TO_SRO_ERR( SRO_SP_ERR_NOT_ENOUGH_GUILD_POINT, STRGERR_NOT_ENOUGH_GUILDPOINT ); set @Slot = 0x80010004 -- error_num ¨ù*©أ¶o¢¯¢®¨ù* آ،أ*c¢¯eCI¢¥A ¢¯¢®آ،¤? set @RefItemSerial64 = 0 set @RefItemDBID = 0 set @RefItemID = 0 set @Type = 2 select @Operation, @Slot, @RefItemSerial64, @RefItemDBID, @RefItemID, @Type */ RETURN -2005 END -------------------------- --<< 2. ¨ùoA¢´ Au AU¥أ¬a >> -- -------------------------- -- آ،أ†OAO ¨ù*©أ¶oAE¢¯¢®¨ù* آ،أ†آ،أ*¨أ¶A ©أ¶أآ،¾a Aآ،×C¨آھ cost آ،أ†¨£Aآ،أ* آ،أ†aآ،أ†u Aآ،آ؟AI¨¬i¢¯¢® ©أ¸O¨أ؛i¥أ¬أگ¢¥U. -- insert into _ResultOfPackageItemToMappingWithServerSide -- values (@Operation, @CharID, 252, @OffsetOptionalPoint, 8, 0, 1) -------------------------- --<< 2. ¨ùoA¢´ EA AU¥أ¬a >> -- -------------------------- -- آ،أ†OAO ¨ù*©أ¶oAE¢¯¢®¨ù* آ،أ†آ،أ*¨أ¶A ©أ¶أآ،¾a Aآ،×C¨آھ cost آ،أ†¨£Aآ،أ* آ،أ†aآ،أ†u Aآ،آ؟AI¨¬i¢¯¢® ©أ¸O¨أ؛i¥أ¬أگ¢¥U. insert into _ResultOfPackageItemToMappingWithServerSide values (@Operation, @CharID, 252, @OffsetOptionalPoint, 8, 0, 1, 0) ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- if (@@ERROR <> 0 or @@ROWCOUNT = 0) begin return -2007 end end -- honorpoint else if ((@PaymentDevice & 32) > 0) begin -- honorpoint آ،¾i¢أ’o. update _TrainingCampMember set HonorPoint = HonorPoint - @OffsetOptionalPoint where HonorPoint >= @OffsetOptionalPoint and CharID = @PC_ID if (@@ERROR <> 0 or @@ROWCOUNT = 0) begin return -2006 end -------------------------- --<< 3. ¨ùoA¢´ Au AU¥أ¬a >> -- -------------------------- -- آ،أ†OAO ¨ù*©أ¶oAE¢¯¢®¨ù* آ،أ†آ،أ*¨أ¶A ©أ¶أآ،¾a Aآ،×C¨آھ cost آ،أ†¨£Aآ،أ* آ،أ†aآ،أ†u Aآ،آ؟AI¨¬i¢¯¢® ©أ¸O¨أ؛i¥أ¬أگ¢¥U. -- insert into _ResultOfPackageItemToMappingWithServerSide -- values (@Operation, @CharID, 252, @OffsetOptionalPoint, 32, 0, 1) -------------------------- --<< 3. ¨ùoA¢´ EA AU¥أ¬a >> -- -------------------------- -- آ،أ†OAO ¨ù*©أ¶oAE¢¯¢®¨ù* آ،أ†آ،أ*¨أ¶A ©أ¶أآ،¾a Aآ،×C¨آھ cost آ،أ†¨£Aآ،أ* آ،أ†aآ،أ†u Aآ،آ؟AI¨¬i¢¯¢® ©أ¸O¨أ؛i¥أ¬أگ¢¥U. insert into _ResultOfPackageItemToMappingWithServerSide values (@Operation, @CharID, 252, @OffsetOptionalPoint, 32, 0, 1, 0) ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- if (@@ERROR <> 0 or @@ROWCOUNT = 0) begin return -2007 end end SET NOCOUNT OFF return 1 --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
||||||||||
|
يتصفح الموضوع حالياً : 1 (0 عضو و 1 زائر) | |
أدوات الموضوع | |
انواع عرض الموضوع | |
|
|
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | الردود | آخر مشاركة |
مشكلة ف Item Mall | test2019 | قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة | 2 | 07-04-2020 02:28 AM |
مشكلة فى item Mall | fouad66 | قسم المواضيع المكررة و المخالفة | 0 | 14-03-2015 07:44 PM |
مشكلة في Item Mall F10 | GA]Super] | قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة | 1 | 28-09-2014 08:15 AM |
مشكلة فى item mall | kemomero | قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة | 2 | 22-11-2013 10:23 AM |