你懂的
CREATE procedure [dbo].[SLLEO_ToKarus]
@Account char(30)
AS DECLARE @clannumber smallint, @length int,@row int,@i int,@dwid int,@pos int,@dur int,@dur1 int,@ext int,@StackSize1 int,@strName varchar(30),@strExtName varchar(30),@Cdwid varbinary(4),@cdur varchar(2),@cstack varchar(2)
begin tran
declare @char1 varchar(21)
set @char1 = (select strcharid1 from account_char where straccountid = @account)
declare @char2 varchar(21)
set @char2 = (select strcharid2 from account_char where straccountid = @account)
declare @char3 varchar(21)
set @char3 = (select strcharid3 from account_char where straccountid = @account)
declare @clannumber1 smallint
set @clannumber1 = (select idnum from knights where chief = @char1)
declare @clannumber2 smallint
set @clannumber2 = (select idnum from knights where chief = @char2)
declare @clannumber3 smallint
set @clannumber3 = (select idnum from knights where chief = @char3)
update account_char set bnation = '1' where bnation = '2' and straccountid = @Account
update userdata set nation = '1' where nation = '2' and struserid = @char1
Update userdata set race = '1' where race = '11' and class in ('201','205','206') and struserid = @char1
Update userdata set race = '1' where race = '12' and class in ('201','205','206') and struserid = @char1
Update userdata set race = '1' where race = '13' and class in ('201','205','206') and struserid = @char1
Update userdata set race = '2' where race = '12' and class in ('207','211','202','204','212','208') and struserid = @char1
update userdata set race = '2' where race = '13' and class in ('202','207','208') and struserid = @char1
update userdata set race = '3' where race = '12' and class in ('203','209','210') and struserid = @char1
update userdata set race = '3' where race = '13' and class in ('203','209','210') and struserid = @char1
update userdata set race = '4' where race = '13' and class in ('204','211','212') and struserid = @char1
update userdata set class = '105' where class = '205' and struserid = @char1
update userdata set class = '107' where class = '207' and struserid = @char1
update userdata set class = '109' where class = '209' and struserid = @char1
update userdata set class = '111' where class = '211' and struserid = @char1
update userdata set class = '101' where class = '201' and struserid = @char1
update userdata set class = '102' where class = '202' and struserid = @char1
update userdata set class = '103' where class = '203' and struserid = @char1
update userdata set class = '104' where class = '204' and struserid = @char1
update userdata set class = '112' where class = '212' and struserid = @char1
update userdata set class = '106' where class = '206' and struserid = @char1
update userdata set class = '108' where class = '208' and struserid = @char1
update userdata set class = '110' where class = '210' and struserid = @char1
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char1
update userdata set nation = '1' where nation = '2' and struserid = @char2
Update userdata set race = '1' where race = '11' and class in ('201','205','206') and struserid = @char2
Update userdata set race = '1' where race = '12' and class in ('201','205','206') and struserid = @char2
Update userdata set race = '1' where race = '13' and class in ('201','205','206') and struserid = @char2
Update userdata set race = '2' where race = '12' and class in ('207','211','202','204','212','208') and struserid = @char2
update userdata set race = '2' where race = '13' and class in ('202','207','208') and struserid = @char2
update userdata set race = '3' where race = '12' and class in ('203','209','210') and struserid = @char2
update userdata set race = '3' where race = '13' and class in ('203','209','210') and struserid = @char2
update userdata set race = '4' where race = '13' and class in ('204','211','212') and struserid = @char2
update userdata set class = '105' where class = '205' and struserid = @char2
update userdata set class = '107' where class = '207' and struserid = @char2
update userdata set class = '109' where class = '209' and struserid = @char2
update userdata set class = '111' where class = '211' and struserid = @char2
update userdata set class = '101' where class = '201' and struserid = @char2
update userdata set class = '102' where class = '202' and struserid = @char2
update userdata set class = '103' where class = '203' and struserid = @char2
update userdata set class = '104' where class = '204' and struserid = @char2
update userdata set class = '112' where class = '212' and struserid = @char2
update userdata set class = '106' where class = '206' and struserid = @char2
update userdata set class = '108' where class = '208' and struserid = @char2
update userdata set class = '110' where class = '210' and struserid = @char2
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char2
update userdata set nation = '1' where nation = '2' and struserid = @char3
Update userdata set race = '1' where race = '11' and class in ('201','205','206') and struserid = @char3
Update userdata set race = '1' where race = '12' and class in ('201','205','206') and struserid = @char3
Update userdata set race = '1' where race = '13' and class in ('201','205','206') and struserid = @char3
Update userdata set race = '2' where race = '12' and class in ('207','211','202','204','212','208') and struserid = @char3
update userdata set race = '2' where race = '13' and class in ('202','207','208') and struserid = @char3
update userdata set race = '3' where race = '12' and class in ('203','209','210') and struserid = @char3
update userdata set race = '3' where race = '13' and class in ('203','209','210') and struserid = @char3
update userdata set race = '4' where race = '13' and class in ('204','211','212') and struserid = @char3
update userdata set class = '105' where class = '205' and struserid = @char3
update userdata set class = '107' where class = '207' and struserid = @char3
update userdata set class = '109' where class = '209' and struserid = @char3
update userdata set class = '111' where class = '211' and struserid = @char3
update userdata set class = '101' where class = '201' and struserid = @char3
update userdata set class = '102' where class = '202' and struserid = @char3
update userdata set class = '103' where class = '203' and struserid = @char3
update userdata set class = '104' where class = '204' and struserid = @char3
update userdata set class = '112' where class = '212' and struserid = @char3
update userdata set class = '106' where class = '206' and struserid = @char3
update userdata set class = '108' where class = '208' and struserid = @char3
update userdata set class = '110' where class = '210' and struserid = @char3
update userdata set zone = '21',bind = '-1',px = '31900',pz = '40100',py = '0' where struserid = @char3
Update knights set nation = '1' where nation = '2' and chief = @char1
Update knights set nation = '1' where nation = '2' and chief = @char2
Update knights set nation = '1' where nation = '2' and chief = @char3
commit tran
GO
|