mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-10 07:05:41 +12:00
Fix arena bugs
This commit is contained in:
parent
7feec48b0c
commit
ebb5b0edf8
2 changed files with 14 additions and 5 deletions
|
@ -185,13 +185,19 @@ namespace HISP.Game
|
||||||
entry.EnteredUser.LoggedinClient.SendPacket(startingUpEventPacket);
|
entry.EnteredUser.LoggedinClient.SendPacket(startingUpEventPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
arenaTimeout = new Timer(new TimerCallback(ArenaTimedOut), null, Timeout * 60 * 1000, Timeout * 60 * 1000);
|
arenaTimeout = new Timer(new TimerCallback(arenaTimedOut), null, Timeout * 60 * 1000, Timeout * 60 * 1000);
|
||||||
|
|
||||||
foreach(World.SpecialTile tile in World.SpecialTiles)
|
updateWaitingPlayers();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateWaitingPlayers()
|
||||||
|
{
|
||||||
|
foreach (World.SpecialTile tile in World.SpecialTiles)
|
||||||
{
|
{
|
||||||
if (tile.Code == null)
|
if (tile.Code == null)
|
||||||
continue;
|
continue;
|
||||||
if(tile.Code.StartsWith("ARENA-"))
|
if (tile.Code.StartsWith("ARENA-"))
|
||||||
{
|
{
|
||||||
string arenaId = tile.Code.Split('-')[1];
|
string arenaId = tile.Code.Split('-')[1];
|
||||||
int id = int.Parse(arenaId);
|
int id = int.Parse(arenaId);
|
||||||
|
@ -201,7 +207,7 @@ namespace HISP.Game
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ArenaTimedOut(object state)
|
private void arenaTimedOut(object state)
|
||||||
{
|
{
|
||||||
End();
|
End();
|
||||||
}
|
}
|
||||||
|
@ -286,6 +292,7 @@ namespace HISP.Game
|
||||||
|
|
||||||
}
|
}
|
||||||
reset();
|
reset();
|
||||||
|
updateWaitingPlayers();
|
||||||
}
|
}
|
||||||
public void DeleteEntry(User user)
|
public void DeleteEntry(User user)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5965,6 +5965,9 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
forClient.LoggedinUser.MetaPriority = false;
|
||||||
|
|
||||||
string LocationStr = "";
|
string LocationStr = "";
|
||||||
if (!World.InSpecialTile(forClient.LoggedinUser.X, forClient.LoggedinUser.Y))
|
if (!World.InSpecialTile(forClient.LoggedinUser.X, forClient.LoggedinUser.Y))
|
||||||
{
|
{
|
||||||
|
@ -5986,7 +5989,6 @@ namespace HISP.Server
|
||||||
|
|
||||||
byte[] AreaMessage = PacketBuilder.CreateMetaPacket(LocationStr);
|
byte[] AreaMessage = PacketBuilder.CreateMetaPacket(LocationStr);
|
||||||
forClient.SendPacket(AreaMessage);
|
forClient.SendPacket(AreaMessage);
|
||||||
forClient.LoggedinUser.MetaPriority = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public static void UpdateStats(GameClient client)
|
public static void UpdateStats(GameClient client)
|
||||||
|
|
Loading…
Add table
Reference in a new issue