家把数据库的存储过程 USPGetGuildMaxMember修改如下:
CREATE proc [USPGetGuildMaxMember] @strGuildName varchar(12)
as
declare @dwFame int
declare @charid varchar(12)
select top 1 @charid =Charid from TblGuildmemberinfo where guildname = @strguildname and rank = 13
if @charid is null
begin
return 0
end
select @dwFame = charfame from charinfo_base
where charid = @charid
if ( @dwFame >= 10000000000 )
begin
return 2500
end
else if ( @dwFame >= 775802843 )
begin
return 320
end
else if ( @dwFame >= 518607956 )
begin
return 260
end
else if ( @dwFame >= 323140256 )
begin
return 210
end
else if ( @dwFame >= 188888956 )
begin
return 170
end
else if ( @dwFame >= 101502056 )
begin
return 130
end
else if ( @dwFame >= 39414931 )
begin
return 100
end
else if ( @dwFame >= 22703119 )
begin
return 70
end
else if ( @dwFame >= 14132968 )
begin
return 50
end
else if ( @dwFame >= 1001348 )
begin
return 30
end
else if ( @dwFame >= 320008 )
begin
return 20
end
else if ( @dwFame >= 80373 )
begin
return 10
end
else
begin
return 100
end
GO
(责任编辑:100sf) |