mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 21:55:42 +12:00
Fix MultiRoom updating every time anyone walks ANYWHERE in the game
This commit is contained in:
parent
4ad3bd1432
commit
f7930fd4d3
4 changed files with 35 additions and 16 deletions
|
@ -84,6 +84,27 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(args[0].ToUpper() == "AWARD")
|
||||||
|
{
|
||||||
|
int awardId = 0;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
awardId = int.Parse(args[1]);
|
||||||
|
if (args.Length >= 3)
|
||||||
|
{
|
||||||
|
findNamePartial(args[2]).Awards.AddAward(Award.GetAwardById(awardId));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.Awards.AddAward(Award.GetAwardById(awardId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (args[0].ToUpper() == "MONEY")
|
else if (args[0].ToUpper() == "MONEY")
|
||||||
{
|
{
|
||||||
int money = 0;
|
int money = 0;
|
||||||
|
|
|
@ -106,8 +106,7 @@ namespace HISP.Game.Items
|
||||||
{
|
{
|
||||||
Database.DecrementDroppedItemDespawnTimer();
|
Database.DecrementDroppedItemDespawnTimer();
|
||||||
Database.RemoveDespawningItems(); // GO-GO-GO-GOGOGOGO GOTTA GO FAST!!!
|
Database.RemoveDespawningItems(); // GO-GO-GO-GOGOGOGO GOTTA GO FAST!!!
|
||||||
int itmCount = droppedItemsList.Count;
|
for (int i = 0; i < droppedItemsList.Count; i++)
|
||||||
for (int i = 0; i < itmCount; i++)
|
|
||||||
{
|
{
|
||||||
if (droppedItemsList[i] == null) // Item removed in another thread.
|
if (droppedItemsList[i] == null) // Item removed in another thread.
|
||||||
continue;
|
continue;
|
||||||
|
@ -121,9 +120,7 @@ namespace HISP.Game.Items
|
||||||
|
|
||||||
Logger.DebugPrint("Despawned Item at " + droppedItemsList[i].X + ", " + droppedItemsList[i].Y);
|
Logger.DebugPrint("Despawned Item at " + droppedItemsList[i].X + ", " + droppedItemsList[i].Y);
|
||||||
droppedItemsList.Remove(droppedItemsList[i]);
|
droppedItemsList.Remove(droppedItemsList[i]);
|
||||||
itmCount = droppedItemsList.Count;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,12 +95,13 @@ namespace HISP.Game
|
||||||
{
|
{
|
||||||
Logger.DebugPrint(user.Username + " Left multiroom @ " + x.ToString() + "," + y.ToString());
|
Logger.DebugPrint(user.Username + " Left multiroom @ " + x.ToString() + "," + y.ToString());
|
||||||
joinedUsers.Remove(user);
|
joinedUsers.Remove(user);
|
||||||
}
|
|
||||||
|
|
||||||
foreach (User joinedUser in JoinedUsers)
|
|
||||||
if (!TwoPlayer.IsPlayerInGame(joinedUser))
|
foreach (User joinedUser in JoinedUsers)
|
||||||
if (!joinedUser.ListingAuction)
|
if (!TwoPlayer.IsPlayerInGame(joinedUser))
|
||||||
GameServer.UpdateArea(joinedUser.LoggedinClient);
|
if (!joinedUser.ListingAuction)
|
||||||
|
GameServer.UpdateArea(joinedUser.LoggedinClient);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6446,7 +6446,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet.");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. " + BitConverter.ToString(packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sender.LoggedinUser.Inventory.HasItem(randomId))
|
if (sender.LoggedinUser.Inventory.HasItem(randomId))
|
||||||
|
@ -6587,7 +6587,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet.");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. " + BitConverter.ToString(packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6625,7 +6625,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. (drop)");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. (drop)"+BitConverter.ToString(packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7087,7 +7087,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet.");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. " + BitConverter.ToString(packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7122,7 +7122,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet.");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. " + BitConverter.ToString(packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7151,7 +7151,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet.");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent an invalid object interaction packet. " + BitConverter.ToString(packet));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue