Fix quest issues, and metaprority not being priority.

This commit is contained in:
SilicaAndPina 2021-02-05 18:47:45 +13:00
parent 76f3d7d731
commit c9c81d721e
5 changed files with 668 additions and 669 deletions

File diff suppressed because it is too large Load diff

View file

@ -40,7 +40,7 @@ namespace HISP.Game.Items
public static DroppedItem[] GetItemsAt(int x, int y)
{
DroppedItem[] droppedItems = droppedItemsList.ToArray();
List<DroppedItem> items = new List<DroppedItem>();
for(int i = 0; i < droppedItems.Length; i++)
@ -64,7 +64,7 @@ namespace HISP.Game.Items
public static void Update()
{
DespawnItems();
GenerateItems();
GenerateItems(false);
}
public static void RemoveDroppedItem(DroppedItem item)
{
@ -135,7 +135,7 @@ namespace HISP.Game.Items
droppedItemsList.Add(droppedItem);
Database.AddDroppedItem(droppedItem);
}
public static void GenerateItems()
public static void GenerateItems(bool randomizeDespawnTime)
{
Logger.InfoPrint("Generating items, (this may take awhile on a fresh database!)");
@ -148,8 +148,9 @@ namespace HISP.Game.Items
{
count++;
int despawnTimer = GameServer.RandomNumberGenerator.Next(900, 1500);
int despawnTimer = 1500;
if(randomizeDespawnTime)
despawnTimer = GameServer.RandomNumberGenerator.Next(900, 1500);
if (item.SpawnParamaters.SpawnInZone != null)
{
@ -330,7 +331,7 @@ namespace HISP.Game.Items
public static void Init()
{
ReadFromDatabase();
GenerateItems();
GenerateItems(true);
}
}

View file

@ -73,7 +73,7 @@ namespace HISP.Game
Database.SetWeather(Name, value);
foreach(User user in GameServer.GetUsersInIsle(this,true,true))
{
GameServer.UpdateArea(user.LoggedinClient);
GameServer.UpdateWeather(user.LoggedinClient);
}
}
}

View file

@ -7,7 +7,7 @@ namespace HISP.Server
public class ConfigReader
{
public static int Port;
public static string BindIP;
public static string BindIP = "0.0.0.0";
public static string DatabaseIP;
public static string DatabaseUsername;
@ -20,11 +20,11 @@ namespace HISP.Server
public static string GameDataFile;
public static string CrossDomainPolicyFile;
public static bool Debug;
public static bool AllUsersSubbed;
public static bool BadWords;
public static bool DoCorrections;
public static bool DoNonViolations;
public static bool Debug = false;
public static bool AllUsersSubbed = false;
public static bool BadWords = true;
public static bool DoCorrections = true;
public static bool DoNonViolations = true;
public const int MAX_STACK = 50;

View file

@ -4144,8 +4144,13 @@ namespace HISP.Server
return;
}
byte[] WeatherUpdate = PacketBuilder.CreateWeatherUpdatePacket(forClient.LoggedinUser.GetWeatherSeen());
forClient.SendPacket(WeatherUpdate);
string lastWeather = forClient.LoggedinUser.LastSeenWeather;
string weather = forClient.LoggedinUser.GetWeatherSeen();
if (lastWeather != weather)
{
byte[] WeatherUpdate = PacketBuilder.CreateWeatherUpdatePacket(weather);
forClient.SendPacket(WeatherUpdate);
}
}
public static void UpdateWorld(GameClient forClient)
{
@ -4194,6 +4199,7 @@ namespace HISP.Server
UpdateArea(client);
}
}
public static void UpdateArea(GameClient forClient)
{
if (!forClient.LoggedIn)
@ -4221,14 +4227,6 @@ namespace HISP.Server
LocationStr = Meta.BuildSpecialTileInfo(forClient.LoggedinUser, specialTile);
}
string lastWeather = forClient.LoggedinUser.LastSeenWeather;
string weather = forClient.LoggedinUser.GetWeatherSeen();
if(lastWeather != weather)
{
byte[] WeatherUpdate = PacketBuilder.CreateWeatherUpdatePacket(weather);
forClient.SendPacket(WeatherUpdate);
}
byte[] AreaMessage = PacketBuilder.CreateMetaPacket(LocationStr);
forClient.SendPacket(AreaMessage);
forClient.LoggedinUser.MetaPriority = false;