Advertisement
Guest User

update

a guest
Mar 19th, 2013
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 53.97 KB | None | 0 0
  1. USE lin2world
  2. GO
  3.  
  4. ALTER  TABLE user_data ADD
  5.     aio_data INT NOT NULL DEFAULT 0
  6. GO
  7.  
  8. USE lin2world
  9. GO
  10.  
  11. IF EXISTS (SELECT 1
  12.     FROM INFORMATION_SCHEMA.TABLES
  13.     WHERE TABLE_NAME='BuffList')
  14.         DROP TABLE BuffList
  15.  
  16. GO
  17.  
  18. CREATE TABLE BuffList(
  19.     char_id INT NOT NULL,
  20.     summon INT NOT NULL DEFAULT 0,
  21.     subjob_idx INT NOT NULL DEFAULT 0,
  22.     b0 INT NOT NULL DEFAULT 0,
  23.     b1 INT NOT NULL DEFAULT 0,
  24.     b2 INT NOT NULL DEFAULT 0,
  25.     b3 INT NOT NULL DEFAULT 0,
  26.     b4 INT NOT NULL DEFAULT 0,
  27.     b5 INT NOT NULL DEFAULT 0,
  28.     b6 INT NOT NULL DEFAULT 0,
  29.     b7 INT NOT NULL DEFAULT 0,
  30.     b8 INT NOT NULL DEFAULT 0,
  31.     b9 INT NOT NULL DEFAULT 0,
  32.     b10 INT NOT NULL DEFAULT 0,
  33.     b11 INT NOT NULL DEFAULT 0,
  34.     b12 INT NOT NULL DEFAULT 0,
  35.     b13 INT NOT NULL DEFAULT 0,
  36.     b14 INT NOT NULL DEFAULT 0,
  37.     b15 INT NOT NULL DEFAULT 0,
  38.     b16 INT NOT NULL DEFAULT 0,
  39.     b17 INT NOT NULL DEFAULT 0,
  40.     b18 INT NOT NULL DEFAULT 0,
  41.     b19 INT NOT NULL DEFAULT 0,
  42.     b20 INT NOT NULL DEFAULT 0,
  43.     b21 INT NOT NULL DEFAULT 0,
  44.     b22 INT NOT NULL DEFAULT 0,
  45.     b23 INT NOT NULL DEFAULT 0,
  46.     b24 INT NOT NULL DEFAULT 0,
  47.     b25 INT NOT NULL DEFAULT 0,
  48.     b26 INT NOT NULL DEFAULT 0,
  49.     b27 INT NOT NULL DEFAULT 0,
  50.     b28 INT NOT NULL DEFAULT 0,
  51.     b29 INT NOT NULL DEFAULT 0,
  52.     b30 INT NOT NULL DEFAULT 0,
  53.     b31 INT NOT NULL DEFAULT 0,
  54.     b32 INT NOT NULL DEFAULT 0,
  55.     b33 INT NOT NULL DEFAULT 0,
  56.     b34 INT NOT NULL DEFAULT 0,
  57.     b35 INT NOT NULL DEFAULT 0,
  58.     b36 INT NOT NULL DEFAULT 0,
  59.     b37 INT NOT NULL DEFAULT 0,
  60.     b38 INT NOT NULL DEFAULT 0,
  61.     b39 INT NOT NULL DEFAULT 0
  62.     )
  63. GO
  64.  
  65. USE [lin2world]
  66. GO
  67.  
  68. USE lin2world
  69. GO
  70.  
  71. ALTER  TABLE user_data ADD
  72.     ST_hair_deco INT NOT NULL DEFAULT 0,
  73.     ST_hair_all INT NOT NULL DEFAULT 0
  74. GO
  75.  
  76. USE lin2world
  77. GO
  78.  
  79. IF EXISTS (SELECT 1
  80.     FROM sys.procedures
  81.     WHERE [name]='lin_AddKillDeathStat')
  82.         DROP PROCEDURE lin_AddKillDeathStat
  83. GO
  84.  
  85. IF EXISTS (SELECT 1
  86.     FROM INFORMATION_SCHEMA.TABLES
  87.     WHERE TABLE_NAME='KillDeathStat')
  88.         DROP TABLE KillDeathStat
  89. GO
  90.  
  91. CREATE TABLE KillDeathStat(
  92.     victim_id INT NOT NULL,
  93.     victim_class_id INT NOT NULL DEFAULT 0,
  94.     victim_level INT NOT NULL DEFAULT 0,
  95.     killer_id INT NOT NULL,
  96.     killer_class_id INT NOT NULL DEFAULT 0,
  97.     killer_level INT NOT NULL DEFAULT 0,
  98.     killer_hp INT NOT NULL DEFAULT 0,
  99.     killer_max_hp INT NOT NULL DEFAULT 0,
  100.     killer_cp INT NOT NULL DEFAULT 0,
  101.     killer_max_cp INT NOT NULL DEFAULT 0,
  102.     x INT NOT NULL DEFAULT 0,
  103.     y INT NOT NULL DEFAULT 0,
  104.     z INT NOT NULL DEFAULT 0,
  105.     pvp INT NOT NULL DEFAULT 0,
  106.     skill_id INT NOT NULL DEFAULT 0,
  107.     skill_level INT NOT NULL DEFAULT 0,
  108.     death_time INT NOT NULL DEFAULT 0
  109.     )
  110. GO
  111.  
  112. CREATE PROCEDURE lin_AddKillDeathStat
  113.     @victim_id AS INT,
  114.     @victim_class_id AS INT,
  115.     @victim_level AS INT,
  116.     @killer_id AS INT,
  117.     @killer_class_id AS INT,
  118.     @killer_level AS INT,
  119.     @killer_hp AS INT,
  120.     @killer_max_hp AS INT,
  121.     @killer_cp AS INT,
  122.     @killer_max_cp AS INT,
  123.     @x AS INT,
  124.     @y AS INT,
  125.     @z AS INT,
  126.     @pvp AS INT,
  127.     @skill_id AS INT,
  128.     @skill_level AS INT,
  129.     @death_time AS INT
  130. AS
  131. BEGIN
  132.  
  133.     SET NOCOUNT ON;
  134.  
  135.     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)
  136.     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 )
  137.  
  138. END
  139. GO
  140.  
  141. USE lin2world
  142. GO
  143.  
  144. CREATE TABLE PrivateStore(
  145.     char_id INT NOT NULL,
  146.     store_type INT NULL,
  147.     x_loc INT NULL,
  148.     y_loc INT NULL,
  149.     z_loc INT NULL,
  150.     is_offline INT NULL,
  151.     item1_id INT NULL,
  152.     item1_count INT NULL,
  153.     item1_price INT NULL,
  154.     item1_enchant INT NULL,
  155.     item2_id INT NULL,
  156.     item2_count INT NULL,
  157.     item2_price INT NULL,
  158.     item2_enchant INT NULL,
  159.     item3_id INT NULL,
  160.     item3_count INT NULL,
  161.     item3_price INT NULL,
  162.     item3_enchant INT NULL,
  163.     item4_id INT NULL,
  164.     item4_count INT NULL,
  165.     item4_price INT NULL,
  166.     item4_enchant INT NULL,
  167.     item5_id INT NULL,
  168.     item5_count INT NULL,
  169.     item5_price INT NULL,
  170.     item5_enchant INT NULL,
  171.     item6_id INT NULL,
  172.     item6_count INT NULL,
  173.     item6_price INT NULL,
  174.     item6_enchant INT NULL,
  175.     item7_id INT NULL,
  176.     item7_count INT NULL,
  177.     item7_price INT NULL,
  178.     item7_enchant INT NULL,
  179.     item8_id INT NULL,
  180.     item8_count INT NULL,
  181.     item8_price INT NULL,
  182.     item8_enchant INT NULL
  183.     )
  184. GO
  185.  
  186. USE [lin2world]
  187. GO
  188. CREATE PROCEDURE lin_UpdatePrivateStore
  189.     @char_id AS INT,
  190.     @store_type AS INT,
  191.     @x_loc AS INT,
  192.     @y_loc AS INT,
  193.     @z_loc AS INT,
  194.     @is_offline AS INT,
  195.     @item1_id AS INT,
  196.     @item1_count AS INT,
  197.     @item1_price AS INT,
  198.     @item1_enchant AS INT,
  199.     @item2_id AS INT,
  200.     @item2_count AS INT,
  201.     @item2_price AS INT,
  202.     @item2_enchant AS INT,
  203.     @item3_id AS INT,
  204.     @item3_count AS INT,
  205.     @item3_price AS INT,
  206.     @item3_enchant AS INT,
  207.     @item4_id AS INT,
  208.     @item4_count AS INT,
  209.     @item4_price AS INT,
  210.     @item4_enchant AS INT,
  211.     @item5_id AS INT,
  212.     @item5_count AS INT,
  213.     @item5_price AS INT,
  214.     @item5_enchant AS INT,
  215.     @item6_id AS INT,
  216.     @item6_count AS INT,
  217.     @item6_price AS INT,
  218.     @item6_enchant AS INT,
  219.     @item7_id AS INT,
  220.     @item7_count AS INT,
  221.     @item7_price AS INT,
  222.     @item7_enchant AS INT,
  223.     @item8_id AS INT,
  224.     @item8_count AS INT,
  225.     @item8_price AS INT,
  226.     @item8_enchant AS INT
  227.  
  228. AS
  229. BEGIN
  230.  
  231.     SET NOCOUNT ON;
  232.  
  233.     UPDATE PrivateStore SET store_type=@store_type, x_loc=@x_loc, y_loc=@y_loc, z_loc=@z_loc, is_offline = @is_offline,
  234.     @item1_id=@item1_id, item1_count=@item1_count, item1_price=@item1_price, item1_enchant=@item1_enchant,
  235.     @item2_id=@item2_id, item2_count=@item2_count, item2_price=@item2_price, item2_enchant=@item2_enchant,
  236.     @item3_id=@item3_id, item3_count=@item3_count, item3_price=@item3_price, item3_enchant=@item3_enchant,
  237.     @item4_id=@item4_id, item4_count=@item4_count, item4_price=@item4_price, item4_enchant=@item4_enchant,
  238.     @item5_id=@item5_id, item5_count=@item5_count, item5_price=@item5_price, item5_enchant=@item5_enchant,
  239.     @item6_id=@item6_id, item6_count=@item6_count, item6_price=@item6_price, item6_enchant=@item6_enchant,
  240.     @item7_id=@item7_id, item7_count=@item7_count, item7_price=@item7_price, item7_enchant=@item7_enchant,
  241.     @item8_id=@item8_id, item8_count=@item8_count, item8_price=@item8_price, item8_enchant=@item8_enchant WHERE char_id = @char_id
  242.    
  243.    
  244.  
  245. END
  246. GO
  247.  
  248. SET ANSI_NULLS ON
  249. GO
  250. SET QUOTED_IDENTIFIER ON
  251. GO
  252. USE [lin2world]
  253. GO
  254. CREATE PROCEDURE lin_DeletePrivateStore
  255.     @char_id AS INT
  256. AS
  257. BEGIN
  258.  
  259.     SET NOCOUNT ON;
  260.  
  261.     DELETE FROM PrivateStore WHERE char_id = @char_id
  262.  
  263. END
  264. GO
  265.  
  266. SET ANSI_NULLS ON
  267. GO
  268. SET QUOTED_IDENTIFIER ON
  269. GO
  270. USE [lin2world]
  271. GO
  272. CREATE PROCEDURE lin_CreatePrivateStore
  273.     @char_id AS INT,
  274.     @store_type AS INT,
  275.     @x_loc AS INT,
  276.     @y_loc AS INT,
  277.     @z_loc AS INT,
  278.     @is_offline AS INT,
  279.     @item1_id AS INT,
  280.     @item1_count AS INT,
  281.     @item1_price AS INT,
  282.     @item1_enchant AS INT,
  283.     @item2_id AS INT,
  284.     @item2_count AS INT,
  285.     @item2_price AS INT,
  286.     @item2_enchant AS INT,
  287.     @item3_id AS INT,
  288.     @item3_count AS INT,
  289.     @item3_price AS INT,
  290.     @item3_enchant AS INT,
  291.     @item4_id AS INT,
  292.     @item4_count AS INT,
  293.     @item4_price AS INT,
  294.     @item4_enchant AS INT,
  295.     @item5_id AS INT,
  296.     @item5_count AS INT,
  297.     @item5_price AS INT,
  298.     @item5_enchant AS INT,
  299.     @item6_id AS INT,
  300.     @item6_count AS INT,
  301.     @item6_price AS INT,
  302.     @item6_enchant AS INT,
  303.     @item7_id AS INT,
  304.     @item7_count AS INT,
  305.     @item7_price AS INT,
  306.     @item7_enchant AS INT,
  307.     @item8_id AS INT,
  308.     @item8_count AS INT,
  309.     @item8_price AS INT,
  310.     @item8_enchant AS INT
  311. AS
  312. BEGIN
  313.  
  314.     SET NOCOUNT ON;
  315.  
  316.     INSERT INTO PrivateStore( char_id, store_type, x_loc, y_loc, z_loc, is_offline,
  317.     item1_id, item1_count, item1_price, item1_enchant,
  318.     item2_id, item2_count, item2_price, item2_enchant,
  319.     item3_id, item3_count, item3_price, item3_enchant,
  320.     item4_id, item4_count, item4_price, item4_enchant,
  321.     item5_id, item5_count, item5_price, item5_enchant,
  322.     item6_id, item6_count, item6_price, item6_enchant,
  323.     item7_id, item7_count, item7_price, item7_enchant,
  324.     item8_id, item8_count, item8_price, item8_enchant )
  325.     VALUES ( @char_id, @store_type, @x_loc, @y_loc, @z_loc, @is_offline,
  326.     @item1_id, @item1_count, @item1_price, @item1_enchant,
  327.     @item2_id, @item2_count, @item2_price, @item2_enchant,
  328.     @item3_id, @item3_count, @item3_price, @item3_enchant,
  329.     @item4_id, @item4_count, @item4_price, @item4_enchant,
  330.     @item5_id, @item5_count, @item5_price, @item5_enchant,
  331.     @item6_id, @item6_count, @item6_price, @item6_enchant,
  332.     @item7_id, @item7_count, @item7_price, @item7_enchant,
  333.     @item8_id, @item8_count, @item8_price, @item8_enchant )
  334.  
  335. END
  336. GO
  337.  
  338. USE [lin2world]
  339. GO
  340.  
  341. ALTER TABLE dbo.user_data ADD
  342.     spirit_count INT NOT NULL DEFAULT 0
  343. GO
  344.  
  345. USE [LIN2WORLD]
  346. GO
  347. /****** Object:  Table [dbo].[user_ActiveSkill]    Script Date: 02/01/2009 23:21:34 ******/
  348. SET ANSI_NULLS ON
  349. GO
  350. SET QUOTED_IDENTIFIER ON
  351. GO
  352. DROP TABLE [dbo].[user_ActiveSkill]
  353. GO
  354. CREATE TABLE [dbo].[user_ActiveSkill](
  355.     [char_id] [INT] NOT NULL,
  356.     [s1] [INT] NULL,
  357.     [l1] [tinyint] NULL,
  358.     [d1] [INT] NULL,
  359.     [s2] [INT] NULL,
  360.     [l2] [tinyint] NULL,
  361.     [d2] [INT] NULL,
  362.     [s3] [INT] NULL,
  363.     [l3] [tinyint] NULL,
  364.     [d3] [INT] NULL,
  365.     [s4] [INT] NULL,
  366.     [l4] [tinyint] NULL,
  367.     [d4] [INT] NULL,
  368.     [s5] [INT] NULL,
  369.     [l5] [tinyint] NULL,
  370.     [d5] [INT] NULL,
  371.     [s6] [INT] NULL,
  372.     [l6] [tinyint] NULL,
  373.     [d6] [INT] NULL,
  374.     [s7] [INT] NULL,
  375.     [l7] [tinyint] NULL,
  376.     [d7] [INT] NULL,
  377.     [s8] [INT] NULL,
  378.     [l8] [tinyint] NULL,
  379.     [d8] [INT] NULL,
  380.     [s9] [INT] NULL,
  381.     [l9] [tinyint] NULL,
  382.     [d9] [INT] NULL,
  383.     [s10] [INT] NULL,
  384.     [l10] [tinyint] NULL,
  385.     [d10] [INT] NULL,
  386.     [s11] [INT] NULL,
  387.     [l11] [tinyint] NULL,
  388.     [d11] [INT] NULL,
  389.     [s12] [INT] NULL,
  390.     [l12] [tinyint] NULL,
  391.     [d12] [INT] NULL,
  392.     [s13] [INT] NULL,
  393.     [l13] [tinyint] NULL,
  394.     [d13] [INT] NULL,
  395.     [s14] [INT] NULL,
  396.     [l14] [tinyint] NULL,
  397.     [d14] [INT] NULL,
  398.     [s15] [INT] NULL,
  399.     [l15] [tinyint] NULL,
  400.     [d15] [INT] NULL,
  401.     [s16] [INT] NULL,
  402.     [l16] [tinyint] NULL,
  403.     [d16] [INT] NULL,
  404.     [s17] [INT] NULL,
  405.     [l17] [tinyint] NULL,
  406.     [d17] [INT] NULL,
  407.     [s18] [INT] NULL,
  408.     [l18] [tinyint] NULL,
  409.     [d18] [INT] NULL,
  410.     [s19] [INT] NULL,
  411.     [l19] [tinyint] NULL,
  412.     [d19] [INT] NULL,
  413.     [s20] [INT] NULL,
  414.     [l20] [tinyint] NULL,
  415.     [d20] [INT] NULL,
  416.     [s21] [INT] NULL,
  417.     [l21] [tinyint] NULL,
  418.     [d21] [INT] NULL,
  419.     [s22] [INT] NULL,
  420.     [l22] [tinyint] NULL,
  421.     [d22] [INT] NULL,
  422.     [s23] [INT] NULL,
  423.     [l23] [tinyint] NULL,
  424.     [d23] [INT] NULL,
  425.     [s24] [INT] NULL,
  426.     [l24] [tinyint] NULL,
  427.     [d24] [INT] NULL,
  428.     [s25] [INT] NULL,
  429.     [l25] [tinyint] NULL,
  430.     [d25] [INT] NULL,
  431.     [s26] [INT] NULL,
  432.     [l26] [tinyint] NULL,
  433.     [d26] [INT] NULL,
  434.     [s27] [INT] NULL,
  435.     [l27] [tinyint] NULL,
  436.     [d27] [INT] NULL,
  437.     [s28] [INT] NULL,
  438.     [l28] [tinyint] NULL,
  439.     [d28] [INT] NULL,
  440.     [s29] [INT] NULL,
  441.     [l29] [tinyint] NULL,
  442.     [d29] [INT] NULL,
  443.     [s30] [INT] NULL,
  444.     [l30] [tinyint] NULL,
  445.     [d30] [INT] NULL,
  446.     [s31] [INT] NULL,
  447.     [l31] [tinyint] NULL,
  448.     [d31] [INT] NULL,
  449.     [s32] [INT] NULL,
  450.     [l32] [tinyint] NULL,
  451.     [d32] [INT] NULL,
  452.     [s33] [INT] NULL,
  453.     [l33] [tinyint] NULL,
  454.     [d33] [INT] NULL,
  455.     [s34] [INT] NULL,
  456.     [l34] [tinyint] NULL,
  457.     [d34] [INT] NULL,
  458.     [s35] [INT] NULL,
  459.     [l35] [tinyint] NULL,
  460.     [d35] [INT] NULL,
  461.     [s36] [INT] NULL,
  462.     [l36] [tinyint] NULL,
  463.     [d36] [INT] NULL,
  464.     [s37] [INT] NULL,
  465.     [l37] [tinyint] NULL,
  466.     [d37] [INT] NULL,
  467.     [s38] [INT] NULL,
  468.     [l38] [tinyint] NULL,
  469.     [d38] [INT] NULL,
  470.     [s39] [INT] NULL,
  471.     [l39] [tinyint] NULL,
  472.     [d39] [INT] NULL,
  473.     [s40] [INT] NULL,
  474.     [l40] [tinyint] NULL,
  475.     [d40] [INT] NULL,
  476.     [c1] [tinyint] NULL,
  477.     [c2] [tinyint] NULL,
  478.     [c3] [tinyint] NULL,
  479.     [c4] [tinyint] NULL,
  480.     [c5] [tinyint] NULL,
  481.     [c6] [tinyint] NULL,
  482.     [c7] [tinyint] NULL,
  483.     [c8] [tinyint] NULL,
  484.     [c9] [tinyint] NULL,
  485.     [c10] [tinyint] NULL,
  486.     [c11] [tinyint] NULL,
  487.     [c12] [tinyint] NULL,
  488.     [c13] [tinyint] NULL,
  489.     [c14] [tinyint] NULL,
  490.     [c15] [tinyint] NULL,
  491.     [c16] [tinyint] NULL,
  492.     [c17] [tinyint] NULL,
  493.     [c18] [tinyint] NULL,
  494.     [c19] [tinyint] NULL,
  495.     [c20] [tinyint] NULL,
  496.     [c21] [tinyint] NULL,
  497.     [c22] [tinyint] NULL,
  498.     [c23] [tinyint] NULL,
  499.     [c24] [tinyint] NULL,
  500.     [c25] [tinyint] NULL,
  501.     [c26] [tinyint] NULL,
  502.     [c27] [tinyint] NULL,
  503.     [c28] [tinyint] NULL,
  504.     [c29] [tinyint] NULL,
  505.     [c30] [tinyint] NULL,
  506.     [c31] [tinyint] NULL,
  507.     [c32] [tinyint] NULL,
  508.     [c33] [tinyint] NULL,
  509.     [c34] [tinyint] NULL,
  510.     [c35] [tinyint] NULL,
  511.     [c36] [tinyint] NULL,
  512.     [c37] [tinyint] NULL,
  513.     [c38] [tinyint] NULL,
  514.     [c39] [tinyint] NULL,
  515.     [c40] [tinyint] NULL
  516. ) ON [PRIMARY]
  517.  
  518. GO
  519.  
  520. USE [lin2world]
  521. GO
  522. DROP PROCEDURE lin_CreateActiveSkill
  523. GO
  524.  
  525. CREATE PROCEDURE [dbo].[lin_CreateActiveSkill]
  526. (
  527.  @char_id INT,
  528.  @s1 INT, @l1 TINYINT, @d1 INT, @c1 TINYINT,
  529.  @s2 INT, @l2 TINYINT, @d2 INT, @c2 TINYINT,
  530.  @s3 INT, @l3 TINYINT, @d3 INT, @c3 TINYINT,
  531.  @s4 INT, @l4 TINYINT, @d4 INT, @c4 TINYINT,
  532.  @s5 INT, @l5 TINYINT, @d5 INT, @c5 TINYINT,
  533.  @s6 INT, @l6 TINYINT, @d6 INT, @c6 TINYINT,
  534.  @s7 INT, @l7 TINYINT, @d7 INT, @c7 TINYINT,
  535.  @s8 INT, @l8 TINYINT, @d8 INT, @c8 TINYINT,
  536.  @s9 INT, @l9 TINYINT, @d9 INT, @c9 TINYINT,
  537.  @s10 INT, @l10 TINYINT, @d10 INT, @c10 TINYINT,
  538.  @s11 INT, @l11 TINYINT, @d11 INT, @c11 TINYINT,
  539.  @s12 INT, @l12 TINYINT, @d12 INT, @c12 TINYINT,
  540.  @s13 INT, @l13 TINYINT, @d13 INT, @c13 TINYINT,
  541.  @s14 INT, @l14 TINYINT, @d14 INT, @c14 TINYINT,
  542.  @s15 INT, @l15 TINYINT, @d15 INT, @c15 TINYINT,
  543.  @s16 INT, @l16 TINYINT, @d16 INT, @c16 TINYINT,
  544.  @s17 INT, @l17 TINYINT, @d17 INT, @c17 TINYINT,
  545.  @s18 INT, @l18 TINYINT, @d18 INT, @c18 TINYINT,
  546.  @s19 INT, @l19 TINYINT, @d19 INT, @c19 TINYINT,
  547.  @s20 INT, @l20 TINYINT, @d20 INT, @c20 TINYINT,
  548.  @s21 INT, @l21 TINYINT, @d21 INT, @c21 TINYINT,
  549.  @s22 INT, @l22 TINYINT, @d22 INT, @c22 TINYINT,
  550.  @s23 INT, @l23 TINYINT, @d23 INT, @c23 TINYINT,
  551.  @s24 INT, @l24 TINYINT, @d24 INT, @c24 TINYINT,
  552.  @s25 INT, @l25 TINYINT, @d25 INT, @c25 TINYINT,
  553.  @s26 INT, @l26 TINYINT, @d26 INT, @c26 TINYINT,
  554.  @s27 INT, @l27 TINYINT, @d27 INT, @c27 TINYINT,
  555.  @s28 INT, @l28 TINYINT, @d28 INT, @c28 TINYINT,
  556.  @s29 INT, @l29 TINYINT, @d29 INT, @c29 TINYINT,
  557.  @s30 INT, @l30 TINYINT, @d30 INT, @c30 TINYINT,
  558.  @s31 INT, @l31 TINYINT, @d31 INT, @c31 TINYINT,
  559.  @s32 INT, @l32 TINYINT, @d32 INT, @c32 TINYINT,
  560.  @s33 INT, @l33 TINYINT, @d33 INT, @c33 TINYINT,
  561.  @s34 INT, @l34 TINYINT, @d34 INT, @c34 TINYINT,
  562.  @s35 INT, @l35 TINYINT, @d35 INT, @c35 TINYINT,
  563.  @s36 INT, @l36 TINYINT, @d36 INT, @c36 TINYINT,
  564.  @s37 INT, @l37 TINYINT, @d37 INT, @c37 TINYINT,
  565.  @s38 INT, @l38 TINYINT, @d38 INT, @c38 TINYINT,
  566.  @s39 INT, @l39 TINYINT, @d39 INT, @c39 TINYINT,
  567.  @s40 INT, @l40 TINYINT, @d40 INT, @c40 TINYINT
  568. )
  569. AS
  570. SET NOCOUNT ON
  571.  
  572.  INSERT INTO user_activeskill
  573.  (char_id,
  574.  s1, l1, d1, c1,
  575.  s2, l2, d2, c2,
  576.  s3, l3, d3, c3,
  577.  s4, l4, d4, c4,
  578.  s5, l5, d5, c5,
  579.  s6, l6, d6, c6,
  580.  s7, l7, d7, c7,
  581.  s8, l8, d8, c8,
  582.  s9, l9, d9, c9,
  583.  s10, l10, d10, c10,
  584.  s11, l11, d11, c11,
  585.  s12, l12, d12, c12,
  586.  s13, l13, d13, c13,
  587.  s14, l14, d14, c14,
  588.  s15, l15, d15, c15,
  589.  s16, l16, d16, c16,
  590.  s17, l17, d17, c17,
  591.  s18, l18, d18, c18,
  592.  s19, l19, d19, c19,
  593.  s20, l20, d20, c20,
  594.  s21, l21, d21, c21,
  595.  s22, l22, d22, c22,
  596.  s23, l23, d23, c23,
  597.  s24, l24, d24, c24,
  598.  s25, l25, d25, c25,
  599.  s26, l26, d26, c26,
  600.  s27, l27, d27, c27,
  601.  s28, l28, d28, c28,
  602.  s29, l29, d29, c29,
  603.  s30, l30, d30, c30,
  604.  s31, l31, d31, c31,
  605.  s32, l32, d32, c32,
  606.  s33, l33, d33, c33,
  607.  s34, l34, d34, c34,
  608.  s35, l35, d35, c35,
  609.  s36, l36, d36, c36,
  610.  s37, l37, d37, c37,
  611.  s38, l38, d38, c38,
  612.  s39, l39, d39, c39,
  613.  s40, l40, d40, c40 )
  614.  VALUES
  615.  (@char_id,
  616.  @s1, @l1, @d1, @c1,
  617.  @s2, @l2, @d2, @c2,
  618.  @s3, @l3, @d3, @c3,
  619.  @s4, @l4, @d4, @c4,
  620.  @s5, @l5, @d5, @c5,
  621.  @s6, @l6, @d6, @c6,
  622.  @s7, @l7, @d7, @c7,
  623.  @s8, @l8, @d8, @c8,
  624.  @s9, @l9, @d9, @c9,
  625.  @s10, @l10, @d10, @c10,
  626.  @s11, @l11, @d11, @c11,
  627.  @s12, @l12, @d12, @c12,
  628.  @s13, @l13, @d13, @c13,
  629.  @s14, @l14, @d14, @c14,
  630.  @s15, @l15, @d15, @c15,
  631.  @s16, @l16, @d16, @c16,
  632.  @s17, @l17, @d17, @c17,
  633.  @s18, @l18, @d18, @c18,
  634.  @s19, @l19, @d19, @c19,
  635.  @s20, @l20, @d20, @c20,
  636.  @s21, @l21, @d21, @c21,
  637.  @s22, @l22, @d22, @c22,
  638.  @s23, @l23, @d23, @c23,
  639.  @s24, @l24, @d24, @c24,
  640.  @s25, @l25, @d25, @c25,
  641.  @s26, @l26, @d26, @c26,
  642.  @s27, @l27, @d27, @c27,
  643.  @s28, @l28, @d28, @c28,
  644.  @s29, @l29, @d29, @c29,
  645.  @s30, @l30, @d30, @c30,
  646.  @s31, @l31, @d31, @c31,
  647.  @s32, @l32, @d32, @c32,
  648.  @s33, @l33, @d33, @c33,
  649.  @s34, @l34, @d34, @c34,
  650.  @s35, @l35, @d35, @c35,
  651.  @s36, @l36, @d36, @c36,
  652.  @s37, @l37, @d37, @c37,
  653.  @s38, @l38, @d38, @c38,
  654.  @s39, @l39, @d39, @c39,
  655.  @s40, @l40, @d40, @c40  )
  656.  
  657.  GO
  658.  
  659. -- ================================================
  660. -- Template generated from Template Explorer using:
  661. -- Create Procedure (New Menu).SQL
  662. --
  663. -- Use the Specify Values for Template Parameters
  664. -- command (Ctrl-Shift-M) to fill in the parameter
  665. -- values below.
  666. --
  667. -- This block of comments will not be included in
  668. -- the definition of the procedure.
  669. -- ================================================
  670. USE lin2world
  671. GO
  672. SET ANSI_NULLS ON
  673. GO
  674. SET QUOTED_IDENTIFIER ON
  675. GO
  676. -- =============================================
  677. -- Author:      Vanganth
  678. -- Create date:
  679. -- Description: Procedure for new func RequestLoadAbnormalStatus
  680. -- =============================================
  681.  
  682. IF EXISTS (SELECT 1
  683.     FROM sys.procedures
  684.     WHERE [name]='lin_GetActiveSkills')
  685.         DROP PROCEDURE lin_GetActiveSkills
  686. GO
  687.  
  688. CREATE PROCEDURE lin_GetActiveSkills
  689.     -- Add the parameters for the stored procedure here
  690.     @char_id AS INT
  691. AS
  692. BEGIN
  693.     -- SET NOCOUNT ON added to prevent extra result sets from
  694.     -- interfering with SELECT statements.
  695.     SET NOCOUNT ON;
  696.  
  697.     -- Insert statements for procedure here
  698.     SELECT [s1]
  699.       ,[l1]
  700.       ,[d1]
  701.       ,[s2]
  702.       ,[l2]
  703.       ,[d2]
  704.       ,[s3]
  705.       ,[l3]
  706.       ,[d3]
  707.       ,[s4]
  708.       ,[l4]
  709.       ,[d4]
  710.       ,[s5]
  711.       ,[l5]
  712.       ,[d5]
  713.       ,[s6]
  714.       ,[l6]
  715.       ,[d6]
  716.       ,[s7]
  717.       ,[l7]
  718.       ,[d7]
  719.       ,[s8]
  720.       ,[l8]
  721.       ,[d8]
  722.       ,[s9]
  723.       ,[l9]
  724.       ,[d9]
  725.       ,[s10]
  726.       ,[l10]
  727.       ,[d10]
  728.       ,[s11]
  729.       ,[l11]
  730.       ,[d11]
  731.       ,[s12]
  732.       ,[l12]
  733.       ,[d12]
  734.       ,[s13]
  735.       ,[l13]
  736.       ,[d13]
  737.       ,[s14]
  738.       ,[l14]
  739.       ,[d14]
  740.       ,[s15]
  741.       ,[l15]
  742.       ,[d15]
  743.       ,[s16]
  744.       ,[l16]
  745.       ,[d16]
  746.       ,[s17]
  747.       ,[l17]
  748.       ,[d17]
  749.       ,[s18]
  750.       ,[l18]
  751.       ,[d18]
  752.       ,[s19]
  753.       ,[l19]
  754.       ,[d19]
  755.       ,[s20]
  756.       ,[l20]
  757.       ,[d20]
  758.       ,[s21]
  759.       ,[l21]
  760.       ,[d21]
  761.       ,[s22]
  762.       ,[l22]
  763.       ,[d22]
  764.       ,[s23]
  765.       ,[l23]
  766.       ,[d23]
  767.       ,[s24]
  768.       ,[l24]
  769.       ,[d24]
  770.       ,[s25]
  771.       ,[l25]
  772.       ,[d25]
  773.       ,[s26]
  774.       ,[l26]
  775.       ,[d26]
  776.       ,[s27]
  777.       ,[l27]
  778.       ,[d27]
  779.       ,[s28]
  780.       ,[l28]
  781.       ,[d28]
  782.       ,[s29]
  783.       ,[l29]
  784.       ,[d29]
  785.       ,[s30]
  786.       ,[l30]
  787.       ,[d30]
  788.       ,[s31]
  789.       ,[l31]
  790.       ,[d31]
  791.       ,[s32]
  792.       ,[l32]
  793.       ,[d32]
  794.       ,[s33]
  795.       ,[l33]
  796.       ,[d33]
  797.       ,[s34]
  798.       ,[l34]
  799.       ,[d34]
  800.       ,[s35]
  801.       ,[l35]
  802.       ,[d35]
  803.       ,[s36]
  804.       ,[l36]
  805.       ,[d36]
  806.       ,[s37]
  807.       ,[l37]
  808.       ,[d37]
  809.       ,[s38]
  810.       ,[l38]
  811.       ,[d38]
  812.       ,[s39]
  813.       ,[l39]
  814.       ,[d39]
  815.       ,[s40]
  816.       ,[l40]
  817.       ,[d40]
  818.       ,[c1]
  819.       ,[c2]
  820.       ,[c3]
  821.       ,[c4]
  822.       ,[c5]
  823.       ,[c6]
  824.       ,[c7]
  825.       ,[c8]
  826.       ,[c9]
  827.       ,[c10]
  828.       ,[c11]
  829.       ,[c12]
  830.       ,[c13]
  831.       ,[c14]
  832.       ,[c15]
  833.       ,[c16]
  834.       ,[c17]
  835.       ,[c18]
  836.       ,[c19]
  837.       ,[c20]
  838.       ,[c21]
  839.       ,[c22]
  840.       ,[c23]
  841.       ,[c24]
  842.       ,[c25]
  843.       ,[c26]
  844.       ,[c27]
  845.       ,[c28]
  846.       ,[c29]
  847.       ,[c30]
  848.       ,[c31]
  849.       ,[c32]
  850.       ,[c33]
  851.       ,[c34]
  852.       ,[c35]
  853.       ,[c36]
  854.       ,[c37]
  855.       ,[c38]
  856.       ,[c39]
  857.       ,[c40]
  858.     FROM [lin2world].[dbo].[user_ActiveSkill] WHERE char_id = @char_id
  859. END
  860. GO
  861.  
  862. USE lin2world
  863. GO
  864. SET ANSI_NULLS ON
  865. GO
  866. SET QUOTED_IDENTIFIER ON
  867. GO
  868. USE [lin2world]
  869. GO
  870. DROP PROCEDURE lin_UpdateActiveSkill
  871. GO
  872. -- =============================================
  873. -- Author:      Vanganth
  874. -- Create date:
  875. -- Description: Procedure for new func RequestSaveAbnormalStatus
  876. -- =============================================
  877. CREATE PROCEDURE lin_UpdateActiveSkill
  878. (
  879.  @char_id INT,
  880.  @s1 INT, @l1 TINYINT, @d1 INT, @c1 TINYINT,
  881.  @s2 INT, @l2 TINYINT, @d2 INT, @c2 TINYINT,
  882.  @s3 INT, @l3 TINYINT, @d3 INT, @c3 TINYINT,
  883.  @s4 INT, @l4 TINYINT, @d4 INT, @c4 TINYINT,
  884.  @s5 INT, @l5 TINYINT, @d5 INT, @c5 TINYINT,
  885.  @s6 INT, @l6 TINYINT, @d6 INT, @c6 TINYINT,
  886.  @s7 INT, @l7 TINYINT, @d7 INT, @c7 TINYINT,
  887.  @s8 INT, @l8 TINYINT, @d8 INT, @c8 TINYINT,
  888.  @s9 INT, @l9 TINYINT, @d9 INT, @c9 TINYINT,
  889.  @s10 INT, @l10 TINYINT, @d10 INT, @c10 TINYINT,
  890.  @s11 INT, @l11 TINYINT, @d11 INT, @c11 TINYINT,
  891.  @s12 INT, @l12 TINYINT, @d12 INT, @c12 TINYINT,
  892.  @s13 INT, @l13 TINYINT, @d13 INT, @c13 TINYINT,
  893.  @s14 INT, @l14 TINYINT, @d14 INT, @c14 TINYINT,
  894.  @s15 INT, @l15 TINYINT, @d15 INT, @c15 TINYINT,
  895.  @s16 INT, @l16 TINYINT, @d16 INT, @c16 TINYINT,
  896.  @s17 INT, @l17 TINYINT, @d17 INT, @c17 TINYINT,
  897.  @s18 INT, @l18 TINYINT, @d18 INT, @c18 TINYINT,
  898.  @s19 INT, @l19 TINYINT, @d19 INT, @c19 TINYINT,
  899.  @s20 INT, @l20 TINYINT, @d20 INT, @c20 TINYINT,
  900.  @s21 INT, @l21 TINYINT, @d21 INT, @c21 TINYINT,
  901.  @s22 INT, @l22 TINYINT, @d22 INT, @c22 TINYINT,
  902.  @s23 INT, @l23 TINYINT, @d23 INT, @c23 TINYINT,
  903.  @s24 INT, @l24 TINYINT, @d24 INT, @c24 TINYINT,
  904.  @s25 INT, @l25 TINYINT, @d25 INT, @c25 TINYINT,
  905.  @s26 INT, @l26 TINYINT, @d26 INT, @c26 TINYINT,
  906.  @s27 INT, @l27 TINYINT, @d27 INT, @c27 TINYINT,
  907.  @s28 INT, @l28 TINYINT, @d28 INT, @c28 TINYINT,
  908.  @s29 INT, @l29 TINYINT, @d29 INT, @c29 TINYINT,
  909.  @s30 INT, @l30 TINYINT, @d30 INT, @c30 TINYINT,
  910.  @s31 INT, @l31 TINYINT, @d31 INT, @c31 TINYINT,
  911.  @s32 INT, @l32 TINYINT, @d32 INT, @c32 TINYINT,
  912.  @s33 INT, @l33 TINYINT, @d33 INT, @c33 TINYINT,
  913.  @s34 INT, @l34 TINYINT, @d34 INT, @c34 TINYINT,
  914.  @s35 INT, @l35 TINYINT, @d35 INT, @c35 TINYINT,
  915.  @s36 INT, @l36 TINYINT, @d36 INT, @c36 TINYINT,
  916.  @s37 INT, @l37 TINYINT, @d37 INT, @c37 TINYINT,
  917.  @s38 INT, @l38 TINYINT, @d38 INT, @c38 TINYINT,
  918.  @s39 INT, @l39 TINYINT, @d39 INT, @c39 TINYINT,
  919.  @s40 INT, @l40 TINYINT, @d40 INT, @c40 TINYINT
  920. )
  921. AS
  922.     -- SET NOCOUNT ON added to prevent extra result sets from
  923.     -- interfering with SELECT statements.
  924.     SET NOCOUNT ON;
  925. IF EXISTS(SELECT * FROM user_activeskill WHERE char_id = @char_id)
  926. BEGIN
  927.  UPDATE user_activeskill
  928.  SET
  929.  s1 = @s1, l1 = @l1, d1 = @d1, c1 = @c1,
  930.  s2 = @s2, l2 = @l2, d2 = @d2, c2 = @c2,
  931.  s3 = @s3, l3 = @l3, d3 = @d3, c3 = @c3,
  932.  s4 = @s4, l4 = @l4, d4 = @d4, c4 = @c4,
  933.  s5 = @s5, l5 = @l5, d5 = @d5, c5 = @c5,
  934.  s6 = @s6, l6 = @l6, d6 = @d6, c6 = @c6,
  935.  s7 = @s7, l7 = @l7, d7 = @d7, c7 = @c7,
  936.  s8 = @s8, l8 = @l8, d8 = @d8, c8 = @c8,
  937.  s9 = @s9, l9 = @l9, d9 = @d9, c9 = @c9,
  938.  s10 = @s10, l10 = @l10, d10 = @d10, c10 = @c10,
  939.  s11 = @s11, l11 = @l11, d11 = @d11, c11 = @c11,
  940.  s12 = @s12, l12 = @l12, d12 = @d12, c12 = @c12,
  941.  s13 = @s13, l13 = @l13, d13 = @d13, c13 = @c13,
  942.  s14 = @s14, l14 = @l14, d14 = @d14, c14 = @c14,
  943.  s15 = @s15, l15 = @l15, d15 = @d15, c15 = @c15,
  944.  s16 = @s16, l16 = @l16, d16 = @d16, c16 = @c16,
  945.  s17 = @s17, l17 = @l17, d17 = @d17, c17 = @c17,
  946.  s18 = @s18, l18 = @l18, d18 = @d18, c18 = @c18,
  947.  s19 = @s19, l19 = @l19, d19 = @d19, c19 = @c19,
  948.  s20 = @s20, l20 = @l20, d20 = @d20, c20 = @c20,
  949.  s21 = @s21, l21 = @l21, d21 = @d21, c21 = @c21,
  950.  s22 = @s22, l22 = @l22, d22 = @d22, c22 = @c22,
  951.  s23 = @s23, l23 = @l23, d23 = @d23, c23 = @c23,
  952.  s24 = @s24, l24 = @l24, d24 = @d24, c24 = @c24,
  953.  s25 = @s25, l25 = @l25, d25 = @d25, c25 = @c25,
  954.  s26 = @s26, l26 = @l26, d26 = @d26, c26 = @c26,
  955.  s27 = @s27, l27 = @l27, d27 = @d27, c27 = @c27,
  956.  s28 = @s28, l28 = @l28, d28 = @d28, c28 = @c28,
  957.  s29 = @s29, l29 = @l29, d29 = @d29, c29 = @c29,
  958.  s30 = @s30, l30 = @l30, d30 = @d30, c30 = @c30,
  959.  s31 = @s31, l31 = @l31, d31 = @d31, c31 = @c31,
  960.  s32 = @s32, l32 = @l32, d32 = @d32, c32 = @c32,
  961.  s33 = @s33, l33 = @l33, d33 = @d33, c33 = @c33,
  962.  s34 = @s34, l34 = @l34, d34 = @d34, c34 = @c34,
  963.  s35 = @s35, l35 = @l35, d35 = @d35, c35 = @c35,
  964.  s36 = @s36, l36 = @l36, d36 = @d36, c36 = @c36,
  965.  s37 = @s37, l37 = @l37, d37 = @d37, c37 = @c37,
  966.  s38 = @s38, l38 = @l38, d38 = @d38, c38 = @c38,
  967.  s39 = @s39, l39 = @l39, d39 = @d39, c39 = @c39,
  968.  s40 = @s40, l40 = @l40, d40 = @d40, c40 = @c40
  969.  WHERE char_id = @char_id
  970. END  
  971. ELSE
  972. BEGIN  
  973.  INSERT INTO user_activeskill
  974.  (char_id,
  975.  s1, l1, d1, c1,
  976.  s2, l2, d2, c2,
  977.  s3, l3, d3, c3,
  978.  s4, l4, d4, c4,
  979.  s5, l5, d5, c5,
  980.  s6, l6, d6, c6,
  981.  s7, l7, d7, c7,
  982.  s8, l8, d8, c8,
  983.  s9, l9, d9, c9,
  984.  s10, l10, d10, c10,
  985.  s11, l11, d11, c11,
  986.  s12, l12, d12, c12,
  987.  s13, l13, d13, c13,
  988.  s14, l14, d14, c14,
  989.  s15, l15, d15, c15,
  990.  s16, l16, d16, c16,
  991.  s17, l17, d17, c17,
  992.  s18, l18, d18, c18,
  993.  s19, l19, d19, c19,
  994.  s20, l20, d20, c20,
  995.  s21, l21, d21, c21,
  996.  s22, l22, d22, c22,
  997.  s23, l23, d23, c23,
  998.  s24, l24, d24, c24,
  999.  s25, l25, d25, c25,
  1000.  s26, l26, d26, c26,
  1001.  s27, l27, d27, c27,
  1002.  s28, l28, d28, c28,
  1003.  s29, l29, d29, c29,
  1004.  s30, l30, d30, c30,
  1005.  s31, l31, d31, c31,
  1006.  s32, l32, d32, c32,
  1007.  s33, l33, d33, c33,
  1008.  s34, l34, d34, c34,
  1009.  s35, l35, d35, c35,
  1010.  s36, l36, d36, c36,
  1011.  s37, l37, d37, c37,
  1012.  s38, l38, d38, c38,
  1013.  s39, l39, d39, c39,
  1014.  s40, l40, d40, c40 )
  1015.  VALUES
  1016.  (@char_id,
  1017.  @s1, @l1, @d1, @c1,
  1018.  @s2, @l2, @d2, @c2,
  1019.  @s3, @l3, @d3, @c3,
  1020.  @s4, @l4, @d4, @c4,
  1021.  @s5, @l5, @d5, @c5,
  1022.  @s6, @l6, @d6, @c6,
  1023.  @s7, @l7, @d7, @c7,
  1024.  @s8, @l8, @d8, @c8,
  1025.  @s9, @l9, @d9, @c9,
  1026.  @s10, @l10, @d10, @c10,
  1027.  @s11, @l11, @d11, @c11,
  1028.  @s12, @l12, @d12, @c12,
  1029.  @s13, @l13, @d13, @c13,
  1030.  @s14, @l14, @d14, @c14,
  1031.  @s15, @l15, @d15, @c15,
  1032.  @s16, @l16, @d16, @c16,
  1033.  @s17, @l17, @d17, @c17,
  1034.  @s18, @l18, @d18, @c18,
  1035.  @s19, @l19, @d19, @c19,
  1036.  @s20, @l20, @d20, @c20,
  1037.  @s21, @l21, @d21, @c21,
  1038.  @s22, @l22, @d22, @c22,
  1039.  @s23, @l23, @d23, @c23,
  1040.  @s24, @l24, @d24, @c24,
  1041.  @s25, @l25, @d25, @c25,
  1042.  @s26, @l26, @d26, @c26,
  1043.  @s27, @l27, @d27, @c27,
  1044.  @s28, @l28, @d28, @c28,
  1045.  @s29, @l29, @d29, @c29,
  1046.  @s30, @l30, @d30, @c30,
  1047.  @s31, @l31, @d31, @c31,
  1048.  @s32, @l32, @d32, @c32,
  1049.  @s33, @l33, @d33, @c33,
  1050.  @s34, @l34, @d34, @c34,
  1051.  @s35, @l35, @d35, @c35,
  1052.  @s36, @l36, @d36, @c36,
  1053.  @s37, @l37, @d37, @c37,
  1054.  @s38, @l38, @d38, @c38,
  1055.  @s39, @l39, @d39, @c39,
  1056.  @s40, @l40, @d40, @c40  )
  1057. END
  1058.  
  1059. GO
  1060.  
  1061. ALTER TABLE [dbo].[quest] ADD
  1062.     [q17] [INT] NOT NULL CONSTRAINT [DF_Quest_q17]  DEFAULT ((0)),
  1063.     [s17] [INT] NOT NULL CONSTRAINT [DF_Quest_s17]  DEFAULT ((0)),
  1064.     [q18] [INT] NOT NULL CONSTRAINT [DF_Quest_q18]  DEFAULT ((0)),
  1065.     [s18] [INT] NOT NULL CONSTRAINT [DF_Quest_s18]  DEFAULT ((0)),
  1066.     [q19] [INT] NOT NULL CONSTRAINT [DF_Quest_q19]  DEFAULT ((0)),
  1067.     [s19] [INT] NOT NULL CONSTRAINT [DF_Quest_s19]  DEFAULT ((0)),
  1068.     [q20] [INT] NOT NULL CONSTRAINT [DF_Quest_q20]  DEFAULT ((0)),
  1069.     [s20] [INT] NOT NULL CONSTRAINT [DF_Quest_s20]  DEFAULT ((0)),
  1070.     [q21] [INT] NOT NULL CONSTRAINT [DF_Quest_q21]  DEFAULT ((0)),
  1071.     [s21] [INT] NOT NULL CONSTRAINT [DF_Quest_s21]  DEFAULT ((0)),
  1072.     [q22] [INT] NOT NULL CONSTRAINT [DF_Quest_q22]  DEFAULT ((0)),
  1073.     [s22] [INT] NOT NULL CONSTRAINT [DF_Quest_s22]  DEFAULT ((0)),
  1074.     [q23] [INT] NOT NULL CONSTRAINT [DF_Quest_q23]  DEFAULT ((0)),
  1075.     [s23] [INT] NOT NULL CONSTRAINT [DF_Quest_s23]  DEFAULT ((0)),
  1076.     [q24] [INT] NOT NULL CONSTRAINT [DF_Quest_q24]  DEFAULT ((0)),
  1077.     [s24] [INT] NOT NULL CONSTRAINT [DF_Quest_s24]  DEFAULT ((0)),
  1078.     [q25] [INT] NOT NULL CONSTRAINT [DF_Quest_q25]  DEFAULT ((0)),
  1079.     [s25] [INT] NOT NULL CONSTRAINT [DF_Quest_s25]  DEFAULT ((0)),
  1080.     [q26] [INT] NOT NULL CONSTRAINT [DF_Quest_q26]  DEFAULT ((0)),
  1081.     [s26] [INT] NOT NULL CONSTRAINT [DF_Quest_s26]  DEFAULT ((0)),
  1082.     [j17] [INT] NOT NULL CONSTRAINT [DF_Quest_j17]  DEFAULT ((0)),
  1083.     [j18] [INT] NOT NULL CONSTRAINT [DF_Quest_j18]  DEFAULT ((0)),
  1084.     [j19] [INT] NOT NULL CONSTRAINT [DF_Quest_j19]  DEFAULT ((0)),
  1085.     [j20] [INT] NOT NULL CONSTRAINT [DF_Quest_j20]  DEFAULT ((0)),
  1086.     [j21] [INT] NOT NULL CONSTRAINT [DF_Quest_j21]  DEFAULT ((0)),
  1087.     [j22] [INT] NOT NULL CONSTRAINT [DF_Quest_j22]  DEFAULT ((0)),
  1088.     [j23] [INT] NOT NULL CONSTRAINT [DF_Quest_j23]  DEFAULT ((0)),
  1089.     [j24] [INT] NOT NULL CONSTRAINT [DF_Quest_j24]  DEFAULT ((0)),
  1090.     [j25] [INT] NOT NULL CONSTRAINT [DF_Quest_j25]  DEFAULT ((0)),
  1091.     [j26] [INT] NOT NULL CONSTRAINT [DF_Quest_j26]  DEFAULT ((0)),
  1092.     [s2_17] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_17]  DEFAULT ((0)),
  1093.     [s2_18] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_18]  DEFAULT ((0)),
  1094.     [s2_19] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_19]  DEFAULT ((0)),
  1095.     [s2_20] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_20]  DEFAULT ((0)),
  1096.     [s2_21] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_21]  DEFAULT ((0)),
  1097.     [s2_22] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_22]  DEFAULT ((0)),
  1098.     [s2_23] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_23]  DEFAULT ((0)),
  1099.     [s2_24] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_24]  DEFAULT ((0)),
  1100.     [s2_25] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_25]  DEFAULT ((0)),
  1101.     [s2_26] [INT] NOT NULL CONSTRAINT [DF_QUEST_S2_26]  DEFAULT ((0))
  1102. GO
  1103.  
  1104. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_LoadQuest'))
  1105. DROP proc [lin_LoadQuest]
  1106. GO
  1107. /********************************************  
  1108. lin_LoadQuest  
  1109.    
  1110. INPUT  
  1111.  @char_id int  
  1112. OUTPUT  
  1113. return  
  1114. made by  
  1115.  carrot
  1116.  kuroi - extended number of quests to 25
  1117. date  
  1118.  2002-06-09  
  1119. ********************************************/  
  1120. CREATE PROCEDURE [dbo].[lin_LoadQuest]
  1121. (
  1122. @char_id INT
  1123. )
  1124. AS
  1125. SET NOCOUNT ON
  1126.  
  1127. SELECT TOP 1
  1128.   q1,  s1,  s2_1,  j1,
  1129.   q2,  s2,  s2_2,  j2,
  1130.   q3,  s3,  s2_3,  j3,
  1131.   q4,  s4,  s2_4,  j4,
  1132.   q5,  s5,  s2_5,  j5,
  1133.   q6,  s6,  s2_6,  j6,
  1134.   q7,  s7,  s2_7,  j7,
  1135.   q8,  s8,  s2_8,  j8,
  1136.   q9,  s9,  s2_9,  j9,
  1137.   q10, s10, s2_10, j10,
  1138.   q11, s11, s2_11, j11,
  1139.   q12, s12, s2_12, j12,
  1140.   q13, s13, s2_13, j13,
  1141.   q14, s14, s2_14, j14,
  1142.   q15, s15, s2_15, j15,
  1143.   q16, s16, s2_16, j16,
  1144.   q17, s17, s2_17, j17,
  1145.   q18, s18, s2_18, j18,
  1146.   q19, s19, s2_19, j19,
  1147.   q20, s20, s2_20, j20,
  1148.   q21, s21, s2_21, j21,
  1149.   q22, s22, s2_22, j22,
  1150.   q23, s23, s2_23, j23,
  1151.   q24, s24, s2_24, j24,
  1152.   q25, s25, s2_25, j25,
  1153.   q26, s26, s2_26, j26
  1154.  
  1155. FROM quest (nolock)
  1156. WHERE char_id = @char_id
  1157. GO
  1158.  
  1159. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_SetQuest'))
  1160. DROP proc [lin_SetQuest]
  1161. GO
  1162.  
  1163. /********************************************  
  1164. lin_SetQuest  
  1165.    
  1166. OUTPUT  
  1167. return  
  1168. made by  
  1169.  carrot  
  1170. date  
  1171.  2002-06-09  
  1172. ********************************************/  
  1173. CREATE PROCEDURE [dbo].[lin_SetQuest]
  1174. (  
  1175. @q1 INT,  
  1176. @s1 INT,  
  1177. @s2_1 INT,  
  1178. @j1 INT,  
  1179.  
  1180. @q2 INT,  
  1181. @s2 INT,  
  1182. @s2_2 INT,  
  1183. @j2 INT,  
  1184.  
  1185. @q3 INT,  
  1186. @s3 INT,  
  1187. @s2_3 INT,  
  1188. @j3 INT,  
  1189.  
  1190. @q4 INT,  
  1191. @s4 INT,  
  1192. @s2_4 INT,  
  1193. @j4 INT,  
  1194.  
  1195. @q5 INT,  
  1196. @s5 INT,  
  1197. @s2_5 INT,  
  1198. @j5 INT,  
  1199.  
  1200. @q6 INT,  
  1201. @s6 INT,  
  1202. @s2_6 INT,  
  1203. @j6 INT,  
  1204.  
  1205.  
  1206. @q7 INT,  
  1207. @s7 INT,  
  1208. @s2_7 INT,  
  1209. @j7 INT,  
  1210.  
  1211. @q8 INT,  
  1212. @s8 INT,  
  1213. @s2_8 INT,  
  1214. @j8 INT,  
  1215.  
  1216. @q9 INT,  
  1217. @s9 INT,  
  1218. @s2_9 INT,  
  1219. @j9 INT,  
  1220.  
  1221. @q10 INT,  
  1222. @s10 INT,  
  1223. @s2_10 INT,  
  1224. @j10 INT,  
  1225.  
  1226. @q11 INT,  
  1227. @s11 INT,  
  1228. @s2_11 INT,  
  1229. @j11 INT,  
  1230.  
  1231. @q12 INT,  
  1232. @s12 INT,  
  1233. @s2_12 INT,  
  1234. @j12 INT,  
  1235.  
  1236. @q13 INT,  
  1237. @s13 INT,  
  1238. @s2_13 INT,  
  1239. @j13 INT,  
  1240.  
  1241. @q14 INT,  
  1242. @s14 INT,  
  1243. @s2_14 INT,  
  1244. @j14 INT,  
  1245.  
  1246. @q15 INT,  
  1247. @s15 INT,  
  1248. @s2_15 INT,  
  1249. @j15 INT,  
  1250.  
  1251. @q16 INT,  
  1252. @s16 INT,  
  1253. @s2_16 INT,  
  1254. @j16 INT,  
  1255.  
  1256. @q17 INT,  
  1257. @s17 INT,  
  1258. @s2_17 INT,  
  1259. @j17 INT,  
  1260.  
  1261. @q18 INT,  
  1262. @s18 INT,  
  1263. @s2_18 INT,  
  1264. @j18 INT,  
  1265.  
  1266. @q19 INT,  
  1267. @s19 INT,  
  1268. @s2_19 INT,  
  1269. @j19 INT,  
  1270.  
  1271. @q20 INT,  
  1272. @s20 INT,  
  1273. @s2_20 INT,  
  1274. @j20 INT,  
  1275.  
  1276. @q21 INT,  
  1277. @s21 INT,  
  1278. @s2_21 INT,  
  1279. @j21 INT,  
  1280.  
  1281. @q22 INT,  
  1282. @s22 INT,  
  1283. @s2_22 INT,  
  1284. @j22 INT,  
  1285.  
  1286. @q23 INT,  
  1287. @s23 INT,  
  1288. @s2_23 INT,  
  1289. @j23 INT,  
  1290.  
  1291. @q24 INT,  
  1292. @s24 INT,  
  1293. @s2_24 INT,  
  1294. @j24 INT,  
  1295.  
  1296. @q25 INT,  
  1297. @s25 INT,  
  1298. @s2_25 INT,  
  1299. @j25 INT,  
  1300.  
  1301. @q26 INT,  
  1302. @s26 INT,  
  1303. @s2_26 INT,  
  1304. @j26 INT,  
  1305.  
  1306. @char_id  INT  
  1307.  
  1308. )  
  1309. AS  
  1310. SET NOCOUNT ON  
  1311.  
  1312. UPDATE quest  
  1313. SET  
  1314. q1=@q1, s1=@s1, s2_1=@s2_1, j1=@j1,  
  1315. q2=@q2, s2=@s2, s2_2=@s2_2, j2=@j2,  
  1316. q3=@q3, s3=@s3, s2_3=@s2_3, j3=@j3,  
  1317. q4=@q4, s4=@s4, s2_4=@s2_4, j4=@j4,  
  1318. q5=@q5, s5=@s5, s2_5=@s2_5, j5=@j5,  
  1319. q6=@q6, s6=@s6, s2_6=@s2_6, j6=@j6,  
  1320. q7=@q7, s7=@s7, s2_7=@s2_7, j7=@j7,  
  1321. q8=@q8, s8=@s8, s2_8=@s2_8, j8=@j8,  
  1322. q9=@q9, s9=@s9, s2_9=@s2_9, j9=@j9,  
  1323. q10=@q10, s10=@s10, s2_10=@s2_10, j10=@j10,  
  1324. q11=@q11, s11=@s11, s2_11=@s2_11, j11=@j11,  
  1325. q12=@q12, s12=@s12, s2_12=@s2_12, j12=@j12,  
  1326. q13=@q13, s13=@s13, s2_13=@s2_13, j13=@j13,  
  1327. q14=@q14, s14=@s14, s2_14=@s2_14, j14=@j14,  
  1328. q15=@q15, s15=@s15, s2_15=@s2_15, j15=@j15,  
  1329. q16=@q16, s16=@s16, s2_16=@s2_16, j16=@j16,
  1330. q17=@q17, s17=@s17, s2_17=@s2_17, j17=@j17,
  1331. q18=@q18, s18=@s18, s2_18=@s2_18, j18=@j18,
  1332. q19=@q19, s19=@s19, s2_19=@s2_19, j19=@j19,
  1333. q20=@q20, s20=@s20, s2_20=@s2_20, j20=@j20,
  1334. q21=@q21, s21=@s21, s2_21=@s2_21, j21=@j21,
  1335. q22=@q22, s22=@s22, s2_22=@s2_22, j22=@j22,
  1336. q23=@q23, s23=@s23, s2_23=@s2_23, j23=@j23,
  1337. q24=@q24, s24=@s24, s2_24=@s2_24, j24=@j24,
  1338. q25=@q25, s25=@s25, s2_25=@s2_25, j25=@j25,
  1339. q26=@q26, s26=@s26, s2_26=@s2_26, j26=@j26
  1340. WHERE char_id = @char_id
  1341. GO
  1342.  
  1343. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'lin_UpdateJournal'))
  1344. DROP proc [lin_UpdateJournal]
  1345. GO
  1346.  
  1347. CREATE PROCEDURE
  1348. [dbo].[lin_UpdateJournal] ( @id INT,  
  1349. @j1 INT, @j2 INT, @j3 INT, @j4 INT, @j5 INT, @j6 INT, @j7 INT, @j8 INT,
  1350. @j9 INT, @j10 INT, @j11 INT, @j12 INT, @j13 INT, @j14 INT, @j15 INT, @j16 INT,
  1351. @j17 INT, @j18 INT, @j19 INT, @j20 INT, @j21 INT, @j22 INT, @j23 INT, @j24 INT, @j25 INT, @j26 INT
  1352. )
  1353. AS
  1354. UPDATE Quest
  1355. SET
  1356. j1 = @j1,
  1357. j2 = @j2,
  1358. j3 = @j3,
  1359. j4 = @j4,
  1360. j5 = @j5,
  1361. j6 = @j6,
  1362. j7 = @j7,
  1363. j8 = @j8,
  1364. j9 = @j9,
  1365. j10 = @j10,
  1366. j11 = @j11,
  1367. j12 = @j12,
  1368. j13 = @j13,
  1369. j14 = @j14,
  1370. j15 = @j15,
  1371. j16 = @j16,
  1372. j17 = @j17,
  1373. j18 = @j18,
  1374. j19 = @j19,
  1375. j20 = @j20,
  1376. j21 = @j21,
  1377. j22 = @j22,
  1378. j23 = @j23,
  1379. j24 = @j24,
  1380. j25 = @j25,
  1381. j26 = @j26
  1382. WHERE char_id = @id
  1383. GO
  1384.  
  1385. USE [lin2world]
  1386. GO
  1387.  
  1388. ALTER TABLE dbo.user_data ADD
  1389.     augmentation INT NOT NULL DEFAULT 0
  1390. GO
  1391.  
  1392. USE [lin2world]
  1393. GO
  1394.  
  1395. ALTER TABLE dbo.user_item ADD
  1396.     augmentation INT NOT NULL DEFAULT 0
  1397. GO
  1398.  
  1399. USE lin2world
  1400. GO
  1401.  
  1402. ALTER TABLE dbo.Pledge ADD
  1403.     delegate_clid INT NULL DEFAULT 0
  1404.  
  1405.  
  1406. USE [lin2world]
  1407. GO
  1408. /****** Object:  Table [dbo].[pledge_ext]    Script Date: 01/21/2008 03:50:36 ******/
  1409. /****** Made by [email protected] to support C5Ext.dll                ******/
  1410. SET ANSI_NULLS ON
  1411. GO
  1412. SET QUOTED_IDENTIFIER ON
  1413. GO
  1414. CREATE TABLE [dbo].[pledge_ext](
  1415.     [pledge_id] [INT] NOT NULL,
  1416.     [reputation_points] [INT] NOT NULL,
  1417.     [Rank1] [BIGINT] NOT NULL DEFAULT ((0)),
  1418.     [Rank2] [BIGINT] NOT NULL DEFAULT ((0)),
  1419.     [Rank3] [BIGINT] NOT NULL DEFAULT ((0)),
  1420.     [Rank4] [BIGINT] NOT NULL DEFAULT ((0)),
  1421.     [Rank5] [BIGINT] NOT NULL DEFAULT ((0)),
  1422.     [Rank6] [BIGINT] NOT NULL DEFAULT ((0)),
  1423.     [Rank7] [BIGINT] NOT NULL DEFAULT ((0)),
  1424.     [Rank8] [BIGINT] NOT NULL DEFAULT ((0)),
  1425.     [Rank9] [BIGINT] NOT NULL DEFAULT ((0)),
  1426.     [Skill0] [tinyint] NOT NULL DEFAULT ((0)),
  1427.     [Skill1] [tinyint] NOT NULL DEFAULT ((0)),
  1428.     [Skill2] [tinyint] NOT NULL DEFAULT ((0)),
  1429.     [Skill3] [tinyint] NOT NULL DEFAULT ((0)),
  1430.     [Skill4] [tinyint] NOT NULL DEFAULT ((0)),
  1431.     [Skill5] [tinyint] NOT NULL DEFAULT ((0)),
  1432.     [Skill6] [tinyint] NOT NULL DEFAULT ((0)),
  1433.     [Skill7] [tinyint] NOT NULL DEFAULT ((0)),
  1434.     [Skill8] [tinyint] NOT NULL DEFAULT ((0)),
  1435.     [Skill9] [tinyint] NOT NULL DEFAULT ((0)),
  1436.     [Skill10] [tinyint] NOT NULL DEFAULT ((0)),
  1437.     [Skill11] [tinyint] NOT NULL DEFAULT ((0)),
  1438.     [Skill12] [tinyint] NOT NULL DEFAULT ((0)),
  1439.     [Skill13] [tinyint] NOT NULL DEFAULT ((0)),
  1440.     [Skill14] [tinyint] NOT NULL DEFAULT ((0)),
  1441.     [Skill15] [tinyint] NOT NULL DEFAULT ((0)),
  1442.     [Skill16] [tinyint] NOT NULL DEFAULT ((0)),
  1443.     [Skill17] [tinyint] NOT NULL DEFAULT ((0)),
  1444.     [Skill18] [tinyint] NOT NULL DEFAULT ((0)),
  1445.     [Skill19] [tinyint] NOT NULL DEFAULT ((0)),
  1446.     [Skill20] [tinyint] NOT NULL DEFAULT ((0)),
  1447.     [Skill21] [tinyint] NOT NULL DEFAULT ((0)),
  1448.  CONSTRAINT [PK_pledge_ext] PRIMARY KEY CLUSTERED
  1449. (
  1450.     [pledge_id] ASC
  1451. )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
  1452. ) ON [PRIMARY]
  1453. GO
  1454.  
  1455. USE [lin2world]
  1456. GO
  1457. /****** Object:  Table [dbo].[pledge_ext]    Script Date: 01/21/2008 03:50:36 ******/
  1458. /****** Made by [email protected] to support C5Ext.dll                ******/
  1459. SET ANSI_NULLS ON
  1460. GO
  1461. SET QUOTED_IDENTIFIER ON
  1462. GO
  1463. CREATE TABLE dbo.pledge_subpledge
  1464.     (
  1465.     pledge_id INT NOT NULL,
  1466.     pledge_type INT NOT NULL,
  1467.     sub_name nvarchar(50) NOT NULL DEFAULT N'',
  1468.     leader_name nvarchar(50) NOT NULL DEFAULT N'',
  1469.     leader_dbid INT NOT NULL DEFAULT ((0))
  1470.     )  ON [PRIMARY]
  1471. GO
  1472.  
  1473. CREATE TABLE dbo.SiegeStat
  1474.     (
  1475.     char_id INT NOT NULL,
  1476.     pledge_id INT NOT NULL,
  1477.     castle_id INT NOT NULL,
  1478.     kill_count INT NULL,
  1479.     death_count INT NULL,
  1480.     damage_taken INT NULL,
  1481.     damage_dealt INT NULL
  1482.     )
  1483.    
  1484. GO
  1485.  
  1486. USE [lin2world]
  1487. GO
  1488. /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
  1489. ALTER TABLE dbo.user_data ADD
  1490.     [Rank] tinyint NOT NULL DEFAULT 6,
  1491.     PledgeType INT NOT NULL DEFAULT 0,
  1492.     sponsor_id INT NOT NULL DEFAULT 0,
  1493.     JoinPledgeLevel INT NOT NULL DEFAULT 0
  1494. GO
  1495.  
  1496. SET ANSI_NULLS ON
  1497. GO
  1498. SET QUOTED_IDENTIFIER ON
  1499. GO
  1500. USE [lin2world]
  1501. GO
  1502.  
  1503. CREATE PROCEDURE lin_AddMemberStat
  1504.     -- Add the parameters for the stored procedure here
  1505.     @castle_id AS INT,
  1506.     @pledge_id AS INT,
  1507.     @char_id AS INT,
  1508.     @kill_count AS INT,
  1509.     @death_count AS INT,
  1510.     @damage_dealt AS INT,
  1511.     @damage_taken AS INT
  1512.  
  1513. AS
  1514. BEGIN
  1515.  
  1516.     SET NOCOUNT ON;
  1517.    
  1518.     INSERT INTO SiegeStat (castle_id, pledge_id, char_id, kill_count, death_count, damage_dealt, damage_taken)
  1519.                             VALUES(@castle_id, @pledge_id, @char_id, @kill_count, @death_count, @damage_dealt, @damage_taken)
  1520.  
  1521. END
  1522. GO
  1523.  
  1524. SET ANSI_NULLS ON
  1525. GO
  1526. SET QUOTED_IDENTIFIER ON
  1527. GO
  1528. USE [lin2world]
  1529. GO
  1530. -- =============================================
  1531. -- Author:      Vanganth
  1532. -- Create date:
  1533. -- Description: Procedure for new func RequestAddPledgeExt
  1534. -- =============================================
  1535. CREATE PROCEDURE lin_AddPledgeExt
  1536.     -- Add the parameters for the stored procedure here
  1537.     @pledge_id AS INT
  1538. AS
  1539. BEGIN
  1540.     -- SET NOCOUNT ON added to prevent extra result sets from
  1541.     -- interfering with SELECT statements.
  1542.     SET NOCOUNT ON;
  1543.     -- Insert statements for procedure here
  1544. 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)
  1545.  
  1546. END
  1547. GO
  1548.  
  1549. SET ANSI_NULLS ON
  1550. GO
  1551. SET QUOTED_IDENTIFIER ON
  1552. GO
  1553. USE [lin2world]
  1554. GO
  1555. CREATE PROCEDURE lin_ClearPledgeStat
  1556.     -- Add the parameters for the stored procedure here
  1557.     @castle_id AS INT,
  1558.     @pledge_id AS INT
  1559.  
  1560. AS
  1561. BEGIN
  1562.  
  1563.     SET NOCOUNT ON;
  1564.  
  1565.     DELETE FROM SiegeStat WHERE castle_id = @castle_id AND pledge_id = @pledge_id
  1566.    
  1567.  
  1568. END
  1569. GO
  1570.  
  1571. SET ANSI_NULLS ON
  1572. GO
  1573. SET QUOTED_IDENTIFIER ON
  1574. GO
  1575. USE [lin2world]
  1576. GO
  1577. -- =============================================
  1578. -- Author:      Vanganth
  1579. -- Create date:
  1580. -- Description: Procedure for new func RequestCreateSubPledge
  1581. -- =============================================
  1582. CREATE PROCEDURE lin_CreateSubPledge
  1583.     -- Add the parameters for the stored procedure here
  1584.     @pledge_id AS INT,
  1585.     @pledge_type AS INT,
  1586.     @sub_name AS nvarchar(50)
  1587. AS
  1588. BEGIN
  1589.     -- SET NOCOUNT ON added to prevent extra result sets from
  1590.     -- interfering with SELECT statements.
  1591.     SET NOCOUNT ON;
  1592.  
  1593.  
  1594. IF(@pledge_id<>0)
  1595. BEGIN
  1596.     IF(@pledge_type = -1)
  1597.     BEGIN
  1598.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1599.                    ([pledge_id]
  1600.                    ,[pledge_type]
  1601.                    ,[sub_name]
  1602.                    ,[leader_name]
  1603.                    ,[leader_dbid])
  1604.              VALUES
  1605.                    (@pledge_id
  1606.                    ,@pledge_type
  1607.                    ,@sub_name
  1608.                    ,''
  1609.                    ,0)
  1610.     END
  1611. ELSE IF(@pledge_type = 100)
  1612.     BEGIN
  1613.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1614.                    ([pledge_id]
  1615.                    ,[pledge_type]
  1616.                    ,[sub_name]
  1617.                    ,[leader_name]
  1618.                    ,[leader_dbid])
  1619.              VALUES
  1620.                    (@pledge_id
  1621.                    ,@pledge_type
  1622.                    ,@sub_name
  1623.                    ,''
  1624.                    ,0)
  1625.     END
  1626. ELSE IF(@pledge_type = 200)
  1627.     BEGIN
  1628.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1629.                    ([pledge_id]
  1630.                    ,[pledge_type]
  1631.                    ,[sub_name]
  1632.                    ,[leader_name]
  1633.                    ,[leader_dbid])
  1634.              VALUES
  1635.                    (@pledge_id
  1636.                    ,@pledge_type
  1637.                    ,@sub_name
  1638.                    ,''
  1639.                    ,0)
  1640.     END
  1641. ELSE IF(@pledge_type = 1001)
  1642.     BEGIN
  1643.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1644.                    ([pledge_id]
  1645.                    ,[pledge_type]
  1646.                    ,[sub_name]
  1647.                    ,[leader_name]
  1648.                    ,[leader_dbid])
  1649.              VALUES
  1650.                    (@pledge_id
  1651.                    ,@pledge_type
  1652.                    ,@sub_name
  1653.                    ,''
  1654.                    ,0)
  1655.     END
  1656. ELSE IF(@pledge_type = 1002)
  1657.     BEGIN
  1658.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1659.                    ([pledge_id]
  1660.                    ,[pledge_type]
  1661.                    ,[sub_name]
  1662.                    ,[leader_name]
  1663.                    ,[leader_dbid])
  1664.              VALUES
  1665.                    (@pledge_id
  1666.                    ,@pledge_type
  1667.                    ,@sub_name
  1668.                    ,''
  1669.                    ,0)
  1670.     END
  1671. ELSE IF(@pledge_type = 2001)
  1672.     BEGIN
  1673.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1674.                    ([pledge_id]
  1675.                    ,[pledge_type]
  1676.                    ,[sub_name]
  1677.                    ,[leader_name]
  1678.                    ,[leader_dbid])
  1679.              VALUES
  1680.                    (@pledge_id
  1681.                    ,@pledge_type
  1682.                    ,@sub_name
  1683.                    ,''
  1684.                    ,0)
  1685.     END
  1686. ELSE IF(@pledge_type = 2002)
  1687.     BEGIN
  1688.         INSERT INTO [lin2world].[dbo].[pledge_subpledge]
  1689.                    ([pledge_id]
  1690.                    ,[pledge_type]
  1691.                    ,[sub_name]
  1692.                    ,[leader_name]
  1693.                    ,[leader_dbid])
  1694.              VALUES
  1695.                    (@pledge_id
  1696.                    ,@pledge_type
  1697.                    ,@sub_name
  1698.                    ,''
  1699.                    ,0)
  1700.     END
  1701. END
  1702.  
  1703. END
  1704. GO
  1705.  
  1706. USE [lin2world]
  1707. GO
  1708. /****** Object:  StoredProcedure [dbo].[lin_DelegateClanMaster]    Script Date: 10/20/2009 20:05:01 ******/
  1709. SET ANSI_NULLS ON
  1710. GO
  1711. SET QUOTED_IDENTIFIER ON
  1712. GO
  1713. -- =============================================
  1714. -- Author:      Vanganth
  1715. -- Create date:
  1716. -- Description: Procedure for Delegating clan masters
  1717. -- =============================================
  1718. CREATE PROCEDURE [dbo].[lin_DelegateClanMaster]
  1719. @pledge_id AS INT
  1720. AS
  1721.  
  1722. SET NOCOUNT ON;
  1723. DECLARE @delegate_clid INT;
  1724. DECLARE @clan_id INT;
  1725.  
  1726. SELECT @delegate_clid=delegate_clid FROM Pledge WHERE pledge_id = @pledge_id
  1727. IF( @delegate_clid <> 0 )
  1728.  BEGIN
  1729.   SELECT @clan_id = pledge_id FROM user_data WHERE char_id = @delegate_clid
  1730.   IF( @clan_id = @pledge_id )
  1731.   BEGIN
  1732.    UPDATE Pledge SET ruler_id = @delegate_clid WHERE pledge_id = @pledge_id
  1733.    UPDATE Pledge SET delegate_clid = 0 WHERE pledge_id = @pledge_id
  1734.   END
  1735.   ELSE
  1736.   BEGIN
  1737.    UPDATE Pledge SET delegate_clid = 0 WHERE pledge_id = @pledge_id
  1738.   END
  1739.  END
  1740.  
  1741. GO
  1742.  
  1743. SET ANSI_NULLS ON
  1744. GO
  1745. SET QUOTED_IDENTIFIER ON
  1746. GO
  1747. USE [lin2world]
  1748. GO
  1749. -- =============================================
  1750. -- Author:      Vanganth
  1751. -- Create date:
  1752. -- Description: Procedure for new func RequestLearnClanSkill
  1753. -- =============================================
  1754. CREATE PROCEDURE lin_LearnClanSkill
  1755.     -- Add the parameters for the stored procedure here
  1756.     @pledge_id AS INT,
  1757.     @clan_skill AS INT,
  1758.     @new_level AS INT
  1759. AS
  1760. BEGIN
  1761.     -- SET NOCOUNT ON added to prevent extra result sets from
  1762.     -- interfering with SELECT statements.
  1763.     SET NOCOUNT ON;
  1764.  
  1765. IF((@clan_skill >= 370 AND @clan_skill < 392) AND @new_level < 4)
  1766. BEGIN
  1767.  
  1768.     IF(@clan_skill = 370)
  1769.     BEGIN
  1770.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill0]=@new_level WHERE [pledge_id] = @pledge_id
  1771.     END
  1772. ELSE IF(@clan_skill = 371)
  1773.     BEGIN
  1774.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill1]=@new_level WHERE [pledge_id] = @pledge_id
  1775.     END
  1776. ELSE IF(@clan_skill = 372)
  1777.     BEGIN
  1778.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill2]=@new_level WHERE [pledge_id] = @pledge_id
  1779.     END
  1780. ELSE IF(@clan_skill = 373)
  1781.     BEGIN
  1782.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill3]=@new_level WHERE [pledge_id] = @pledge_id
  1783.     END
  1784. ELSE IF(@clan_skill = 374)
  1785.     BEGIN
  1786.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill4]=@new_level WHERE [pledge_id] = @pledge_id
  1787.     END
  1788. ELSE IF(@clan_skill = 375)
  1789.     BEGIN
  1790.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill5]=@new_level WHERE [pledge_id] = @pledge_id
  1791.     END
  1792. ELSE IF(@clan_skill = 376)
  1793.     BEGIN
  1794.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill6]=@new_level WHERE [pledge_id] = @pledge_id
  1795.     END
  1796. ELSE IF(@clan_skill = 377)
  1797.     BEGIN
  1798.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill7]=@new_level WHERE [pledge_id] = @pledge_id
  1799.     END
  1800. ELSE IF(@clan_skill = 378)
  1801.     BEGIN
  1802.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill8]=@new_level WHERE [pledge_id] = @pledge_id
  1803.     END
  1804. ELSE IF(@clan_skill = 379)
  1805.     BEGIN
  1806.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill9]=@new_level WHERE [pledge_id] = @pledge_id
  1807.     END
  1808. ELSE IF(@clan_skill = 380)
  1809.     BEGIN
  1810.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill10]=@new_level WHERE [pledge_id] = @pledge_id
  1811.     END
  1812. ELSE IF(@clan_skill = 381)
  1813.     BEGIN
  1814.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill11]=@new_level WHERE [pledge_id] = @pledge_id
  1815.     END
  1816. ELSE IF(@clan_skill = 382)
  1817.     BEGIN
  1818.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill12]=@new_level WHERE [pledge_id] = @pledge_id
  1819.     END
  1820. ELSE IF(@clan_skill = 383)
  1821.     BEGIN
  1822.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill13]=@new_level WHERE [pledge_id] = @pledge_id
  1823.     END
  1824. ELSE IF(@clan_skill = 384)
  1825.     BEGIN
  1826.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill14]=@new_level WHERE [pledge_id] = @pledge_id
  1827.     END
  1828. ELSE IF(@clan_skill = 385)
  1829.     BEGIN
  1830.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill15]=@new_level WHERE [pledge_id] = @pledge_id
  1831.     END
  1832. ELSE IF(@clan_skill = 386)
  1833.     BEGIN
  1834.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill16]=@new_level WHERE [pledge_id] = @pledge_id
  1835.     END
  1836. ELSE IF(@clan_skill = 387)
  1837.     BEGIN
  1838.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill17]=@new_level WHERE [pledge_id] = @pledge_id
  1839.     END
  1840. ELSE IF(@clan_skill = 388)
  1841.     BEGIN
  1842.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill18]=@new_level WHERE [pledge_id] = @pledge_id
  1843.     END
  1844. ELSE IF(@clan_skill = 389)
  1845.     BEGIN
  1846.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill19]=@new_level WHERE [pledge_id] = @pledge_id
  1847.     END
  1848. ELSE IF(@clan_skill = 390)
  1849.     BEGIN
  1850.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill20]=@new_level WHERE [pledge_id] = @pledge_id
  1851.     END
  1852. ELSE IF(@clan_skill = 391)
  1853.     BEGIN
  1854.             UPDATE [lin2world].[dbo].[pledge_ext] SET [Skill21]=@new_level WHERE [pledge_id] = @pledge_id
  1855.     END
  1856. END
  1857.  
  1858. END
  1859. GO
  1860.  
  1861. USE lin2world
  1862. GO
  1863.  
  1864. SET ANSI_NULLS ON
  1865. GO
  1866. SET QUOTED_IDENTIFIER ON
  1867. GO
  1868. -- =============================================
  1869. -- Author:      Vanganth
  1870. -- Create date:
  1871. -- Description: Procedure for new func RequestLoadPledgeExtendInfo
  1872. -- =============================================
  1873. CREATE PROCEDURE lin_LoadPledgeExtendInfo
  1874.     -- Add the parameters for the stored procedure here
  1875.     @pledge_id AS INT
  1876. AS
  1877. BEGIN
  1878.     -- SET NOCOUNT ON added to prevent extra result sets from
  1879.     -- interfering with SELECT statements.
  1880.     SET NOCOUNT ON;
  1881.  
  1882.     -- Insert statements for procedure here
  1883. SELECT [reputation_points]
  1884.       ,[Rank1]
  1885.       ,[Rank2]
  1886.       ,[Rank3]
  1887.       ,[Rank4]
  1888.       ,[Rank5]
  1889.       ,[Rank6]
  1890.       ,[Rank7]
  1891.       ,[Rank8]
  1892.       ,[Rank9]
  1893.       ,[Skill0]
  1894.       ,[Skill1]
  1895.       ,[Skill2]
  1896.       ,[Skill3]
  1897.       ,[Skill4]
  1898.       ,[Skill5]
  1899.       ,[Skill6]
  1900.       ,[Skill7]
  1901.       ,[Skill8]
  1902.       ,[Skill9]
  1903.       ,[Skill10]
  1904.       ,[Skill11]
  1905.       ,[Skill12]
  1906.       ,[Skill13]
  1907.       ,[Skill14]
  1908.       ,[Skill15]
  1909.       ,[Skill16]
  1910.       ,[Skill17]
  1911.       ,[Skill18]
  1912.       ,[Skill19]
  1913.       ,[Skill20]
  1914.       ,[Skill21]
  1915.   FROM [lin2world].[dbo].[pledge_ext] WHERE [pledge_id] = @pledge_id
  1916. END
  1917. GO
  1918.  
  1919. USE lin2world
  1920. GO
  1921.  
  1922. SET ANSI_NULLS ON
  1923. GO
  1924. SET QUOTED_IDENTIFIER ON
  1925. GO
  1926. -- =============================================
  1927. -- Author:      Vanganth
  1928. -- Create date:
  1929. -- Description: Procedure for new func RequestLoadPledgeExtendInfo
  1930. -- =============================================
  1931. CREATE PROCEDURE lin_LoadSubPledges
  1932.     -- Add the parameters for the stored procedure here
  1933.     @pledge_id AS INT
  1934. AS
  1935. BEGIN
  1936.     -- SET NOCOUNT ON added to prevent extra result sets from
  1937.     -- interfering with SELECT statements.
  1938.     SET NOCOUNT ON;
  1939.  
  1940.     -- Insert statements for procedure here
  1941. IF(@pledge_id <> 0)
  1942. BEGIN
  1943. SELECT TOP 7 pledge_type, sub_name, leader_name, leader_dbid  FROM pledge_subpledge (nolock) WHERE pledge_id = @pledge_id AND pledge_type != 0
  1944. END
  1945. END
  1946. GO
  1947.  
  1948. SET ANSI_NULLS ON
  1949. GO
  1950. SET QUOTED_IDENTIFIER ON
  1951. GO
  1952. USE [lin2world]
  1953. GO
  1954. -- =============================================
  1955. -- Author:      Vanganth
  1956. -- Create date:
  1957. -- Description: Procedure for new func RequestRenameSubPledge
  1958. -- =============================================
  1959. CREATE PROCEDURE lin_RenameSubPledge
  1960.     -- Add the parameters for the stored procedure here
  1961.     @pledge_id AS INT,
  1962.     @pledge_type AS INT,
  1963.     @sub_name AS nvarchar(50)
  1964. AS
  1965. BEGIN
  1966.     -- SET NOCOUNT ON added to prevent extra result sets from
  1967.     -- interfering with SELECT statements.
  1968.     SET NOCOUNT ON;
  1969.  
  1970.  
  1971. IF(@pledge_id<>0)
  1972. BEGIN
  1973.     IF(@pledge_type = -1)
  1974.     BEGIN
  1975.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1976.     END
  1977. ELSE IF(@pledge_type = 100)
  1978.     BEGIN
  1979.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1980.     END
  1981. ELSE IF(@pledge_type = 200)
  1982.     BEGIN
  1983.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1984.     END
  1985. ELSE IF(@pledge_type = 1001)
  1986.     BEGIN
  1987.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1988.     END
  1989. ELSE IF(@pledge_type = 1002)
  1990.     BEGIN
  1991.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1992.     END
  1993. ELSE IF(@pledge_type = 2001)
  1994.     BEGIN
  1995.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  1996.     END
  1997. ELSE IF(@pledge_type = 2002)
  1998.     BEGIN
  1999.         UPDATE [lin2world].[dbo].[pledge_subpledge] SET sub_name = @sub_name WHERE pledge_id = @pledge_id AND pledge_type = @pledge_type
  2000.     END
  2001. END
  2002.  
  2003. END
  2004. GO
  2005.  
  2006. SET ANSI_NULLS ON
  2007. GO
  2008. SET QUOTED_IDENTIFIER ON
  2009. GO
  2010. USE [lin2world]
  2011. GO
  2012. -- =============================================
  2013. -- Author:      Vanganth
  2014. -- Create date:
  2015. -- Description: Procedure for new func RequestReorganizeMember
  2016. -- =============================================
  2017. CREATE PROCEDURE lin_ReorganizePledgeMember
  2018.     -- Add the parameters for the stored procedure here
  2019.     @char_name AS nvarchar(50),
  2020.     @pledge_type AS INT,
  2021.     @pledge_id AS INT
  2022.  
  2023. AS
  2024. BEGIN
  2025.  
  2026.     SET NOCOUNT ON;
  2027.  
  2028. UPDATE [lin2world].[dbo].[user_data] SET [PledgeType] = @pledge_type WHERE ([char_name] = @char_name AND [pledge_id] = @pledge_id)
  2029. SELECT [char_id] FROM [lin2world].[dbo].[user_data] WHERE [char_name] = @char_name
  2030.  
  2031. END
  2032. GO
  2033.  
  2034. SET ANSI_NULLS ON
  2035. GO
  2036. SET QUOTED_IDENTIFIER ON
  2037. GO
  2038. USE [lin2world]
  2039. GO
  2040. -- =============================================
  2041. -- Author:      Vanganth
  2042. -- Create date:
  2043. -- Description: Procedure for Running Delegate clan master procedure for each pledge
  2044. -- =============================================
  2045. CREATE PROCEDURE lin_RunDelegateClanMaster
  2046. AS
  2047.  
  2048. SET NOCOUNT ON;
  2049. DECLARE
  2050. @pledge_id INT
  2051. DECLARE CUR1 CURSOR FOR
  2052. SELECT [pledge_id] FROM lin2world.dbo.Pledge WHERE [delegate_clid] > 0
  2053. OPEN CUR1
  2054. FETCH NEXT FROM CUR1
  2055. INTO @pledge_id
  2056. WHILE (@@FETCH_STATUS <> -1)
  2057. BEGIN
  2058. EXEC lin2world.dbo.[lin_DelegateClanMaster] @pledge_id
  2059. FETCH NEXT FROM CUR1
  2060. INTO @pledge_id
  2061. END
  2062. CLOSE CUR1
  2063. DEALLOCATE CUR1
  2064. GO
  2065.  
  2066. SET ANSI_NULLS ON
  2067. GO
  2068. SET QUOTED_IDENTIFIER ON
  2069. GO
  2070. USE [lin2world]
  2071. GO
  2072. -- =============================================
  2073. -- Author:      Vanganth
  2074. -- Create date:
  2075. -- Description: Procedure for new func RequestSetPledgePrivilege
  2076. -- =============================================
  2077. CREATE PROCEDURE lin_SetPledgePrivilege
  2078.     -- Add the parameters for the stored procedure here
  2079.     @pledge_id AS INT,
  2080.     @rank AS INT,
  2081.     @privilege AS INT
  2082. AS
  2083. BEGIN
  2084.     -- SET NOCOUNT ON added to prevent extra result sets from
  2085.     -- interfering with SELECT statements.
  2086.     SET NOCOUNT ON;
  2087.  
  2088.  
  2089. IF(@rank > 0 AND @rank < 10)
  2090. BEGIN
  2091.     IF(@rank = 1)
  2092.     BEGIN
  2093.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank1]=@privilege WHERE [pledge_id] = @pledge_id
  2094.     END
  2095. ELSE IF(@rank = 2)
  2096.     BEGIN
  2097.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank2]=@privilege WHERE [pledge_id] = @pledge_id
  2098.     END
  2099. ELSE IF(@rank = 3)
  2100.     BEGIN
  2101.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank3]=@privilege WHERE [pledge_id] = @pledge_id
  2102.     END
  2103. ELSE IF(@rank = 4)
  2104.     BEGIN
  2105.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank4]=@privilege WHERE [pledge_id] = @pledge_id
  2106.     END
  2107. ELSE IF(@rank = 5)
  2108.     BEGIN
  2109.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank5]=@privilege WHERE [pledge_id] = @pledge_id
  2110.     END
  2111. ELSE IF(@rank = 6)
  2112.     BEGIN
  2113.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank6]=@privilege WHERE [pledge_id] = @pledge_id
  2114.     END
  2115. ELSE IF(@rank = 7)
  2116.     BEGIN
  2117.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank7]=@privilege WHERE [pledge_id] = @pledge_id
  2118.     END
  2119. ELSE IF(@rank = 8)
  2120.     BEGIN
  2121.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank8]=@privilege WHERE [pledge_id] = @pledge_id
  2122.     END
  2123. ELSE IF(@rank = 9)
  2124.     BEGIN
  2125.         UPDATE [lin2world].[dbo].[pledge_ext] SET [Rank9]=@privilege WHERE [pledge_id] = @pledge_id
  2126.     END
  2127. END
  2128.  
  2129. END
  2130. GO
  2131.  
  2132. SET ANSI_NULLS ON
  2133. GO
  2134. SET QUOTED_IDENTIFIER ON
  2135. GO
  2136. USE [lin2world]
  2137. GO
  2138. -- =============================================
  2139. -- Author:      Vanganth
  2140. -- Create date:
  2141. -- Description: Procedure for new func RequestSetSubCaptain
  2142. -- =============================================
  2143. CREATE PROCEDURE lin_SetSubCaptain
  2144.     -- Add the parameters for the stored procedure here
  2145.     @pledge_id AS INT,
  2146.     @pledge_type AS INT,
  2147.     @captain_name AS nvarchar(50),
  2148.     @captain_id AS INT
  2149. AS
  2150. BEGIN
  2151.     -- SET NOCOUNT ON added to prevent extra result sets from
  2152.     -- interfering with SELECT statements.
  2153.     SET NOCOUNT ON;
  2154.  
  2155.  
  2156. IF(@pledge_id<>0)
  2157. BEGIN
  2158.     UPDATE [lin2world].[dbo].[pledge_subpledge] SET [leader_name]=@captain_name, [leader_dbid]=@captain_id WHERE ([pledge_id]=@pledge_id AND [pledge_type] = @pledge_type)
  2159. END
  2160.  
  2161. END
  2162. GO
  2163.  
  2164. USE lin2world
  2165. GO
  2166.  
  2167. ALTER TABLE dbo.user_item ADD
  2168.     mana_left INT NOT NULL DEFAULT 0
  2169. GO
  2170.  
  2171. USE lin2world
  2172. GO
  2173.  
  2174. ALTER  TABLE user_data ADD
  2175.     effective_mana0 INT NOT NULL DEFAULT 0,
  2176.     effective_mana1 INT NOT NULL DEFAULT 0,
  2177.     effective_mana2 INT NOT NULL DEFAULT 0,
  2178.     effective_mana3 INT NOT NULL DEFAULT 0
  2179. GO
  2180.  
  2181. ALTER TABLE user_item
  2182. ADD life_time INT NOT NULL DEFAULT 0
  2183. GO
  2184.  
  2185. CREATE TABLE NpcDeath
  2186.     (
  2187.     npc_class_id INT NOT NULL,
  2188.     death_time INT NOT NULL
  2189.     )
  2190.    
  2191. GO
  2192.  
  2193. ALTER  TABLE user_data ADD
  2194.     vip_level INT NOT NULL DEFAULT 0,
  2195.     vip_timestamp INT NOT NULL DEFAULT 0
  2196. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement