mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
push becaz im tired (probably crashes...)
This commit is contained in:
parent
905dc1a6ce
commit
cc22dbcf0b
10 changed files with 395 additions and 5 deletions
|
@ -212,8 +212,10 @@
|
|||
"hammock":"You and all of your horses have fully rested.",
|
||||
"auction":{
|
||||
"auctions_running":"The following auctions are running:<BR>",
|
||||
"auction_horse_entry":"^I252^T8%USERNAME%'s %COLOR% %BREED% %GENDER% (%EXP%exp)^B3L%RANDOMID%^R1^T8In %TIME%m going to %WINNINGPLAYER% for $%WINNINGBID%^R1^B72%RANDOMID%^B73%RANDOMID%^B74%RANDOMID%^B75%RANDOMID%^B76%RANDOMID%^B77%RANDOMID%^B78%RANDOMID%^R1",
|
||||
"players_here":"^HPlayers Here: %USERNAMES%",
|
||||
"auction_horse_entry":"^I252^T8%USERNAME%'s %COLOR% %BREED% %GENDER% (%EXP%exp)^B3L%RANDOMID%^R1",
|
||||
"going_to":"^T8In %TIME%m going to %WINNINGPLAYER% for $%WINNINGBID%^R1^B72%AUCTIONRANDOMID%^B73%AUCTIONRANDOMID%^B74%AUCTIONRANDOMID%^B75%AUCTIONRANDOMID%^B76%RANDOMID%^B77%AUCTIONRANDOMID%^B78%AUCTIONRANDOMID%^R1",
|
||||
"not_sold":"^T8Auction Ended. Horse was not sold.",
|
||||
"auction_horse":"^T0(2b max)^D41|AUCTION A HORSE^R1",
|
||||
|
||||
"list_horse":"^HIt costs you $1,000 to auction. If you wish to set a minimum bid for your horse, bid on it yourself. All auctions run for 8 minutes.<BR>Select from one of your horses to auction:^R1",
|
||||
|
@ -226,6 +228,7 @@
|
|||
|
||||
"outbid_by":"You have been outbid by %USERNAME%. High bid is now $%AMOUNT%.",
|
||||
"cant_afford_bid":"You cannot afford that bid.",
|
||||
"cant_afford_listing":"You cannot afford the auction fee.",
|
||||
"brought_horse":"You bought a horse at auction for $%MONEY%",
|
||||
"no_one_brought":"No one bought your horse at auction.",
|
||||
"horse_sold":"You sold a horse at auction for $%MONEY%"
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace HISP.Game.Horse
|
|||
|
||||
return false;
|
||||
}
|
||||
public WildHorse(HorseInstance horse, int MapX = -1, int MapY = -1, int despawnTimeout=60, bool addToDatabase = true)
|
||||
public WildHorse(HorseInstance horse, int MapX = -1, int MapY = -1, int despawnTimeout=1440, bool addToDatabase = true)
|
||||
{
|
||||
Instance = horse;
|
||||
timeout = despawnTimeout;
|
||||
|
|
|
@ -13,7 +13,14 @@ namespace HISP.Game.Inventory
|
|||
{
|
||||
get
|
||||
{
|
||||
return horsesList.ToArray();
|
||||
List<HorseInstance> filteredHorseList = new List<HorseInstance>();
|
||||
foreach(HorseInstance horse in horsesList)
|
||||
{
|
||||
if (!horse.Hidden)
|
||||
filteredHorseList.Add(horse);
|
||||
}
|
||||
|
||||
return filteredHorseList.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,28 @@ namespace HISP.Game
|
|||
public static string ModIsleMessage;
|
||||
|
||||
// Auction House
|
||||
public static string AuctionCurrentRunning;
|
||||
public static string AuctionsRunning;
|
||||
public static string AuctionHorseEntryFormat;
|
||||
public static string AuctionPlayersHereFormat;
|
||||
|
||||
public static string AuctionAHorse;
|
||||
public static string AuctionListHorse;
|
||||
|
||||
public static string AuctionHorseListEntryFormat;
|
||||
public static string AuctionHorseIsTacked;
|
||||
|
||||
public static string AuctionBidRaisedFormat;
|
||||
public static string AuctionTopBid;
|
||||
public static string AuctionExistingBidHigher;
|
||||
|
||||
public static string AuctionYouveBeenOutbidFormat;
|
||||
public static string AuctionCantAffordBid;
|
||||
public static string AuctionCantAffordAuctionFee;
|
||||
|
||||
public static string AuctionYouBroughtAHorseFormat;
|
||||
public static string AuctionNoHorseBrought;
|
||||
|
||||
public static string AuctionHorseSoldFormat;
|
||||
|
||||
// Warp Command
|
||||
public static string SuccessfullyWarpedToLocation;
|
||||
|
@ -868,6 +888,37 @@ namespace HISP.Game
|
|||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatAuctionHorseSold(int money)
|
||||
{
|
||||
return AuctionHorseSoldFormat.Replace("%MONEY%", money.ToString("N0", CultureInfo.InvariantCulture));
|
||||
}
|
||||
public static string FormatAuctionBroughtHorse(int money)
|
||||
{
|
||||
return AuctionYouBroughtAHorseFormat.Replace("%MONEY%", money.ToString("N0", CultureInfo.InvariantCulture));
|
||||
}
|
||||
public static string FormatAuctionYourOutbidBy(string username, int amount)
|
||||
{
|
||||
return AuctionYouveBeenOutbidFormat.Replace("%USERNAME%", username).Replace("%AMOUNT%", amount.ToString("N0", CultureInfo.InvariantCulture));
|
||||
}
|
||||
public static string FormatAuctionBidRaised(int prevAmount, int newAmount)
|
||||
{
|
||||
return AuctionBidRaisedFormat.Replace("%AMOUNT%", prevAmount.ToString("N0", CultureInfo.InvariantCulture)).Replace("%NEWAMOUNT%", newAmount.ToString("N0", CultureInfo.InvariantCulture));
|
||||
}
|
||||
public static string FormatAuctionHorseListEntry(string horseName, bool tacked, int randomId)
|
||||
{
|
||||
return AuctionHorseListEntryFormat.Replace("%HORSENAME%", horseName).Replace("%TACKEDORNO%", tacked ? Messages.AuctionHorseIsTacked : "").Replace("%RANDOMID%", randomId.ToString());
|
||||
}
|
||||
public static string FormatAuctionHorseEntry(string username, string color, string breedName, string gender, int experience, int horseRandomId, int timeRemaining, string winningPlayer, int winningBid, int auctionRandomId)
|
||||
{
|
||||
return AuctionHorseEntryFormat.Replace("%USERNAME%", username).Replace("%COLOR%", color).Replace("%BREED%", breedName).Replace("%GENDER%", gender).Replace("%EXP%", experience.ToString("N0", CultureInfo.InvariantCulture)).Replace("%RANDOMID%", horseRandomId.ToString()).Replace("%TIME%", timeRemaining.ToString()).Replace("%WINNINGPLAYER%", winningPlayer).Replace("%WINNINGBID%", winningBid.ToString("N0", CultureInfo.InvariantCulture)).Replace("%AUCTIONRANDOMID%", auctionRandomId.ToString());
|
||||
|
||||
}
|
||||
public static string FormatAuctionPlayersHere(string usernames)
|
||||
{
|
||||
return AuctionPlayersHereFormat.Replace("%USERNAMES%", usernames);
|
||||
}
|
||||
|
||||
|
||||
public static string FormatHorseReturnedToOwner(string horseName)
|
||||
{
|
||||
return HorseLeaserReturnedToOwnerFormat.Replace("%HORSENAME%", horseName);
|
||||
|
|
|
@ -1444,6 +1444,46 @@ namespace HISP.Game
|
|||
|
||||
return message;
|
||||
}
|
||||
public static string BuildAuctionHorseList(User user)
|
||||
{
|
||||
string message = Messages.AuctionListHorse;
|
||||
foreach(HorseInstance horse in user.HorseInventory.HorseList)
|
||||
{
|
||||
if (horse.Leaser > 0)
|
||||
continue;
|
||||
if (horse.Category != "TRADING")
|
||||
continue;
|
||||
|
||||
bool tacked = (horse.Equipment.Saddle != null || horse.Equipment.SaddlePad != null || horse.Equipment.Bridle != null || horse.Equipment.Companion != null);
|
||||
|
||||
message += Messages.FormatAuctionHorseListEntry(horse.Name, tacked, horse.RandomId);
|
||||
}
|
||||
|
||||
message += Messages.BackToMap;
|
||||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
private static string buildAuction(User user, Auction auction)
|
||||
{
|
||||
string message = "";
|
||||
message += Messages.AuctionsRunning;
|
||||
foreach(Auction.AuctionEntry entry in auction.AuctionEntries)
|
||||
{
|
||||
message += Messages.FormatAuctionHorseEntry(Database.GetUsername(entry.OwnerId), entry.Horse.Color, entry.Horse.Breed.Name, entry.Horse.Gender, entry.Horse.BasicStats.Experience, entry.Horse.RandomId, entry.TimeRemaining, Database.GetUsername(entry.HighestBidder), entry.HighestBid, entry.RandomId);
|
||||
}
|
||||
User[] users = GameServer.GetUsersAt(user.X, user.Y, true, true);
|
||||
List<string> usernames = new List<string>();
|
||||
foreach(User userInst in users)
|
||||
{
|
||||
usernames.Add(userInst.Username);
|
||||
}
|
||||
message += Messages.FormatAuctionPlayersHere(string.Join(", ", usernames.ToArray()));
|
||||
message += Messages.AuctionAHorse;
|
||||
|
||||
message += Messages.ExitThisPlace;
|
||||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
private static string buildWorkshop(User user)
|
||||
{
|
||||
Workshop shop = Workshop.GetWorkshopAt(user.X, user.Y);
|
||||
|
@ -2442,6 +2482,11 @@ namespace HISP.Game
|
|||
{
|
||||
message += buildArena(user, Arena.GetAreaById(int.Parse(TileArg)));
|
||||
}
|
||||
if(TileCode == "AUCTION")
|
||||
{
|
||||
user.MetaPriority = false;
|
||||
message += buildAuction(user, Auction.GetAuctionRoomById(int.Parse(TileArg)));
|
||||
}
|
||||
if(TileCode == "TRAINER")
|
||||
{
|
||||
message += buildTrainer(user, Trainer.GetTrainerById(int.Parse(TileArg)));
|
||||
|
@ -2480,6 +2525,7 @@ namespace HISP.Game
|
|||
}
|
||||
if (TileCode == "MULTIROOM")
|
||||
{
|
||||
user.MetaPriority = false;
|
||||
if (TileArg != "")
|
||||
message += buildMultiroom(TileArg, user);
|
||||
}
|
||||
|
|
141
Horse Isle Server/HorseIsleServer/Game/Services/Auction.cs
Normal file
141
Horse Isle Server/HorseIsleServer/Game/Services/Auction.cs
Normal file
|
@ -0,0 +1,141 @@
|
|||
using HISP.Game.Horse;
|
||||
using HISP.Security;
|
||||
using HISP.Server;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HISP.Game.Services
|
||||
{
|
||||
public class Auction
|
||||
{
|
||||
public static List<Auction> AuctionRooms = new List<Auction>();
|
||||
public Auction(int id)
|
||||
{
|
||||
RoomId = id;
|
||||
AuctionEntries = new List<AuctionEntry>();
|
||||
Database.LoadAuctionRoom(this, RoomId);
|
||||
}
|
||||
public class AuctionEntry
|
||||
{
|
||||
public AuctionEntry(int timeRemaining, int highestBid, int highestBidder, int randomId=-1)
|
||||
{
|
||||
RandomId = RandomID.NextRandomId(randomId);
|
||||
this.timeRemaining = timeRemaining;
|
||||
this.highestBid = highestBid;
|
||||
this.highestBidder = highestBidder;
|
||||
}
|
||||
|
||||
public HorseInstance Horse;
|
||||
public int OwnerId;
|
||||
|
||||
public int RandomId;
|
||||
private int timeRemaining;
|
||||
|
||||
private int highestBid;
|
||||
private int highestBidder;
|
||||
|
||||
public int TimeRemaining
|
||||
{
|
||||
get
|
||||
{
|
||||
return timeRemaining;
|
||||
}
|
||||
set
|
||||
{
|
||||
timeRemaining = value;
|
||||
Database.SetAuctionTimeout(RandomId, value);
|
||||
}
|
||||
}
|
||||
public int HighestBid
|
||||
{
|
||||
get
|
||||
{
|
||||
return highestBid;
|
||||
}
|
||||
set
|
||||
{
|
||||
highestBid = value;
|
||||
Database.SetAuctionHighestBid(RandomId, value);
|
||||
}
|
||||
}
|
||||
|
||||
public int HighestBidder
|
||||
{
|
||||
get
|
||||
{
|
||||
return highestBidder;
|
||||
}
|
||||
set
|
||||
{
|
||||
highestBidder = value;
|
||||
Database.SetAuctionHighestBidder(RandomId, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void AddEntry(AuctionEntry entry)
|
||||
{
|
||||
Database.AddAuctionRoom(entry, this.RoomId);
|
||||
AuctionEntries.Add(entry);
|
||||
}
|
||||
|
||||
public List<AuctionEntry> AuctionEntries;
|
||||
public int RoomId;
|
||||
|
||||
|
||||
public bool HasAuctionEntry(int randomId)
|
||||
{
|
||||
foreach (AuctionEntry entry in AuctionEntries)
|
||||
{
|
||||
if (entry.RandomId == randomId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public AuctionEntry GetAuctionEntry(int randomId)
|
||||
{
|
||||
foreach(AuctionEntry entry in AuctionEntries)
|
||||
{
|
||||
if(entry.RandomId == randomId)
|
||||
{
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
throw new KeyNotFoundException("Auction Entry with RandomID: " + randomId + " NOT FOUND");
|
||||
}
|
||||
|
||||
public static Auction GetAuctionRoomById(int roomId)
|
||||
{
|
||||
foreach(Auction auction in AuctionRooms)
|
||||
{
|
||||
if(auction.RoomId == roomId)
|
||||
{
|
||||
return auction;
|
||||
}
|
||||
}
|
||||
throw new KeyNotFoundException("Auction with roomID " + roomId + " NOT FOUND!");
|
||||
}
|
||||
|
||||
public static void LoadAllAuctionRooms()
|
||||
{
|
||||
foreach(World.SpecialTile tile in World.SpecialTiles)
|
||||
{
|
||||
if(tile.Code != null)
|
||||
{
|
||||
if(tile.Code.StartsWith("AUCTION-"))
|
||||
{
|
||||
int code = int.Parse(tile.Code.Split('-')[1]);
|
||||
Auction loadAuctionRoom = new Auction(code);
|
||||
AuctionRooms.Add(loadAuctionRoom);
|
||||
Logger.InfoPrint("Loading Auction Room: " + code.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@ namespace HISP
|
|||
DroppedItems.Init();
|
||||
WildHorse.Init();
|
||||
Brickpoet.LoadPoetryRooms();
|
||||
Auction.LoadAllAuctionRooms();
|
||||
Drawingroom.LoadAllDrawingRooms();
|
||||
Item.DoSpecialCases();
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ using HISP.Game.Horse;
|
|||
using HISP.Game.Inventory;
|
||||
using HISP.Game.Items;
|
||||
using HISP.Security;
|
||||
using HISP.Game.Services;
|
||||
|
||||
namespace HISP.Server
|
||||
{
|
||||
|
@ -49,8 +50,21 @@ namespace HISP.Server
|
|||
string Ranches = "CREATE TABLE Ranches(ranchId INT, playerId INT, title TEXT(1028), description TEXT(1028), upgradeLevel INT, building1 INT, building2 INT, building3 INT, building4 INT, building5 INT, building6 INT, building7 INT, building8 INT, building9 INT, building10 INT, building11 INT, building12 INT, building13 INT, building14 INT, building15 INT, building16 INT, investedMoney INT)";
|
||||
string BannedPlayers = "CREATE TABLE BannedPlayers(playerId INT, ipAddress TEXT(1028), reason TEXT(1028))";
|
||||
string RiddlesComplete = "CREATE TABLE RiddlesComplete(playerId INT, riddleId INT, solved TEXT(1028))";
|
||||
string AuctionTable = "CREATE TABLE Auctions(roomId INT, randomId INT, horseRandomId INT, ownerId INT, timeRemaining INT, highestBid INT, highestBidder INT)";
|
||||
string DeleteOnlineUsers = "DELETE FROM OnlineUsers";
|
||||
|
||||
try
|
||||
{
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = AuctionTable;
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.WarnPrint(e.Message);
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
|
@ -1530,6 +1544,58 @@ namespace HISP.Server
|
|||
}
|
||||
}
|
||||
|
||||
public static void LoadAuctionRoom(Auction auction, int roomId)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "SELECT * FROM Auctions WHERE roomId=@roomId";
|
||||
sqlCommand.Parameters.AddWithValue("@roomId", roomId);
|
||||
sqlCommand.Prepare();
|
||||
MySqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
int randomId = reader.GetInt32(1);
|
||||
int timeRemaining = reader.GetInt32(4);
|
||||
int highestBid = reader.GetInt32(5);
|
||||
int highestBidder = reader.GetInt32(6);
|
||||
int horseId = reader.GetInt32(2);
|
||||
|
||||
Auction.AuctionEntry auctionEntry = new Auction.AuctionEntry(timeRemaining, highestBid, highestBidder, randomId);
|
||||
|
||||
auctionEntry.Horse = GetPlayerHorse(horseId);
|
||||
auctionEntry.OwnerId = reader.GetInt32(3);
|
||||
|
||||
auction.AuctionEntries.Add(auctionEntry);
|
||||
|
||||
}
|
||||
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddAuctionRoom(Auction.AuctionEntry entry, int roomId)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "INSERT INTO Auctions VALUES(@roomId, @randomId, @horseRandomId, @ownerId, @timeRemaining, @highestBid, @highestBidder)";
|
||||
sqlCommand.Parameters.AddWithValue("@roomId", roomId);
|
||||
sqlCommand.Parameters.AddWithValue("@randomId", entry.RandomId);
|
||||
sqlCommand.Parameters.AddWithValue("@horseRandomId", entry.Horse.RandomId);
|
||||
sqlCommand.Parameters.AddWithValue("@ownerId", entry.OwnerId);
|
||||
sqlCommand.Parameters.AddWithValue("@timeRemaining", entry.TimeRemaining);
|
||||
sqlCommand.Parameters.AddWithValue("@highestBid", entry.HighestBid);
|
||||
sqlCommand.Parameters.AddWithValue("@highestBidder", entry.HighestBidder);
|
||||
sqlCommand.Prepare();
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void BanUser(int userId, string ip, string reason)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
|
@ -2261,6 +2327,51 @@ namespace HISP.Server
|
|||
}
|
||||
}
|
||||
|
||||
public static void SetAuctionTimeout(int randomId, int timeRemaining)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "UPDATE Auctions SET timeRemaining=@timeRemaining WHERE randomId=@randomId";
|
||||
sqlCommand.Parameters.AddWithValue("@timeRemaining", timeRemaining);
|
||||
sqlCommand.Parameters.AddWithValue("@randomId", randomId);
|
||||
sqlCommand.Prepare();
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetAuctionHighestBid(int randomId, int highestBid)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "UPDATE Auctions SET highestBid=@highestBid WHERE randomId=@randomId";
|
||||
sqlCommand.Parameters.AddWithValue("@highestBid", highestBid);
|
||||
sqlCommand.Parameters.AddWithValue("@randomId", randomId);
|
||||
sqlCommand.Prepare();
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetAuctionHighestBidder(int randomId, int highestBidder)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "UPDATE Auctions SET highestBidder=@highestBidder WHERE randomId=@randomId";
|
||||
sqlCommand.Parameters.AddWithValue("@highestBidder", highestBidder);
|
||||
sqlCommand.Parameters.AddWithValue("@randomId", randomId);
|
||||
sqlCommand.Prepare();
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void SetHorseHidden(int randomId, bool hidden)
|
||||
{
|
||||
|
|
|
@ -821,6 +821,28 @@ namespace HISP.Server
|
|||
Map.ModIsleX = gameData.messages.commands.mod_isle.x;
|
||||
Map.ModIsleY = gameData.messages.commands.mod_isle.y;
|
||||
|
||||
// Auction
|
||||
Messages.AuctionsRunning = gameData.messages.meta.auction.auctions_running;
|
||||
Messages.AuctionPlayersHereFormat = gameData.messages.meta.auction.players_here;
|
||||
Messages.AuctionHorseEntryFormat = gameData.messages.meta.auction.auction_horse_entry;
|
||||
Messages.AuctionAHorse = gameData.messages.meta.auction.auction_horse;
|
||||
|
||||
Messages.AuctionListHorse = gameData.messages.meta.auction.list_horse;
|
||||
Messages.AuctionHorseListEntryFormat = gameData.messages.meta.auction.horse_list_entry;
|
||||
Messages.AuctionHorseIsTacked = gameData.messages.meta.auction.tacked;
|
||||
|
||||
Messages.AuctionBidRaisedFormat = gameData.messages.meta.auction.bid_raised;
|
||||
Messages.AuctionTopBid = gameData.messages.meta.auction.top_bid;
|
||||
Messages.AuctionExistingBidHigher = gameData.messages.meta.auction.existing_higher;
|
||||
|
||||
Messages.AuctionYouveBeenOutbidFormat = gameData.messages.meta.auction.outbid_by;
|
||||
Messages.AuctionCantAffordBid = gameData.messages.meta.auction.cant_afford_bid;
|
||||
Messages.AuctionCantAffordAuctionFee = gameData.messages.meta.auction.cant_afford_listing;
|
||||
|
||||
Messages.AuctionYouBroughtAHorseFormat = gameData.messages.meta.auction.brought_horse;
|
||||
Messages.AuctionNoHorseBrought = gameData.messages.meta.auction.no_one_brought;
|
||||
Messages.AuctionHorseSoldFormat = gameData.messages.meta.auction.horse_sold;
|
||||
|
||||
// Hammock Text
|
||||
Messages.HammockText = gameData.messages.meta.hammock;
|
||||
|
||||
|
|
|
@ -804,7 +804,10 @@ namespace HISP.Server
|
|||
break;
|
||||
}
|
||||
trainHorseInst.BasicStats.Experience += trainer.ExperienceGained;
|
||||
trainHorseInst.TrainTimer = 1440;
|
||||
if(sender.LoggedinUser.Subscribed)
|
||||
trainHorseInst.TrainTimer = 1440;
|
||||
else
|
||||
trainHorseInst.TrainTimer = 720;
|
||||
|
||||
byte[] trainSuccessfulMessage = PacketBuilder.CreateChat(Messages.FormatTrainedInStatFormat(trainHorseInst.Name, trainer.ImprovesStat), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
sender.SendPacket(trainSuccessfulMessage);
|
||||
|
@ -2171,6 +2174,11 @@ namespace HISP.Server
|
|||
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildBooksLibary());
|
||||
sender.SendPacket(metaPacket);
|
||||
break;
|
||||
case "41": // Put horse into auction
|
||||
sender.LoggedinUser.MetaPriority = true;
|
||||
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildAuctionHorseList(sender.LoggedinUser));
|
||||
sender.SendPacket(metaPacket);
|
||||
break;
|
||||
case "47":
|
||||
sender.LoggedinUser.MetaPriority = true;
|
||||
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildPawneerOrderBreedList());
|
||||
|
|
Loading…
Add table
Reference in a new issue