Guest User

Untitled

a guest
Feb 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 3.60 KB | None | 0 0
  1. ALTER PROCEDURE [dbo].[WZ_ServerGetPrices]
  2. AS
  3. BEGIN
  4.     SET NOCOUNT ON;
  5.  
  6.     SELECT 0 AS ResultCode
  7.    
  8.     -- GAMESERVER prices
  9.     SELECT
  10.         0           AS 'Base_US',       -- 8500 base price per server per month in US region. 0 if region is disabled
  11.         80000   AS 'Base_EU',       -- 8500 base price per server per month in europe region. 0 if region is disabled
  12.         0           AS 'Base_RU',       -- 8500 base price per server per month in russian region. 0 if region is disabled
  13.         90000   AS 'Base_SA',       -- South america. Should be 3x price of US\EU server due to high cost of renting server equipment in Brazil
  14.         -- percents of base price per each option
  15.         0       AS 'PVE',
  16.         0       AS 'PVP',
  17.         800     AS 'Slot1',         -- 10 plr
  18.         1200        AS 'Slot2',         -- 20 plr
  19.         -10     AS 'Slot3',         -- 30 plr
  20.         -10     AS 'Slot4',         -- 40 plr
  21.         -10     AS 'Slot5',         -- 50 plr
  22.         0       AS 'Passworded',
  23.         0       AS 'MonthX2',       --
  24.         -10     AS 'MonthX3',       --
  25.         -15     AS 'MonthX6',
  26.         -70     AS 'WeekX1', -- for renting one week only
  27.         0       AS 'OptNameplates',
  28.         0       AS 'OptCrosshair',
  29.         0       AS 'OptTracers'
  30.        
  31.     -- STRONGHOLD prices
  32.     SELECT
  33.         0       AS 'Base_US',       -- base price per server per month in US region. 0 if region is disabled
  34.         0       AS 'Base_EU',       -- base price per server per month in europe region. 0 if region is disabled
  35.         0       AS 'Base_RU',       -- base price per server per month in russian region. 0 if region is disabled
  36.         0       AS 'Base_SA',
  37.         -- percents of base price per each option
  38.         0       AS 'PVE',
  39.         0       AS 'PVP',
  40.         0       AS 'Slot1',         -- 10 plr
  41.         50      AS 'Slot2',         -- 20 plr
  42.         100     AS 'Slot3',         -- 30 plr
  43.         150     AS 'Slot4',         -- 40 plr
  44.         200     AS 'Slot5',         -- 50 plr
  45.         0       AS 'Passworded',
  46.         0       AS 'MonthX2',       --
  47.         0       AS 'MonthX3',       --
  48.         0       AS 'MonthX6',
  49.         -40     AS 'WeekX1', -- for renting one week only
  50.         0       AS 'OptNameplates',
  51.         0       AS 'OptCrosshair',
  52.         0       AS 'OptTracers'
  53.        
  54.     -- games CAPACITY report
  55.     DECLARE @Games_US INT = 0
  56.     DECLARE @Games_EU INT = 0
  57.     DECLARE @Games_RU INT = 0
  58.     DECLARE @Games_SA INT = 0
  59.     SELECT @Games_US = COUNT(*) FROM ServersList WHERE ServerRegion=1  AND WorkHours<RentHours AND ServerMap<>3
  60.     SELECT @Games_EU = COUNT(*) FROM ServersList WHERE ServerRegion=10 AND WorkHours<RentHours AND ServerMap<>3
  61.     SELECT @Games_RU = COUNT(*) FROM ServersList WHERE ServerRegion=20 AND WorkHours<RentHours AND ServerMap<>3
  62.     SELECT @Games_SA = COUNT(*) FROM ServersList WHERE ServerRegion=30 AND WorkHours<RentHours AND ServerMap<>3
  63.  
  64.     SELECT
  65.         -- modify numbers here. 1st is global server capacity. 2nd is our HOSTED server number
  66.         -- mul by 2 as with hibernate we can support more servers now
  67.         (650*4) - 0 AS 'Capacity_US', @Games_US AS 'Games_US',
  68.         (50*1) - 0 AS 'Capacity_EU', @Games_EU AS 'Games_EU',
  69.         (50*4)      AS 'Capacity_RU', @Games_RU AS 'Games_RU',
  70.         (100*3) - 0  AS 'Capacity_SA', @Games_SA AS 'Games_SA'
  71.  
  72.     -- strongholds CAPACITY report
  73.     SELECT @Games_US = COUNT(*) FROM ServersList WHERE ServerRegion=1  AND WorkHours<RentHours AND ServerMap=3
  74.     SELECT @Games_EU = COUNT(*) FROM ServersList WHERE ServerRegion=10 AND WorkHours<RentHours AND ServerMap=3
  75.     SELECT @Games_RU = COUNT(*) FROM ServersList WHERE ServerRegion=20 AND WorkHours<RentHours AND ServerMap=3
  76.     SELECT @Games_SA = COUNT(*) FROM ServersList WHERE ServerRegion=30 AND WorkHours<RentHours AND ServerMap=3
  77.  
  78.     SELECT
  79.         -- modify numbers here. 1st is global server capacity. 2nd is our HOSTED server number
  80.         -- mul by 4 as with hibernate we can support more servers now
  81.         (650*4) - 0 AS 'Capacity_US', @Games_US AS 'Games_US',
  82.         (50*1) - 0 AS 'Capacity_EU', @Games_EU AS 'Games_EU',
  83.         (50*4)      AS 'Capacity_RU', @Games_RU AS 'Games_RU',
  84.         (100*3) - 0  AS 'Capacity_SA', @Games_SA AS 'Games_SA'
  85.        
  86. END
Add Comment
Please, Sign In to add comment