mirror of
https://github.com/islehorse/HISP.git
synced 2025-06-20 01:35:12 +12:00
Fix Auctions
This commit is contained in:
parent
c9caa69805
commit
392a3dfcaa
5 changed files with 61 additions and 57 deletions
|
@ -768,9 +768,11 @@ namespace HISP.Server
|
|||
}
|
||||
if (!auctionRoom.HasAuctionEntry(auctionEntryId))
|
||||
break;
|
||||
|
||||
Auction.AuctionEntry entry = auctionRoom.GetAuctionEntry(auctionEntryId);
|
||||
entry.Bid(sender.LoggedinUser, bidAmount);
|
||||
|
||||
UpdateAreaForAll(tile.X, tile.Y, true, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3803,8 +3805,7 @@ namespace HISP.Server
|
|||
catch(KeyNotFoundException)
|
||||
{
|
||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " tried to load an invalid drawing room: " + roomId);
|
||||
break;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(room.Drawing != "")
|
||||
|
@ -3923,7 +3924,6 @@ namespace HISP.Server
|
|||
}
|
||||
|
||||
Database.SetLastPlayer("D" + room.Id.ToString(), sender.LoggedinUser.Id);
|
||||
UpdateAreaForAll(sender.LoggedinUser.X, sender.LoggedinUser.Y, true);
|
||||
UpdateDrawingForAll("D" + room.Id, sender, drawingToAdd, true);
|
||||
|
||||
byte[] loadedDrawingMessage = PacketBuilder.CreateChat(Messages.FormatDrawingRoomLoaded(slotNo), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
|
@ -3975,7 +3975,6 @@ namespace HISP.Server
|
|||
break;
|
||||
}
|
||||
Database.SetLastPlayer("D" + room.Id.ToString(), sender.LoggedinUser.Id);
|
||||
UpdateAreaForAll(sender.LoggedinUser.X, sender.LoggedinUser.Y, true);
|
||||
UpdateDrawingForAll("D" + room.Id, sender, drawing, false);
|
||||
|
||||
}
|
||||
|
@ -7650,19 +7649,20 @@ namespace HISP.Server
|
|||
|
||||
public static void UpdateDrawingForAll(string id, GameClient sender, string drawing, bool includingSender=false)
|
||||
{
|
||||
|
||||
UpdateAreaForAll(sender.LoggedinUser.X, sender.LoggedinUser.Y);
|
||||
User[] usersHere = GetUsersOnSpecialTileCode("MULTIROOM-D" + id);
|
||||
foreach (User user in usersHere)
|
||||
World.SpecialTile[] tiles = World.GetSpecialTilesByName("MULTIROOM-D" + id);
|
||||
foreach (World.SpecialTile tile in tiles)
|
||||
{
|
||||
if(!includingSender)
|
||||
if (user.Id == sender.LoggedinUser.Id)
|
||||
continue;
|
||||
|
||||
|
||||
byte[] patchDrawing = PacketBuilder.CreateDrawingUpdatePacket(drawing);
|
||||
user.LoggedinClient.SendPacket(patchDrawing);
|
||||
UpdateAreaForAll(tile.X, tile.Y, true, null);
|
||||
User[] usersHere = GameServer.GetUsersAt(tile.X, tile.Y, true, true);
|
||||
foreach (User user in usersHere)
|
||||
{
|
||||
if (!includingSender)
|
||||
if (user.Id == sender.LoggedinUser.Id)
|
||||
continue;
|
||||
|
||||
byte[] patchDrawing = PacketBuilder.CreateDrawingUpdatePacket(drawing);
|
||||
user.LoggedinClient.SendPacket(patchDrawing);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void UpdateHorseMenu(GameClient forClient, HorseInstance horseInst)
|
||||
|
|
|
@ -333,8 +333,6 @@ namespace HISP.Server
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ms.WriteByte(PACKET_TERMINATOR);
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
return ms.ToArray();
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
using HISP.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HISP.Server
|
||||
{
|
||||
public class ServerVersion
|
||||
{
|
||||
public static int MAJOR = 1;
|
||||
public static int MINOR = 3;
|
||||
public static int MINOR = 2;
|
||||
public static string PRODUCT = "HISP";
|
||||
|
||||
public static string GetArchitecture()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue