mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 21:25:42 +12:00
Add arena failed to join text
This commit is contained in:
parent
7815ffc630
commit
b4350d1e5f
5 changed files with 21 additions and 7 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 2135825724166a05c6fabc0d7550f712aeada1fc
|
||||
Subproject commit 98f385f4adaad7e58d265001f4f109869ca9c88d
|
|
@ -348,7 +348,15 @@ namespace HISP.Game
|
|||
public void AddEntry(User user, HorseInstance horse)
|
||||
{
|
||||
if (Entries.Length + 1 > Slots)
|
||||
return;
|
||||
{
|
||||
if (Entries.Length + 1 > Slots)
|
||||
{
|
||||
byte[] enterFailed = PacketBuilder.CreateChat(Messages.ArenaFullErrorMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
user.LoggedinClient.SendPacket(enterFailed);
|
||||
GameServer.UpdateArea(user.LoggedinClient);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!UserHasHorseEntered(user))
|
||||
{
|
||||
|
@ -357,6 +365,14 @@ namespace HISP.Game
|
|||
arenaEntry.EnteredHorse = horse;
|
||||
entries.Add(arenaEntry);
|
||||
}
|
||||
|
||||
user.TakeMoney(EntryCost);
|
||||
|
||||
byte[] enteredIntoCompetition = PacketBuilder.CreateChat(Messages.ArenaEnteredInto, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
user.LoggedinClient.SendPacket(enteredIntoCompetition);
|
||||
GameServer.UpdateAreaForAll(user.X, user.Y, true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public static Arena GetArenaUserEnteredIn(User user)
|
||||
|
|
|
@ -333,6 +333,7 @@ namespace HISP.Game
|
|||
public static string ArenaNeedsVet;
|
||||
|
||||
public static string ArenaEventNameFormat;
|
||||
public static string ArenaFullErrorMessage;
|
||||
|
||||
public static string ArenaCurrentlyTakingEntriesFormat;
|
||||
public static string ArenaCompetitionInProgress;
|
||||
|
|
|
@ -1255,6 +1255,8 @@ namespace HISP.Server
|
|||
Messages.ArenaYouHaveHorseEntered = gameData.messages.meta.arena.horse_entered;
|
||||
Messages.ArenaCompetitionFull = gameData.messages.meta.arena.competiton_full;
|
||||
|
||||
Messages.ArenaFullErrorMessage = gameData.messages.meta.arena.arena_join_fail_full;
|
||||
|
||||
Messages.ArenaEnterHorseFormat = gameData.messages.meta.arena.enter_horse;
|
||||
Messages.ArenaCurrentCompetitors = gameData.messages.meta.arena.current_competitors;
|
||||
Messages.ArenaCompetingHorseFormat = gameData.messages.meta.arena.competing_horses;
|
||||
|
|
|
@ -1678,11 +1678,6 @@ namespace HISP.Server
|
|||
if (sender.LoggedinUser.Money >= arena.EntryCost)
|
||||
{
|
||||
arena.AddEntry(sender.LoggedinUser, horseInstance);
|
||||
sender.LoggedinUser.TakeMoney(arena.EntryCost);
|
||||
|
||||
byte[] enteredIntoCompetition = PacketBuilder.CreateChat(Messages.ArenaEnteredInto, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
sender.SendPacket(enteredIntoCompetition);
|
||||
UpdateAreaForAll(sender.LoggedinUser.X, sender.LoggedinUser.Y, true);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue