用户登录  | 
首 页技术文章软件发布广告价格
当前位置:传奇游戏服务端下载站传奇站长论坛资源网站程序技术文章文章资讯游戏架设教程奇迹技术

奇迹私服完美解决罗兰卡号问题

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2014-10-03 19:50:19
1、修改WZ_CONNECT_MEMB储存过程,用下面代码替换:CREATE   PROCEDURE WZ_CONNECT_MEMB
@uid varchar(10),
@server varchar(20),
@uip varchar(20)
ASBegin
BEGIN TRANSACTION
SET NOCOUNT ON
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED) WHERE memb___id = @uid )
Begin
UPDATE MEMB_STAT
SET ip = @uip , connectstat = 1 , servername = @server , ConnectTM = (getdate())
WHERE memb___id = @uid
End
ELSE
Begin
INSERT INTO MEMB_STAT ( memb___id,ip,connectstat,servername)
valueS (@uid,@uip,1,@server )
End
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
--写入登录记录
IF EXISTS ( SELECT UserID FROM UserLogin WITH (READUNCOMMITTED) WHERE UserID = @uid )
Begin
UPDATE UserLogin
SET = (getdate()),OnlineSec=0,GiveMoney=0,logoutTM=null
WHERE UserID = @uid
End
ELSE
Begin
INSERT INTO UserLogin (UserID,LoginIP,Server,LoginTM,OnlineSec,GiveMoney)
values (@uid,@uip,@server,getdate(),0,0)
End
--自动封不准进入的人物
declare @SmallestZS int
declare @LargestZS int
declare @Type int
select @Type=Type from SetServerList where (@Type>0) begin
select @SmallestZS=Smallest_ZS from SetServerList where
select @LargestZS=Largest_ZS from SetServerList where
if not (@SmallestZS is null) begin
update character set ctlcode=(ctlcode | 0x81) where [name] not in
(
SELECT NAME FROM WEB_ZS WHERE (ACC = @uid) AND (ZSCS >= @LargestZS) AND (ZSCS <= @SmallestZS)
) AND (AccountID = @uid)
end
end
UPDATE [Character] SET MapNumber = 0, MapPosX = 130, MapPosY = 130 WHERE (MapNumber = 30) AND (AccountID = @uid) OR (MapNumber = 31) AND (AccountID = @uid)
SET NOCOUNT OFF
End
GO
------------------------------------------------------------------------
2、新建立Character的触发器:CREATE TRIGGER 小退自救
ON Character
AFTER UPDATE
AS
BEGIN
  SET NOCOUNT ON;  UPDATE Character
    SET   MapNumber = 0   --要去的地图号
      , MapPosX = 130   --要去的X坐标 dedecms.com
      , MapPosY = 130   --要去的Y坐标  FROM Inserted
    WHERE Inserted.Name = Character.Name
      and Inserted.MapNumber = 30   --会卡住的地图号
    or
      Inserted.Name = Character.Name
      and Inserted.MapNumber = 31   --会卡住的地图号
END

Tags:

作者:佚名

文章评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
传奇资源网提供最新传奇开区一条龙版本下载,本站声明:只更新最新最好的传奇服务端分享给大家。