Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE lin2world
- GO
- ALTER TABLE user_data ADD
- aio_data INT NOT NULL DEFAULT 0
- GO
- USE lin2world
- GO
- IF EXISTS (SELECT 1
- FROM INFORMATION_SCHEMA.TABLES
- WHERE TABLE_NAME='BuffList')
- DROP TABLE BuffList
- GO
- CREATE TABLE BuffList(
- char_id INT NOT NULL,
- summon INT NOT NULL DEFAULT 0,
- subjob_idx INT NOT NULL DEFAULT 0,
- b0 INT NOT NULL DEFAULT 0,
- b1 INT NOT NULL DEFAULT 0,
- b2 INT NOT NULL DEFAULT 0,
- b3 INT NOT NULL DEFAULT 0,
- b4 INT NOT NULL DEFAULT 0,
- b5 INT NOT NULL DEFAULT 0,
- b6 INT NOT NULL DEFAULT 0,
- b7 INT NOT NULL DEFAULT 0,
- b8 INT NOT NULL DEFAULT 0,
- b9 INT NOT NULL DEFAULT 0,
- b10 INT NOT NULL DEFAULT 0,
- b11 INT NOT NULL DEFAULT 0,
- b12 INT NOT NULL DEFAULT 0,
- b13 INT NOT NULL DEFAULT 0,
- b14 INT NOT NULL DEFAULT 0,
- b15 INT NOT NULL DEFAULT 0,
- b16 INT NOT NULL DEFAULT 0,
- b17 INT NOT NULL DEFAULT 0,
- b18 INT NOT NULL DEFAULT 0,
- b19 INT NOT NULL DEFAULT 0,
- b20 INT NOT NULL DEFAULT 0,
- b21 INT NOT NULL DEFAULT 0,
- b22 INT NOT NULL DEFAULT 0,
- b23 INT NOT NULL DEFAULT 0,
- b24 INT NOT NULL DEFAULT 0,
- b25 INT NOT NULL DEFAULT 0,
- b26 INT NOT NULL DEFAULT 0,
- b27 INT NOT NULL DEFAULT 0,
- b28 INT NOT NULL DEFAULT 0,
- b29 INT NOT NULL DEFAULT 0,
- b30 INT NOT NULL DEFAULT 0,
- b31 INT NOT NULL DEFAULT 0,
- b32 INT NOT NULL DEFAULT 0,
- b33 INT NOT NULL DEFAULT 0,
- b34 INT NOT NULL DEFAULT 0,
- b35 INT NOT NULL DEFAULT 0,
- b36 INT NOT NULL DEFAULT 0,
- b37 INT NOT NULL DEFAULT 0,
- b38 INT NOT NULL DEFAULT 0,
- b39 INT NOT NULL DEFAULT 0
- )
- GO
- USE [lin2world]
- GO
- USE lin2world
- GO
- ALTER TABLE user_data ADD
- ST_hair_deco INT NOT NULL DEFAULT 0,
- ST_hair_all INT NOT NULL DEFAULT 0
- GO
- USE lin2world
- GO
- IF EXISTS (SELECT 1
- FROM sys.procedures
- WHERE [name]='lin_AddKillDeathStat')
- DROP PROCEDURE lin_AddKillDeathStat
- GO
- IF EXISTS (SELECT 1
- FROM INFORMATION_SCHEMA.TABLES
- WHERE TABLE_NAME='KillDeathStat')
- DROP TABLE KillDeathStat
- GO
- CREATE TABLE KillDeathStat(
- victim_id INT NOT NULL,
- victim_class_id INT NOT NULL DEFAULT 0,
- victim_level INT NOT NULL DEFAULT 0,
- killer_id INT NOT NULL,
- killer_class_id INT NOT NULL DEFAULT 0,
- killer_level INT NOT NULL DEFAULT 0,
- killer_hp INT NOT NULL DEFAULT 0,
- killer_max_hp INT NOT NULL DEFAULT 0,
- killer_cp INT NOT NULL DEFAULT 0,
- killer_max_cp INT NOT NULL DEFAULT 0,
- x INT NOT NULL DEFAULT 0,
- y INT NOT NULL DEFAULT 0,
- z INT NOT NULL DEFAULT 0,
- pvp INT NOT NULL DEFAULT 0,
- skill_id INT NOT NULL DEFAULT 0,
- skill_level INT NOT NULL DEFAULT 0,
- death_time INT NOT NULL DEFAULT 0
- )
- GO
- CREATE PROCEDURE lin_AddKillDeathStat
- @victim_id AS INT,
- @victim_class_id AS INT,
- @victim_level AS INT,
- @killer_id AS INT,
- @killer_class_id AS INT,
- @killer_level AS INT,
- @killer_hp AS INT,
- @killer_max_hp AS INT,
- @killer_cp AS INT,
- @killer_max_cp AS INT,
- @x AS INT,
- @y AS INT,
- @z AS INT,
- @pvp AS INT,
- @skill_id AS INT,
- @skill_level AS INT,
- @death_time AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- INSERT INTO KillDeathStat( victim_id, victim_class_id, victim_level, killer_id, killer_class_id, killer_level, killer_hp, killer_max_hp, killer_cp, killer_max_cp, x, y, z, pvp, skill_id, skill_level, death_time)
- VALUES ( @victim_id, @victim_class_id, @victim_level, @killer_id, @killer_class_id, @killer_level, @killer_hp, @killer_max_hp, @killer_cp, @killer_max_cp, @x, @y, @z, @pvp, @skill_id, @skill_level, @death_time )
- END
- GO
- USE lin2world
- GO
- CREATE TABLE PrivateStore(
- char_id INT NOT NULL,
- store_type INT NULL,
- x_loc INT NULL,
- y_loc INT NULL,
- z_loc INT NULL,
- is_offline INT NULL,
- item1_id INT NULL,
- item1_count INT NULL,
- item1_price INT NULL,
- item1_enchant INT NULL,
- item2_id INT NULL,
- item2_count INT NULL,
- item2_price INT NULL,
- item2_enchant INT NULL,
- item3_id INT NULL,
- item3_count INT NULL,
- item3_price INT NULL,
- item3_enchant INT NULL,
- item4_id INT NULL,
- item4_count INT NULL,
- item4_price INT NULL,
- item4_enchant INT NULL,
- item5_id INT NULL,
- item5_count INT NULL,
- item5_price INT NULL,
- item5_enchant INT NULL,
- item6_id INT NULL,
- item6_count INT NULL,
- item6_price INT NULL,
- item6_enchant INT NULL,
- item7_id INT NULL,
- item7_count INT NULL,
- item7_price INT NULL,
- item7_enchant INT NULL,
- item8_id INT NULL,
- item8_count INT NULL,
- item8_price INT NULL,
- item8_enchant INT NULL
- )
- GO
- USE [lin2world]
- GO
- CREATE PROCEDURE lin_UpdatePrivateStore
- @char_id AS INT,
- @store_type AS INT,
- @x_loc AS INT,
- @y_loc AS INT,
- @z_loc AS INT,
- @is_offline AS INT,
- @item1_id AS INT,
- @item1_count AS INT,
- @item1_price AS INT,
- @item1_enchant AS INT,
- @item2_id AS INT,
- @item2_count AS INT,
- @item2_price AS INT,
- @item2_enchant AS INT,
- @item3_id AS INT,
- @item3_count AS INT,
- @item3_price AS INT,
- @item3_enchant AS INT,
- @item4_id AS INT,
- @item4_count AS INT,
- @item4_price AS INT,
- @item4_enchant AS INT,
- @item5_id AS INT,
- @item5_count AS INT,
- @item5_price AS INT,
- @item5_enchant AS INT,
- @item6_id AS INT,
- @item6_count AS INT,
- @item6_price AS INT,
- @item6_enchant AS INT,
- @item7_id AS INT,
- @item7_count AS INT,
- @item7_price AS INT,
- @item7_enchant AS INT,
- @item8_id AS INT,
- @item8_count AS INT,
- @item8_price AS INT,
- @item8_enchant AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- UPDATE PrivateStore SET store_type=@store_type, x_loc=@x_loc, y_loc=@y_loc, z_loc=@z_loc, is_offline = @is_offline,
- @item1_id=@item1_id, item1_count=@item1_count, item1_price=@item1_price, item1_enchant=@item1_enchant,
- @item2_id=@item2_id, item2_count=@item2_count, item2_price=@item2_price, item2_enchant=@item2_enchant,
- @item3_id=@item3_id, item3_count=@item3_count, item3_price=@item3_price, item3_enchant=@item3_enchant,
- @item4_id=@item4_id, item4_count=@item4_count, item4_price=@item4_price, item4_enchant=@item4_enchant,
- @item5_id=@item5_id, item5_count=@item5_count, item5_price=@item5_price, item5_enchant=@item5_enchant,
- @item6_id=@item6_id, item6_count=@item6_count, item6_price=@item6_price, item6_enchant=@item6_enchant,
- @item7_id=@item7_id, item7_count=@item7_count, item7_price=@item7_price, item7_enchant=@item7_enchant,
- @item8_id=@item8_id, item8_count=@item8_count, item8_price=@item8_price, item8_enchant=@item8_enchant WHERE char_id = @char_id
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- CREATE PROCEDURE lin_DeletePrivateStore
- @char_id AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- DELETE FROM PrivateStore WHERE char_id = @char_id
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- CREATE PROCEDURE lin_CreatePrivateStore
- @char_id AS INT,
- @store_type AS INT,
- @x_loc AS INT,
- @y_loc AS INT,
- @z_loc AS INT,
- @is_offline AS INT,
- @item1_id AS INT,
- @item1_count AS INT,
- @item1_price AS INT,
- @item1_enchant AS INT,
- @item2_id AS INT,
- @item2_count AS INT,
- @item2_price AS INT,
- @item2_enchant AS INT,
- @item3_id AS INT,
- @item3_count AS INT,
- @item3_price AS INT,
- @item3_enchant AS INT,
- @item4_id AS INT,
- @item4_count AS INT,
- @item4_price AS INT,
- @item4_enchant AS INT,
- @item5_id AS INT,
- @item5_count AS INT,
- @item5_price AS INT,
- @item5_enchant AS INT,
- @item6_id AS INT,
- @item6_count AS INT,
- @item6_price AS INT,
- @item6_enchant AS INT,
- @item7_id AS INT,
- @item7_count AS INT,
- @item7_price AS INT,
- @item7_enchant AS INT,
- @item8_id AS INT,
- @item8_count AS INT,
- @item8_price AS INT,
- @item8_enchant AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- INSERT INTO PrivateStore( char_id, store_type, x_loc, y_loc, z_loc, is_offline,
- item1_id, item1_count, item1_price, item1_enchant,
- item2_id, item2_count, item2_price, item2_enchant,
- item3_id, item3_count, item3_price, item3_enchant,
- item4_id, item4_count, item4_price, item4_enchant,
- item5_id, item5_count, item5_price, item5_enchant,
- item6_id, item6_count, item6_price, item6_enchant,
- item7_id, item7_count, item7_price, item7_enchant,
- item8_id, item8_count, item8_price, item8_enchant )
- VALUES ( @char_id, @store_type, @x_loc, @y_loc, @z_loc, @is_offline,
- @item1_id, @item1_count, @item1_price, @item1_enchant,
- @item2_id, @item2_count, @item2_price, @item2_enchant,
- @item3_id, @item3_count, @item3_price, @item3_enchant,
- @item4_id, @item4_count, @item4_price, @item4_enchant,
- @item5_id, @item5_count, @item5_price, @item5_enchant,
- @item6_id, @item6_count, @item6_price, @item6_enchant,
- @item7_id, @item7_count, @item7_price, @item7_enchant,
- @item8_id, @item8_count, @item8_price, @item8_enchant )
- END
- GO
- USE [lin2world]
- GO
- ALTER TABLE dbo.user_data ADD
- spirit_count INT NOT NULL DEFAULT 0
- GO
- USE [LIN2WORLD]
- GO
- /****** Object: Table [dbo].[user_ActiveSkill] Script Date: 02/01/2009 23:21:34 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- DROP TABLE [dbo].[user_ActiveSkill]
- GO
- CREATE TABLE [dbo].[user_ActiveSkill](
- [char_id] [INT] NOT NULL,
- [s1] [INT] NULL,
- [l1] [tinyint] NULL,
- [d1] [INT] NULL,
- [s2] [INT] NULL,
- [l2] [tinyint] NULL,
- [d2] [INT] NULL,
- [s3] [INT] NULL,
- [l3] [tinyint] NULL,
- [d3] [INT] NULL,
- [s4] [INT] NULL,
- [l4] [tinyint] NULL,
- [d4] [INT] NULL,
- [s5] [INT] NULL,
- [l5] [tinyint] NULL,
- [d5] [INT] NULL,
- [s6] [INT] NULL,
- [l6] [tinyint] NULL,
- [d6] [INT] NULL,
- [s7] [INT] NULL,
- [l7] [tinyint] NULL,
- [d7] [INT] NULL,
- [s8] [INT] NULL,
- [l8] [tinyint] NULL,
- [d8] [INT] NULL,
- [s9] [INT] NULL,
- [l9] [tinyint] NULL,
- [d9] [INT] NULL,
- [s10] [INT] NULL,
- [l10] [tinyint] NULL,
- [d10] [INT] NULL,
- [s11] [INT] NULL,
- [l11] [tinyint] NULL,
- [d11] [INT] NULL,
- [s12] [INT] NULL,
- [l12] [tinyint] NULL,
- [d12] [INT] NULL,
- [s13] [INT] NULL,
- [l13] [tinyint] NULL,
- [d13] [INT] NULL,
- [s14] [INT] NULL,
- [l14] [tinyint] NULL,
- [d14] [INT] NULL,
- [s15] [INT] NULL,
- [l15] [tinyint] NULL,
- [d15] [INT] NULL,
- [s16] [INT] NULL,
- [l16] [tinyint] NULL,
- [d16] [INT] NULL,
- [s17] [INT] NULL,
- [l17] [tinyint] NULL,
- [d17] [INT] NULL,
- [s18] [INT] NULL,
- [l18] [tinyint] NULL,
- [d18] [INT] NULL,
- [s19] [INT] NULL,
- [l19] [tinyint] NULL,
- [d19] [INT] NULL,
- [s20] [INT] NULL,
- [l20] [tinyint] NULL,
- [d20] [INT] NULL,
- [s21] [INT] NULL,
- [l21] [tinyint] NULL,
- [d21] [INT] NULL,
- [s22] [INT] NULL,
- [l22] [tinyint] NULL,
- [d22] [INT] NULL,
- [s23] [INT] NULL,
- [l23] [tinyint] NULL,
- [d23] [INT] NULL,
- [s24] [INT] NULL,
- [l24] [tinyint] NULL,
- [d24] [INT] NULL,
- [s25] [INT] NULL,
- [l25] [tinyint] NULL,
- [d25] [INT] NULL,
- [s26] [INT] NULL,
- [l26] [tinyint] NULL,
- [d26] [INT] NULL,
- [s27] [INT] NULL,
- [l27] [tinyint] NULL,
- [d27] [INT] NULL,
- [s28] [INT] NULL,
- [l28] [tinyint] NULL,
- [d28] [INT] NULL,
- [s29] [INT] NULL,
- [l29] [tinyint] NULL,
- [d29] [INT] NULL,
- [s30] [INT] NULL,
- [l30] [tinyint] NULL,
- [d30] [INT] NULL,
- [s31] [INT] NULL,
- [l31] [tinyint] NULL,
- [d31] [INT] NULL,
- [s32] [INT] NULL,
- [l32] [tinyint] NULL,
- [d32] [INT] NULL,
- [s33] [INT] NULL,
- [l33] [tinyint] NULL,
- [d33] [INT] NULL,
- [s34] [INT] NULL,
- [l34] [tinyint] NULL,
- [d34] [INT] NULL,
- [s35] [INT] NULL,
- [l35] [tinyint] NULL,
- [d35] [INT] NULL,
- [s36] [INT] NULL,
- [l36] [tinyint] NULL,
- [d36] [INT] NULL,
- [s37] [INT] NULL,
- [l37] [tinyint] NULL,
- [d37] [INT] NULL,
- [s38] [INT] NULL,
- [l38] [tinyint] NULL,
- [d38] [INT] NULL,
- [s39] [INT] NULL,
- [l39] [tinyint] NULL,
- [d39] [INT] NULL,
- [s40] [INT] NULL,
- [l40] [tinyint] NULL,
- [d40] [INT] NULL,
- [c1] [tinyint] NULL,
- [c2] [tinyint] NULL,
- [c3] [tinyint] NULL,
- [c4] [tinyint] NULL,
- [c5] [tinyint] NULL,
- [c6] [tinyint] NULL,
- [c7] [tinyint] NULL,
- [c8] [tinyint] NULL,
- [c9] [tinyint] NULL,
- [c10] [tinyint] NULL,
- [c11] [tinyint] NULL,
- [c12] [tinyint] NULL,
- [c13] [tinyint] NULL,
- [c14] [tinyint] NULL,
- [c15] [tinyint] NULL,
- [c16] [tinyint] NULL,
- [c17] [tinyint] NULL,
- [c18] [tinyint] NULL,
- [c19] [tinyint] NULL,
- [c20] [tinyint] NULL,
- [c21] [tinyint] NULL,
- [c22] [tinyint] NULL,
- [c23] [tinyint] NULL,
- [c24] [tinyint] NULL,
- [c25] [tinyint] NULL,
- [c26] [tinyint] NULL,
- [c27] [tinyint] NULL,
- [c28] [tinyint] NULL,
- [c29] [tinyint] NULL,
- [c30] [tinyint] NULL,
- [c31] [tinyint] NULL,
- [c32] [tinyint] NULL,
- [c33] [tinyint] NULL,
- [c34] [tinyint] NULL,
- [c35] [tinyint] NULL,
- [c36] [tinyint] NULL,
- [c37] [tinyint] NULL,
- [c38] [tinyint] NULL,
- [c39] [tinyint] NULL,
- [c40] [tinyint] NULL
- ) ON [PRIMARY]
- GO
- USE [lin2world]
- GO
- DROP PROCEDURE lin_CreateActiveSkill
- GO
- CREATE PROCEDURE [dbo].[lin_CreateActiveSkill]
- (
- @char_id INT,
- @s1 INT, @l1 TINYINT, @d1 INT, @c1 TINYINT,
- @s2 INT, @l2 TINYINT, @d2 INT, @c2 TINYINT,
- @s3 INT, @l3 TINYINT, @d3 INT, @c3 TINYINT,
- @s4 INT, @l4 TINYINT, @d4 INT, @c4 TINYINT,
- @s5 INT, @l5 TINYINT, @d5 INT, @c5 TINYINT,
- @s6 INT, @l6 TINYINT, @d6 INT, @c6 TINYINT,
- @s7 INT, @l7 TINYINT, @d7 INT, @c7 TINYINT,
- @s8 INT, @l8 TINYINT, @d8 INT, @c8 TINYINT,
- @s9 INT, @l9 TINYINT, @d9 INT, @c9 TINYINT,
- @s10 INT, @l10 TINYINT, @d10 INT, @c10 TINYINT,
- @s11 INT, @l11 TINYINT, @d11 INT, @c11 TINYINT,
- @s12 INT, @l12 TINYINT, @d12 INT, @c12 TINYINT,
- @s13 INT, @l13 TINYINT, @d13 INT, @c13 TINYINT,
- @s14 INT, @l14 TINYINT, @d14 INT, @c14 TINYINT,
- @s15 INT, @l15 TINYINT, @d15 INT, @c15 TINYINT,
- @s16 INT, @l16 TINYINT, @d16 INT, @c16 TINYINT,
- @s17 INT, @l17 TINYINT, @d17 INT, @c17 TINYINT,
- @s18 INT, @l18 TINYINT, @d18 INT, @c18 TINYINT,
- @s19 INT, @l19 TINYINT, @d19 INT, @c19 TINYINT,
- @s20 INT, @l20 TINYINT, @d20 INT, @c20 TINYINT,
- @s21 INT, @l21 TINYINT, @d21 INT, @c21 TINYINT,
- @s22 INT, @l22 TINYINT, @d22 INT, @c22 TINYINT,
- @s23 INT, @l23 TINYINT, @d23 INT, @c23 TINYINT,
- @s24 INT, @l24 TINYINT, @d24 INT, @c24 TINYINT,
- @s25 INT, @l25 TINYINT, @d25 INT, @c25 TINYINT,
- @s26 INT, @l26 TINYINT, @d26 INT, @c26 TINYINT,
- @s27 INT, @l27 TINYINT, @d27 INT, @c27 TINYINT,
- @s28 INT, @l28 TINYINT, @d28 INT, @c28 TINYINT,
- @s29 INT, @l29 TINYINT, @d29 INT, @c29 TINYINT,
- @s30 INT, @l30 TINYINT, @d30 INT, @c30 TINYINT,
- @s31 INT, @l31 TINYINT, @d31 INT, @c31 TINYINT,
- @s32 INT, @l32 TINYINT, @d32 INT, @c32 TINYINT,
- @s33 INT, @l33 TINYINT, @d33 INT, @c33 TINYINT,
- @s34 INT, @l34 TINYINT, @d34 INT, @c34 TINYINT,
- @s35 INT, @l35 TINYINT, @d35 INT, @c35 TINYINT,
- @s36 INT, @l36 TINYINT, @d36 INT, @c36 TINYINT,
- @s37 INT, @l37 TINYINT, @d37 INT, @c37 TINYINT,
- @s38 INT, @l38 TINYINT, @d38 INT, @c38 TINYINT,
- @s39 INT, @l39 TINYINT, @d39 INT, @c39 TINYINT,
- @s40 INT, @l40 TINYINT, @d40 INT, @c40 TINYINT
- )
- AS
- SET NOCOUNT ON
- INSERT INTO user_activeskill
- (char_id,
- s1, l1, d1, c1,
- s2, l2, d2, c2,
- s3, l3, d3, c3,
- s4, l4, d4, c4,
- s5, l5, d5, c5,
- s6, l6, d6, c6,
- s7, l7, d7, c7,
- s8, l8, d8, c8,
- s9, l9, d9, c9,
- s10, l10, d10, c10,
- s11, l11, d11, c11,
- s12, l12, d12, c12,
- s13, l13, d13, c13,
- s14, l14, d14, c14,
- s15, l15, d15, c15,
- s16, l16, d16, c16,
- s17, l17, d17, c17,
- s18, l18, d18, c18,
- s19, l19, d19, c19,
- s20, l20, d20, c20,
- s21, l21, d21, c21,
- s22, l22, d22, c22,
- s23, l23, d23, c23,
- s24, l24, d24, c24,
- s25, l25, d25, c25,
- s26, l26, d26, c26,
- s27, l27, d27, c27,
- s28, l28, d28, c28,
- s29, l29, d29, c29,
- s30, l30, d30, c30,
- s31, l31, d31, c31,
- s32, l32, d32, c32,
- s33, l33, d33, c33,
- s34, l34, d34, c34,
- s35, l35, d35, c35,
- s36, l36, d36, c36,
- s37, l37, d37, c37,
- s38, l38, d38, c38,
- s39, l39, d39, c39,
- s40, l40, d40, c40 )
- VALUES
- (@char_id,
- @s1, @l1, @d1, @c1,
- @s2, @l2, @d2, @c2,
- @s3, @l3, @d3, @c3,
- @s4, @l4, @d4, @c4,
- @s5, @l5, @d5, @c5,
- @s6, @l6, @d6, @c6,
- @s7, @l7, @d7, @c7,
- @s8, @l8, @d8, @c8,
- @s9, @l9, @d9, @c9,
- @s10, @l10, @d10, @c10,
- @s11, @l11, @d11, @c11,
- @s12, @l12, @d12, @c12,
- @s13, @l13, @d13, @c13,
- @s14, @l14, @d14, @c14,
- @s15, @l15, @d15, @c15,
- @s16, @l16, @d16, @c16,
- @s17, @l17, @d17, @c17,
- @s18, @l18, @d18, @c18,
- @s19, @l19, @d19, @c19,
- @s20, @l20, @d20, @c20,
- @s21, @l21, @d21, @c21,
- @s22, @l22, @d22, @c22,
- @s23, @l23, @d23, @c23,
- @s24, @l24, @d24, @c24,
- @s25, @l25, @d25, @c25,
- @s26, @l26, @d26, @c26,
- @s27, @l27, @d27, @c27,
- @s28, @l28, @d28, @c28,
- @s29, @l29, @d29, @c29,
- @s30, @l30, @d30, @c30,
- @s31, @l31, @d31, @c31,
- @s32, @l32, @d32, @c32,
- @s33, @l33, @d33, @c33,
- @s34, @l34, @d34, @c34,
- @s35, @l35, @d35, @c35,
- @s36, @l36, @d36, @c36,
- @s37, @l37, @d37, @c37,
- @s38, @l38, @d38, @c38,
- @s39, @l39, @d39, @c39,
- @s40, @l40, @d40, @c40 )
- GO
- -- ================================================
- -- Template generated from Template Explorer using:
- -- Create Procedure (New Menu).SQL
- --
- -- Use the Specify Values for Template Parameters
- -- command (Ctrl-Shift-M) to fill in the parameter
- -- values below.
- --
- -- This block of comments will not be included in
- -- the definition of the procedure.
- -- ================================================
- USE lin2world
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestLoadAbnormalStatus
- -- =============================================
- IF EXISTS (SELECT 1
- FROM sys.procedures
- WHERE [name]='lin_GetActiveSkills')
- DROP PROCEDURE lin_GetActiveSkills
- GO
- CREATE PROCEDURE lin_GetActiveSkills
- -- Add the parameters for the stored procedure here
- @char_id AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- -- Insert statements for procedure here
- SELECT [s1]
- ,[l1]
- ,[d1]
- ,[s2]
- ,[l2]
- ,[d2]
- ,[s3]
- ,[l3]
- ,[d3]
- ,[s4]
- ,[l4]
- ,[d4]
- ,[s5]
- ,[l5]
- ,[d5]
- ,[s6]
- ,[l6]
- ,[d6]
- ,[s7]
- ,[l7]
- ,[d7]
- ,[s8]
- ,[l8]
- ,[d8]
- ,[s9]
- ,[l9]
- ,[d9]
- ,[s10]
- ,[l10]
- ,[d10]
- ,[s11]
- ,[l11]
- ,[d11]
- ,[s12]
- ,[l12]
- ,[d12]
- ,[s13]
- ,[l13]
- ,[d13]
- ,[s14]
- ,[l14]
- ,[d14]
- ,[s15]
- ,[l15]
- ,[d15]
- ,[s16]
- ,[l16]
- ,[d16]
- ,[s17]
- ,[l17]
- ,[d17]
- ,[s18]
- ,[l18]
- ,[d18]
- ,[s19]
- ,[l19]
- ,[d19]
- ,[s20]
- ,[l20]
- ,[d20]
- ,[s21]
- ,[l21]
- ,[d21]
- ,[s22]
- ,[l22]
- ,[d22]
- ,[s23]
- ,[l23]
- ,[d23]
- ,[s24]
- ,[l24]
- ,[d24]
- ,[s25]
- ,[l25]
- ,[d25]
- ,[s26]
- ,[l26]
- ,[d26]
- ,[s27]
- ,[l27]
- ,[d27]
- ,[s28]
- ,[l28]
- ,[d28]
- ,[s29]
- ,[l29]
- ,[d29]
- ,[s30]
- ,[l30]
- ,[d30]
- ,[s31]
- ,[l31]
- ,[d31]
- ,[s32]
- ,[l32]
- ,[d32]
- ,[s33]
- ,[l33]
- ,[d33]
- ,[s34]
- ,[l34]
- ,[d34]
- ,[s35]
- ,[l35]
- ,[d35]
- ,[s36]
- ,[l36]
- ,[d36]
- ,[s37]
- ,[l37]
- ,[d37]
- ,[s38]
- ,[l38]
- ,[d38]
- ,[s39]
- ,[l39]
- ,[d39]
- ,[s40]
- ,[l40]
- ,[d40]
- ,[c1]
- ,[c2]
- ,[c3]
- ,[c4]
- ,[c5]
- ,[c6]
- ,[c7]
- ,[c8]
- ,[c9]
- ,[c10]
- ,[c11]
- ,[c12]
- ,[c13]
- ,[c14]
- ,[c15]
- ,[c16]
- ,[c17]
- ,[c18]
- ,[c19]
- ,[c20]
- ,[c21]
- ,[c22]
- ,[c23]
- ,[c24]
- ,[c25]
- ,[c26]
- ,[c27]
- ,[c28]
- ,[c29]
- ,[c30]
- ,[c31]
- ,[c32]
- ,[c33]
- ,[c34]
- ,[c35]
- ,[c36]
- ,[c37]
- ,[c38]
- ,[c39]
- ,[c40]
- FROM [lin2world].[dbo].[user_ActiveSkill] WHERE char_id = @char_id
- END
- GO
- USE lin2world
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- DROP PROCEDURE lin_UpdateActiveSkill
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestSaveAbnormalStatus
- -- =============================================
- CREATE PROCEDURE lin_UpdateActiveSkill
- (
- @char_id INT,
- @s1 INT, @l1 TINYINT, @d1 INT, @c1 TINYINT,
- @s2 INT, @l2 TINYINT, @d2 INT, @c2 TINYINT,
- @s3 INT, @l3 TINYINT, @d3 INT, @c3 TINYINT,
- @s4 INT, @l4 TINYINT, @d4 INT, @c4 TINYINT,
- @s5 INT, @l5 TINYINT, @d5 INT, @c5 TINYINT,
- @s6 INT, @l6 TINYINT, @d6 INT, @c6 TINYINT,
- @s7 INT, @l7 TINYINT, @d7 INT, @c7 TINYINT,
- @s8 INT, @l8 TINYINT, @d8 INT, @c8 TINYINT,
- @s9 INT, @l9 TINYINT, @d9 INT, @c9 TINYINT,
- @s10 INT, @l10 TINYINT, @d10 INT, @c10 TINYINT,
- @s11 INT, @l11 TINYINT, @d11 INT, @c11 TINYINT,
- @s12 INT, @l12 TINYINT, @d12 INT, @c12 TINYINT,
- @s13 INT, @l13 TINYINT, @d13 INT, @c13 TINYINT,
- @s14 INT, @l14 TINYINT, @d14 INT, @c14 TINYINT,
- @s15 INT, @l15 TINYINT, @d15 INT, @c15 TINYINT,
- @s16 INT, @l16 TINYINT, @d16 INT, @c16 TINYINT,
- @s17 INT, @l17 TINYINT, @d17 INT, @c17 TINYINT,
- @s18 INT, @l18 TINYINT, @d18 INT, @c18 TINYINT,
- @s19 INT, @l19 TINYINT, @d19 INT, @c19 TINYINT,
- @s20 INT, @l20 TINYINT, @d20 INT, @c20 TINYINT,
- @s21 INT, @l21 TINYINT, @d21 INT, @c21 TINYINT,
- @s22 INT, @l22 TINYINT, @d22 INT, @c22 TINYINT,
- @s23 INT, @l23 TINYINT, @d23 INT, @c23 TINYINT,
- @s24 INT, @l24 TINYINT, @d24 INT, @c24 TINYINT,
- @s25 INT, @l25 TINYINT, @d25 INT, @c25 TINYINT,
- @s26 INT, @l26 TINYINT, @d26 INT, @c26 TINYINT,
- @s27 INT, @l27 TINYINT, @d27 INT, @c27 TINYINT,
- @s28 INT, @l28 TINYINT, @d28 INT, @c28 TINYINT,
- @s29 INT, @l29 TINYINT, @d29 INT, @c29 TINYINT,
- @s30 INT, @l30 TINYINT, @d30 INT, @c30 TINYINT,
- @s31 INT, @l31 TINYINT, @d31 INT, @c31 TINYINT,
- @s32 INT, @l32 TINYINT, @d32 INT, @c32 TINYINT,
- @s33 INT, @l33 TINYINT, @d33 INT, @c33 TINYINT,
- @s34 INT, @l34 TINYINT, @d34 INT, @c34 TINYINT,
- @s35 INT, @l35 TINYINT, @d35 INT, @c35 TINYINT,
- @s36 INT, @l36 TINYINT, @d36 INT, @c36 TINYINT,
- @s37 INT, @l37 TINYINT, @d37 INT, @c37 TINYINT,
- @s38 INT, @l38 TINYINT, @d38 INT, @c38 TINYINT,
- @s39 INT, @l39 TINYINT, @d39 INT, @c39 TINYINT,
- @s40 INT, @l40 TINYINT, @d40 INT, @c40 TINYINT
- )
- AS
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- IF EXISTS(SELECT * FROM user_activeskill WHERE char_id = @char_id)
- BEGIN
- UPDATE user_activeskill
- SET
- s1 = @s1, l1 = @l1, d1 = @d1, c1 = @c1,
- s2 = @s2, l2 = @l2, d2 = @d2, c2 = @c2,
- s3 = @s3, l3 = @l3, d3 = @d3, c3 = @c3,
- s4 = @s4, l4 = @l4, d4 = @d4, c4 = @c4,
- s5 = @s5, l5 = @l5, d5 = @d5, c5 = @c5,
- s6 = @s6, l6 = @l6, d6 = @d6, c6 = @c6,
- s7 = @s7, l7 = @l7, d7 = @d7, c7 = @c7,
- s8 = @s8, l8 = @l8, d8 = @d8, c8 = @c8,
- s9 = @s9, l9 = @l9, d9 = @d9, c9 = @c9,
- s10 = @s10, l10 = @l10, d10 = @d10, c10 = @c10,
- s11 = @s11, l11 = @l11, d11 = @d11, c11 = @c11,
- s12 = @s12, l12 = @l12, d12 = @d12, c12 = @c12,
- s13 = @s13, l13 = @l13, d13 = @d13, c13 = @c13,
- s14 = @s14, l14 = @l14, d14 = @d14, c14 = @c14,
- s15 = @s15, l15 = @l15, d15 = @d15, c15 = @c15,
- s16 = @s16, l16 = @l16, d16 = @d16, c16 = @c16,
- s17 = @s17, l17 = @l17, d17 = @d17, c17 = @c17,
- s18 = @s18, l18 = @l18, d18 = @d18, c18 = @c18,
- s19 = @s19, l19 = @l19, d19 = @d19, c19 = @c19,
- s20 = @s20, l20 = @l20, d20 = @d20, c20 = @c20,
- s21 = @s21, l21 = @l21, d21 = @d21, c21 = @c21,
- s22 = @s22, l22 = @l22, d22 = @d22, c22 = @c22,
- s23 = @s23, l23 = @l23, d23 = @d23, c23 = @c23,
- s24 = @s24, l24 = @l24, d24 = @d24, c24 = @c24,
- s25 = @s25, l25 = @l25, d25 = @d25, c25 = @c25,
- s26 = @s26, l26 = @l26, d26 = @d26, c26 = @c26,
- s27 = @s27, l27 = @l27, d27 = @d27, c27 = @c27,
- s28 = @s28, l28 = @l28, d28 = @d28, c28 = @c28,
- s29 = @s29, l29 = @l29, d29 = @d29, c29 = @c29,
- s30 = @s30, l30 = @l30, d30 = @d30, c30 = @c30,
- s31 = @s31, l31 = @l31, d31 = @d31, c31 = @c31,
- s32 = @s32, l32 = @l32, d32 = @d32, c32 = @c32,
- s33 = @s33, l33 = @l33, d33 = @d33, c33 = @c33,
- s34 = @s34, l34 = @l34, d34 = @d34, c34 = @c34,
- s35 = @s35, l35 = @l35, d35 = @d35, c35 = @c35,
- s36 = @s36, l36 = @l36, d36 = @d36, c36 = @c36,
- s37 = @s37, l37 = @l37, d37 = @d37, c37 = @c37,
- s38 = @s38, l38 = @l38, d38 = @d38, c38 = @c38,
- s39 = @s39, l39 = @l39, d39 = @d39, c39 = @c39,
- s40 = @s40, l40 = @l40, d40 = @d40, c40 = @c40
- WHERE char_id = @char_id
- END
- ELSE
- BEGIN
- INSERT INTO user_activeskill
- (char_id,
- s1, l1, d1, c1,
- s2, l2, d2, c2,
- s3, l3, d3, c3,
- s4, l4, d4, c4,
- s5, l5, d5, c5,
- s6, l6, d6, c6,
- s7, l7, d7, c7,
- s8, l8, d8, c8,
- s9, l9, d9, c9,
- s10, l10, d10, c10,
- s11, l11, d11, c11,
- s12, l12, d12, c12,
- s13, l13, d13, c13,
- s14, l14, d14, c14,
- s15, l15, d15, c15,
- s16, l16, d16, c16,
- s17, l17, d17, c17,
- s18, l18, d18, c18,
- s19, l19, d19, c19,
- s20, l20, d20, c20,
- s21, l21, d21, c21,
- s22, l22, d22, c22,
- s23, l23, d23, c23,
- s24, l24, d24, c24,
- s25, l25, d25, c25,
- s26, l26, d26, c26,
- s27, l27, d27, c27,
- s28, l28, d28, c28,
- s29, l29, d29, c29,
- s30, l30, d30, c30,
- s31, l31, d31, c31,
- s32, l32, d32, c32,
- s33, l33, d33, c33,
- s34, l34, d34, c34,
- s35, l35, d35, c35,
- s36, l36, d36, c36,
- s37, l37, d37, c37,
- s38, l38, d38, c38,
- s39, l39, d39, c39,
- s40, l40, d40, c40 )
- VALUES
- (@char_id,
- @s1, @l1, @d1, @c1,
- @s2, @l2, @d2, @c2,
- @s3, @l3, @d3, @c3,
- @s4, @l4, @d4, @c4,
- @s5, @l5, @d5, @c5,
- @s6, @l6, @d6, @c6,
- @s7, @l7, @d7, @c7,
- @s8, @l8, @d8, @c8,
- @s9, @l9, @d9, @c9,
- @s10, @l10, @d10, @c10,
- @s11, @l11, @d11, @c11,
- @s12, @l12, @d12, @c12,
- @s13, @l13, @d13, @c13,
- @s14, @l14, @d14, @c14,
- @s15, @l15, @d15, @c15,
- @s16, @l16, @d16, @c16,
- @s17, @l17, @d17, @c17,
- @s18, @l18, @d18, @c18,
- @s19, @l19, @d19, @c19,
- @s20, @l20, @d20, @c20,
- @s21, @l21, @d21, @c21,
- @s22, @l22, @d22, @c22,
- @s23, @l23, @d23, @c23,
- @s24, @l24, @d24, @c24,
- @s25, @l25, @d25, @c25,
- @s26, @l26, @d26, @c26,
- @s27, @l27, @d27, @c27,
- @s28, @l28, @d28, @c28,
- @s29, @l29, @d29, @c29,
- @s30, @l30, @d30, @c30,
- @s31, @l31, @d31, @c31,
- @s32, @l32, @d32, @c32,
- @s33, @l33, @d33, @c33,
- @s34, @l34, @d34, @c34,
- @s35, @l35, @d35, @c35,
- @s36, @l36, @d36, @c36,
- @s37, @l37, @d37, @c37,
- @s38, @l38, @d38, @c38,
- @s39, @l39, @d39, @c39,
- @s40, @l40, @d40, @c40 )
- END
- GO
- ALTER TABLE [dbo].[quest] ADD
- [q17] [INT] NOT NULL CONSTRAINT [DF_Quest_q17] DEFAULT ((0)),
- [s17] [INT] NOT NULL CONSTRAINT [DF_Quest_s17] DEFAULT ((0)),
- [q18] [INT] NOT NULL CONSTRAINT [DF_Quest_q18] DEFAULT ((0)),
- [s18] [INT] NOT NULL CONSTRAINT [DF_Quest_s18] DEFAULT ((0)),
- [q19] [INT] NOT NULL CONSTRAINT [DF_Quest_q19] DEFAULT ((0)),
- [s19] [INT] NOT NULL CONSTRAINT [DF_Quest_s19] DEFAULT ((0)),
- [q20] [INT] NOT NULL CONSTRAINT [DF_Quest_q20] DEFAULT ((0)),
- [s20] [INT] NOT NULL CONSTRAINT [DF_Quest_s20] DEFAULT ((0)),
- [q21] [INT] NOT NULL CONSTRAINT [DF_Quest_q21] DEFAULT ((0)),
- [s21] [INT] NOT NULL CONSTRAINT [DF_Quest_s21] DEFAULT ((0)),
- [q22] [INT] NOT NULL CONSTRAINT [DF_Quest_q22] DEFAULT ((0)),
- [s22] [INT] NOT NULL CONSTRAINT [DF_Quest_s22] DEFAULT ((0)),
- [q23] [INT] NOT NULL CONSTRAINT [DF_Quest_q23] DEFAULT ((0)),
- [s23] [INT] NOT NULL CONSTRAINT [DF_Quest_s23] DEFAULT ((0)),
- [q24] [INT] NOT NULL CONSTRAINT [DF_Quest_q24] DEFAULT ((0)),
- [s24] [INT] NOT NULL CONSTRAINT [DF_Quest_s24] DEFAULT ((0)),
- [q25] [INT] NOT NULL CONSTRAINT [DF_Quest_q25] DEFAULT ((0)),
- [s25] [INT] NOT NULL CONSTRAINT [DF_Quest_s25] DEFAULT ((0)),
- [q26] [INT] NOT NULL CONSTRAINT [DF_Quest_q26] DEFAULT ((0)),
- [s26] [INT] NOT NULL CONSTRAINT [DF_Quest_s26] DEFAULT ((0)),
- [j17] [INT] NOT NULL CONSTRAINT [DF_Quest_j17] DEFAULT ((0)),
- [j18] [INT] NOT NULL CONSTRAINT [DF_Quest_j18] DEFAULT ((0)),
- [j19] [INT] NOT NULL CONSTRAINT [DF_Quest_j19] DEFAULT ((0)),
- [j20] [INT] NOT NULL CONSTRAINT [DF_Quest_j20] DEFAULT ((0)),
- [j21] [INT] NOT NULL CONSTRAINT [DF_Quest_j21] DEFAULT ((0)),
- [j22] [INT] NOT NULL CONSTRAINT [DF_Quest_j22] DEFAULT ((0)),
- [j23] [INT] NOT NULL CONSTRAINT [DF_Quest_j23] DEFAULT ((0)),
- [j24] [INT] NOT NULL CONSTRAINT [DF_Quest_j24] DEFAULT ((0)),
- [j25] [INT] NOT NULL CONSTRAINT [DF_Quest_j25] DEFAULT ((0)),
- [j26] [INT] NOT NULL CONSTRAINT [DF_Quest_j26] DEFAULT ((0)),
- [s2_17] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_17] DEFAULT ((0)),
- [s2_18] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_18] DEFAULT ((0)),
- [s2_19] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_19] DEFAULT ((0)),
- [s2_20] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_20] DEFAULT ((0)),
- [s2_21] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_21] DEFAULT ((0)),
- [s2_22] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_22] DEFAULT ((0)),
- [s2_23] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_23] DEFAULT ((0)),
- [s2_24] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_24] DEFAULT ((0)),
- [s2_25] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_25] DEFAULT ((0)),
- [s2_26] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_26] DEFAULT ((0))
- GO
- IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_LoadQuest'))
- DROP proc [lin_LoadQuest]
- GO
- /********************************************
- lin_LoadQuest
- INPUT
- @char_id int
- OUTPUT
- return
- made by
- carrot
- kuroi - extended number of quests to 25
- date
- 2002-06-09
- ********************************************/
- CREATE PROCEDURE [dbo].[lin_LoadQuest]
- (
- @char_id INT
- )
- AS
- SET NOCOUNT ON
- SELECT TOP 1
- q1, s1, s2_1, j1,
- q2, s2, s2_2, j2,
- q3, s3, s2_3, j3,
- q4, s4, s2_4, j4,
- q5, s5, s2_5, j5,
- q6, s6, s2_6, j6,
- q7, s7, s2_7, j7,
- q8, s8, s2_8, j8,
- q9, s9, s2_9, j9,
- q10, s10, s2_10, j10,
- q11, s11, s2_11, j11,
- q12, s12, s2_12, j12,
- q13, s13, s2_13, j13,
- q14, s14, s2_14, j14,
- q15, s15, s2_15, j15,
- q16, s16, s2_16, j16,
- q17, s17, s2_17, j17,
- q18, s18, s2_18, j18,
- q19, s19, s2_19, j19,
- q20, s20, s2_20, j20,
- q21, s21, s2_21, j21,
- q22, s22, s2_22, j22,
- q23, s23, s2_23, j23,
- q24, s24, s2_24, j24,
- q25, s25, s2_25, j25,
- q26, s26, s2_26, j26
- FROM quest (nolock)
- WHERE char_id = @char_id
- GO
- IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_SetQuest'))
- DROP proc [lin_SetQuest]
- GO
- /********************************************
- lin_SetQuest
- OUTPUT
- return
- made by
- carrot
- date
- 2002-06-09
- ********************************************/
- CREATE PROCEDURE [dbo].[lin_SetQuest]
- (
- @q1 INT,
- @s1 INT,
- @s2_1 INT,
- @j1 INT,
- @q2 INT,
- @s2 INT,
- @s2_2 INT,
- @j2 INT,
- @q3 INT,
- @s3 INT,
- @s2_3 INT,
- @j3 INT,
- @q4 INT,
- @s4 INT,
- @s2_4 INT,
- @j4 INT,
- @q5 INT,
- @s5 INT,
- @s2_5 INT,
- @j5 INT,
- @q6 INT,
- @s6 INT,
- @s2_6 INT,
- @j6 INT,
- @q7 INT,
- @s7 INT,
- @s2_7 INT,
- @j7 INT,
- @q8 INT,
- @s8 INT,
- @s2_8 INT,
- @j8 INT,
- @q9 INT,
- @s9 INT,
- @s2_9 INT,
- @j9 INT,
- @q10 INT,
- @s10 INT,
- @s2_10 INT,
- @j10 INT,
- @q11 INT,
- @s11 INT,
- @s2_11 INT,
- @j11 INT,
- @q12 INT,
- @s12 INT,
- @s2_12 INT,
- @j12 INT,
- @q13 INT,
- @s13 INT,
- @s2_13 INT,
- @j13 INT,
- @q14 INT,
- @s14 INT,
- @s2_14 INT,
- @j14 INT,
- @q15 INT,
- @s15 INT,
- @s2_15 INT,
- @j15 INT,
- @q16 INT,
- @s16 INT,
- @s2_16 INT,
- @j16 INT,
- @q17 INT,
- @s17 INT,
- @s2_17 INT,
- @j17 INT,
- @q18 INT,
- @s18 INT,
- @s2_18 INT,
- @j18 INT,
- @q19 INT,
- @s19 INT,
- @s2_19 INT,
- @j19 INT,
- @q20 INT,
- @s20 INT,
- @s2_20 INT,
- @j20 INT,
- @q21 INT,
- @s21 INT,
- @s2_21 INT,
- @j21 INT,
- @q22 INT,
- @s22 INT,
- @s2_22 INT,
- @j22 INT,
- @q23 INT,
- @s23 INT,
- @s2_23 INT,
- @j23 INT,
- @q24 INT,
- @s24 INT,
- @s2_24 INT,
- @j24 INT,
- @q25 INT,
- @s25 INT,
- @s2_25 INT,
- @j25 INT,
- @q26 INT,
- @s26 INT,
- @s2_26 INT,
- @j26 INT,
- @char_id INT
- )
- AS
- SET NOCOUNT ON
- UPDATE quest
- SET
- q1=@q1, s1=@s1, s2_1=@s2_1, j1=@j1,
- q2=@q2, s2=@s2, s2_2=@s2_2, j2=@j2,
- q3=@q3, s3=@s3, s2_3=@s2_3, j3=@j3,
- q4=@q4, s4=@s4, s2_4=@s2_4, j4=@j4,
- q5=@q5, s5=@s5, s2_5=@s2_5, j5=@j5,
- q6=@q6, s6=@s6, s2_6=@s2_6, j6=@j6,
- q7=@q7, s7=@s7, s2_7=@s2_7, j7=@j7,
- q8=@q8, s8=@s8, s2_8=@s2_8, j8=@j8,
- q9=@q9, s9=@s9, s2_9=@s2_9, j9=@j9,
- q10=@q10, s10=@s10, s2_10=@s2_10, j10=@j10,
- q11=@q11, s11=@s11, s2_11=@s2_11, j11=@j11,
- q12=@q12, s12=@s12, s2_12=@s2_12, j12=@j12,
- q13=@q13, s13=@s13, s2_13=@s2_13, j13=@j13,
- q14=@q14, s14=@s14, s2_14=@s2_14, j14=@j14,
- q15=@q15, s15=@s15, s2_15=@s2_15, j15=@j15,
- q16=@q16, s16=@s16, s2_16=@s2_16, j16=@j16,
- q17=@q17, s17=@s17, s2_17=@s2_17, j17=@j17,
- q18=@q18, s18=@s18, s2_18=@s2_18, j18=@j18,
- q19=@q19, s19=@s19, s2_19=@s2_19, j19=@j19,
- q20=@q20, s20=@s20, s2_20=@s2_20, j20=@j20,
- q21=@q21, s21=@s21, s2_21=@s2_21, j21=@j21,
- q22=@q22, s22=@s22, s2_22=@s2_22, j22=@j22,
- q23=@q23, s23=@s23, s2_23=@s2_23, j23=@j23,
- q24=@q24, s24=@s24, s2_24=@s2_24, j24=@j24,
- q25=@q25, s25=@s25, s2_25=@s2_25, j25=@j25,
- q26=@q26, s26=@s26, s2_26=@s2_26, j26=@j26
- WHERE char_id = @char_id
- GO
- IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_UpdateJournal'))
- DROP proc [lin_UpdateJournal]
- GO
- CREATE PROCEDURE
- [dbo].[lin_UpdateJournal] ( @id INT,
- @j1 INT, @j2 INT, @j3 INT, @j4 INT, @j5 INT, @j6 INT, @j7 INT, @j8 INT,
- @j9 INT, @j10 INT, @j11 INT, @j12 INT, @j13 INT, @j14 INT, @j15 INT, @j16 INT,
- @j17 INT, @j18 INT, @j19 INT, @j20 INT, @j21 INT, @j22 INT, @j23 INT, @j24 INT, @j25 INT, @j26 INT
- )
- AS
- UPDATE Quest
- SET
- j1 = @j1,
- j2 = @j2,
- j3 = @j3,
- j4 = @j4,
- j5 = @j5,
- j6 = @j6,
- j7 = @j7,
- j8 = @j8,
- j9 = @j9,
- j10 = @j10,
- j11 = @j11,
- j12 = @j12,
- j13 = @j13,
- j14 = @j14,
- j15 = @j15,
- j16 = @j16,
- j17 = @j17,
- j18 = @j18,
- j19 = @j19,
- j20 = @j20,
- j21 = @j21,
- j22 = @j22,
- j23 = @j23,
- j24 = @j24,
- j25 = @j25,
- j26 = @j26
- WHERE char_id = @id
- GO
- USE [lin2world]
- GO
- ALTER TABLE dbo.user_data ADD
- augmentation INT NOT NULL DEFAULT 0
- GO
- USE [lin2world]
- GO
- ALTER TABLE dbo.user_item ADD
- augmentation INT NOT NULL DEFAULT 0
- GO
- USE lin2world
- GO
- ALTER TABLE dbo.Pledge ADD
- delegate_clid INT NULL DEFAULT 0
- USE [lin2world]
- GO
- /****** Object: Table [dbo].[pledge_ext] Script Date: 01/21/2008 03:50:36 ******/
- /****** Made by [email protected] to support C5Ext.dll ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[pledge_ext](
- [pledge_id] [INT] NOT NULL,
- [reputation_points] [INT] NOT NULL,
- [Rank1] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank2] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank3] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank4] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank5] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank6] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank7] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank8] [BIGINT] NOT NULL DEFAULT ((0)),
- [Rank9] [BIGINT] NOT NULL DEFAULT ((0)),
- [Skill0] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill1] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill2] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill3] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill4] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill5] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill6] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill7] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill8] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill9] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill10] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill11] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill12] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill13] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill14] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill15] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill16] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill17] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill18] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill19] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill20] [tinyint] NOT NULL DEFAULT ((0)),
- [Skill21] [tinyint] NOT NULL DEFAULT ((0)),
- CONSTRAINT [PK_pledge_ext] PRIMARY KEY CLUSTERED
- (
- [pledge_id] ASC
- )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- USE [lin2world]
- GO
- /****** Object: Table [dbo].[pledge_ext] Script Date: 01/21/2008 03:50:36 ******/
- /****** Made by [email protected] to support C5Ext.dll ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE dbo.pledge_subpledge
- (
- pledge_id INT NOT NULL,
- pledge_type INT NOT NULL,
- sub_name nvarchar(50) NOT NULL DEFAULT N'',
- leader_name nvarchar(50) NOT NULL DEFAULT N'',
- leader_dbid INT NOT NULL DEFAULT ((0))
- ) ON [PRIMARY]
- GO
- CREATE TABLE dbo.SiegeStat
- (
- char_id INT NOT NULL,
- pledge_id INT NOT NULL,
- castle_id INT NOT NULL,
- kill_count INT NULL,
- death_count INT NULL,
- damage_taken INT NULL,
- damage_dealt INT NULL
- )
- GO
- USE [lin2world]
- GO
- /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
- ALTER TABLE dbo.user_data ADD
- [Rank] tinyint NOT NULL DEFAULT 6,
- PledgeType INT NOT NULL DEFAULT 0,
- sponsor_id INT NOT NULL DEFAULT 0,
- JoinPledgeLevel INT NOT NULL DEFAULT 0
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- CREATE PROCEDURE lin_AddMemberStat
- -- Add the parameters for the stored procedure here
- @castle_id AS INT,
- @pledge_id AS INT,
- @char_id AS INT,
- @kill_count AS INT,
- @death_count AS INT,
- @damage_dealt AS INT,
- @damage_taken AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- INSERT INTO SiegeStat (castle_id, pledge_id, char_id, kill_count, death_count, damage_dealt, damage_taken)
- VALUES(@castle_id, @pledge_id, @char_id, @kill_count, @death_count, @damage_dealt, @damage_taken)
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestAddPledgeExt
- -- =============================================
- CREATE PROCEDURE lin_AddPledgeExt
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- -- Insert statements for procedure here
- INSERT INTO [lin2world].[dbo].[pledge_ext] ([pledge_id] ,[reputation_points],[Rank1],[Rank2],[Rank3],[Rank4],[Rank5],[Rank6],[Rank7],[Rank8],[Rank9],[Skill0],[Skill1],[Skill2],[Skill3],[Skill4],[Skill5],[Skill6],[Skill7],[Skill8],[Skill9],[Skill10],[Skill11],[Skill12],[Skill13],[Skill14],[Skill15],[Skill16],[Skill17],[Skill18],[Skill19],[Skill20],[Skill21])VALUES(@pledge_id,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- CREATE PROCEDURE lin_ClearPledgeStat
- -- Add the parameters for the stored procedure here
- @castle_id AS INT,
- @pledge_id AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- DELETE FROM SiegeStat WHERE castle_id = @castle_id AND pledge_id = @pledge_id
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestCreateSubPledge
- -- =============================================
- CREATE PROCEDURE lin_CreateSubPledge
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT,
- @pledge_type AS INT,
- @sub_name AS nvarchar(50)
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- IF(@pledge_id<>0)
- BEGIN
- IF(@pledge_type = -1)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- ELSE IF(@pledge_type = 100)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- ELSE IF(@pledge_type = 200)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- ELSE IF(@pledge_type = 1001)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- ELSE IF(@pledge_type = 1002)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- ELSE IF(@pledge_type = 2001)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- ELSE IF(@pledge_type = 2002)
- BEGIN
- INSERT INTO [lin2world].[dbo].[pledge_subpledge]
- ([pledge_id]
- ,[pledge_type]
- ,[sub_name]
- ,[leader_name]
- ,[leader_dbid])
- VALUES
- (@pledge_id
- ,@pledge_type
- ,@sub_name
- ,''
- ,0)
- END
- END
- END
- GO
- USE [lin2world]
- GO
- /****** Object: StoredProcedure [dbo].[lin_DelegateClanMaster] Script Date: 10/20/2009 20:05:01 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for Delegating clan masters
- -- =============================================
- CREATE PROCEDURE [dbo].[lin_DelegateClanMaster]
- @pledge_id AS INT
- AS
- SET NOCOUNT ON;
- DECLARE @delegate_clid INT;
- DECLARE @clan_id INT;
- SELECT @delegate_clid=delegate_clid FROM Pledge WHERE pledge_id = @pledge_id
- IF( @delegate_clid <> 0 )
- BEGIN
- SELECT @clan_id = pledge_id FROM user_data WHERE char_id = @delegate_clid
- IF( @clan_id = @pledge_id )
- BEGIN
- UPDATE Pledge SET ruler_id = @delegate_clid WHERE pledge_id = @pledge_id
- UPDATE Pledge SET delegate_clid = 0 WHERE pledge_id = @pledge_id
- END
- ELSE
- BEGIN
- UPDATE Pledge SET delegate_clid = 0 WHERE pledge_id = @pledge_id
- END
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestLearnClanSkill
- -- =============================================
- CREATE PROCEDURE lin_LearnClanSkill
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT,
- @clan_skill AS INT,
- @new_level AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- IF((@clan_skill >= 370 AND @clan_skill < 392) AND @new_level < 4)
- BEGIN
- IF(@clan_skill = 370)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill0]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 371)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill1]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 372)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill2]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 373)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill3]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 374)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill4]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 375)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill5]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 376)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill6]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 377)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill7]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 378)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill8]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 379)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill9]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 380)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill10]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 381)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill11]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 382)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill12]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 383)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill13]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 384)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill14]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 385)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill15]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 386)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill16]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 387)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill17]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 388)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill18]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 389)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill19]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 390)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill20]=@new_level WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@clan_skill = 391)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill21]=@new_level WHERE [pledge_id] = @pledge_id
- END
- END
- END
- GO
- USE lin2world
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestLoadPledgeExtendInfo
- -- =============================================
- CREATE PROCEDURE lin_LoadPledgeExtendInfo
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- -- Insert statements for procedure here
- SELECT [reputation_points]
- ,[Rank1]
- ,[Rank2]
- ,[Rank3]
- ,[Rank4]
- ,[Rank5]
- ,[Rank6]
- ,[Rank7]
- ,[Rank8]
- ,[Rank9]
- ,[Skill0]
- ,[Skill1]
- ,[Skill2]
- ,[Skill3]
- ,[Skill4]
- ,[Skill5]
- ,[Skill6]
- ,[Skill7]
- ,[Skill8]
- ,[Skill9]
- ,[Skill10]
- ,[Skill11]
- ,[Skill12]
- ,[Skill13]
- ,[Skill14]
- ,[Skill15]
- ,[Skill16]
- ,[Skill17]
- ,[Skill18]
- ,[Skill19]
- ,[Skill20]
- ,[Skill21]
- FROM [lin2world].[dbo].[pledge_ext] WHERE [pledge_id] = @pledge_id
- END
- GO
- USE lin2world
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestLoadPledgeExtendInfo
- -- =============================================
- CREATE PROCEDURE lin_LoadSubPledges
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- -- Insert statements for procedure here
- IF(@pledge_id <> 0)
- BEGIN
- SELECT TOP 7 pledge_type, sub_name, leader_name, leader_dbid FROM pledge_subpledge (nolock) WHERE pledge_id = @pledge_id AND pledge_type != 0
- END
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestRenameSubPledge
- -- =============================================
- CREATE PROCEDURE lin_RenameSubPledge
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT,
- @pledge_type AS INT,
- @sub_name AS nvarchar(50)
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- IF(@pledge_id<>0)
- BEGIN
- IF(@pledge_type = -1)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- ELSE IF(@pledge_type = 100)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- ELSE IF(@pledge_type = 200)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- ELSE IF(@pledge_type = 1001)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- ELSE IF(@pledge_type = 1002)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- ELSE IF(@pledge_type = 2001)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- ELSE IF(@pledge_type = 2002)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
- END
- END
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestReorganizeMember
- -- =============================================
- CREATE PROCEDURE lin_ReorganizePledgeMember
- -- Add the parameters for the stored procedure here
- @char_name AS nvarchar(50),
- @pledge_type AS INT,
- @pledge_id AS INT
- AS
- BEGIN
- SET NOCOUNT ON;
- UPDATE [lin2world].[dbo].[user_data] SET [PledgeType] = @pledge_type WHERE ([char_name] = @char_name AND [pledge_id] = @pledge_id)
- SELECT [char_id] FROM [lin2world].[dbo].[user_data] WHERE [char_name] = @char_name
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for Running Delegate clan master procedure for each pledge
- -- =============================================
- CREATE PROCEDURE lin_RunDelegateClanMaster
- AS
- SET NOCOUNT ON;
- DECLARE
- @pledge_id INT
- DECLARE CUR1 CURSOR FOR
- SELECT [pledge_id] FROM lin2world.dbo.Pledge WHERE [delegate_clid] > 0
- OPEN CUR1
- FETCH NEXT FROM CUR1
- INTO @pledge_id
- WHILE (@@FETCH_STATUS <> -1)
- BEGIN
- EXEC lin2world.dbo.[lin_DelegateClanMaster] @pledge_id
- FETCH NEXT FROM CUR1
- INTO @pledge_id
- END
- CLOSE CUR1
- DEALLOCATE CUR1
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestSetPledgePrivilege
- -- =============================================
- CREATE PROCEDURE lin_SetPledgePrivilege
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT,
- @rank AS INT,
- @privilege AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- IF(@rank > 0 AND @rank < 10)
- BEGIN
- IF(@rank = 1)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank1]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 2)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank2]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 3)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank3]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 4)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank4]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 5)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank5]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 6)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank6]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 7)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank7]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 8)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank8]=@privilege WHERE [pledge_id] = @pledge_id
- END
- ELSE IF(@rank = 9)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank9]=@privilege WHERE [pledge_id] = @pledge_id
- END
- END
- END
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- USE [lin2world]
- GO
- -- =============================================
- -- Author: Vanganth
- -- Create date:
- -- Description: Procedure for new func RequestSetSubCaptain
- -- =============================================
- CREATE PROCEDURE lin_SetSubCaptain
- -- Add the parameters for the stored procedure here
- @pledge_id AS INT,
- @pledge_type AS INT,
- @captain_name AS nvarchar(50),
- @captain_id AS INT
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- IF(@pledge_id<>0)
- BEGIN
- UPDATE [lin2world].[dbo].[pledge_subpledge] SET [leader_name]=@captain_name, [leader_dbid]=@captain_id WHERE ([pledge_id]=@pledge_id AND [pledge_type] = @pledge_type)
- END
- END
- GO
- USE lin2world
- GO
- ALTER TABLE dbo.user_item ADD
- mana_left INT NOT NULL DEFAULT 0
- GO
- USE lin2world
- GO
- ALTER TABLE user_data ADD
- effective_mana0 INT NOT NULL DEFAULT 0,
- effective_mana1 INT NOT NULL DEFAULT 0,
- effective_mana2 INT NOT NULL DEFAULT 0,
- effective_mana3 INT NOT NULL DEFAULT 0
- GO
- ALTER TABLE user_item
- ADD life_time INT NOT NULL DEFAULT 0
- GO
- CREATE TABLE NpcDeath
- (
- npc_class_id INT NOT NULL,
- death_time INT NOT NULL
- )
- GO
- ALTER TABLE user_data ADD
- vip_level INT NOT NULL DEFAULT 0,
- vip_timestamp INT NOT NULL DEFAULT 0
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement