37 lines
1022 B
C#
37 lines
1022 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using GTANetworkAPI;
|
|
using System.Linq;
|
|
using ReallifeGamemode.Database.Entities;
|
|
|
|
namespace ReallifeGamemode.Server.WeaponDeal
|
|
{
|
|
public class WeaponDealPoints
|
|
{
|
|
public static Dictionary<int, int> factionWeaponDeal = new Dictionary<int, int>();
|
|
|
|
|
|
private static readonly IReadOnlyCollection<Vector3> WT_Route = new List<Vector3>
|
|
{
|
|
new Vector3(2465.163, 1589.396, 32.72029),
|
|
new Vector3(1532.045, 1702.775, 109.7561),
|
|
new Vector3(58.67861, 3717.103, 39.75301),
|
|
new Vector3(-2174.734, 4269.301, 48.95574)
|
|
}.AsReadOnly();
|
|
|
|
public static Vector3 getRndWD_Route(int factionID)
|
|
{
|
|
if (!factionWeaponDeal.ContainsKey(factionID))
|
|
return null;
|
|
|
|
if(factionWeaponDeal[factionID] == -1)
|
|
{
|
|
Random rnd = new Random();
|
|
factionWeaponDeal[factionID] = rnd.Next(0, WT_Route.Count - 1);
|
|
}
|
|
return WT_Route.ElementAt(factionWeaponDeal[factionID]);
|
|
}
|
|
}
|
|
}
|