mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 21:25:42 +12:00
Fix arena EXP Rewards
This commit is contained in:
parent
c58326ffba
commit
ab62c65f13
4 changed files with 12 additions and 26 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 82cffb522d1ebdb3d4c00da52087461a8068fa36
|
||||
Subproject commit 0f9268907fb3cd9d0da9c8ab1cba8308de0e5656
|
|
@ -16,7 +16,7 @@ namespace HISP.Game
|
|||
private static List<Arena> arenas = new List<Arena>();
|
||||
private List<ArenaEntry> entries;
|
||||
private Timer arenaTimeout;
|
||||
|
||||
public static int[] ExpRewards;
|
||||
public int Id;
|
||||
public string Type;
|
||||
public int EntryCost;
|
||||
|
@ -247,23 +247,9 @@ namespace HISP.Game
|
|||
if(Mode == "COMPETING")
|
||||
{
|
||||
string chatMessage = Messages.ArenaResultsMessage;
|
||||
|
||||
|
||||
string[] avaliblePlacings = new string[6] { Messages.ArenaFirstPlace, Messages.ArenaSecondPlace, Messages.ArenaThirdPlace, Messages.ArenaFourthPlace, Messages.ArenaFifthPlace, Messages.ArenaSixthPlace };
|
||||
|
||||
int[] expRewards = new int[Entries.Length];
|
||||
expRewards[0] = 1;
|
||||
int expAwardMul = 1;
|
||||
for(int i = 1; i < Entries.Length; i++)
|
||||
{
|
||||
expRewards[i] = 2 * expAwardMul;
|
||||
|
||||
if (expAwardMul == 1)
|
||||
expAwardMul = 2;
|
||||
else
|
||||
expAwardMul += 2;
|
||||
}
|
||||
|
||||
expRewards = expRewards.ToArray().Reverse().ToArray();
|
||||
int[] expRewards = ExpRewards.ToArray().Reverse().ToArray();
|
||||
|
||||
int place = 0;
|
||||
ArenaEntry[] winners = Entries.OrderByDescending(o => o.SubmitScore).ToArray();
|
||||
|
|
|
@ -514,8 +514,6 @@ namespace HISP.Server
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if(!(e is SocketException))
|
||||
Logger.ErrorPrint("Exception occured: " + e.Message);
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -734,16 +734,18 @@ namespace HISP.Server
|
|||
int totalArenas = gameData.arena.Count;
|
||||
for (int i = 0; i < totalArenas; i++)
|
||||
{
|
||||
int arenaId = gameData.arena[i].arena_id;
|
||||
string arenaType = gameData.arena[i].arena_type;
|
||||
int arenaEntryCost = gameData.arena[i].entry_cost;
|
||||
int raceEvery = gameData.arena[i].race_every;
|
||||
int slots = gameData.arena[i].slots;
|
||||
int timeout = gameData.arena[i].timeout;
|
||||
int arenaId = gameData.arena.arena_list[i].arena_id;
|
||||
string arenaType = gameData.arena.arena_list[i].arena_type;
|
||||
int arenaEntryCost = gameData.arena.arena_list[i].entry_cost;
|
||||
int raceEvery = gameData.arena.arena_list[i].race_every;
|
||||
int slots = gameData.arena.arena_list[i].slots;
|
||||
int timeout = gameData.arena.arena_list[i].timeout;
|
||||
|
||||
Arena arena = new Arena(arenaId, arenaType, arenaEntryCost, raceEvery, slots, timeout);
|
||||
Logger.DebugPrint("Registered Arena: " + arena.Id.ToString() + " as " + arena.Type);
|
||||
}
|
||||
Arena.ExpRewards = gameData.arena.arena_exp.ToObject<int[]>();
|
||||
|
||||
// Register Leaser
|
||||
int totalLeasers = gameData.leaser.Count;
|
||||
for (int i = 0; i < totalLeasers; i++)
|
||||
|
|
Loading…
Add table
Reference in a new issue