mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 21:55:42 +12:00
Fix ability to DM every user
This commit is contained in:
parent
947a23f613
commit
1cb158f7b0
2 changed files with 13 additions and 1 deletions
|
@ -439,15 +439,23 @@ namespace HISP.Game.Chat
|
||||||
|
|
||||||
if(channel == ChatChannel.Dm)
|
if(channel == ChatChannel.Dm)
|
||||||
{
|
{
|
||||||
if (to != null)
|
if (to != null && to != "")
|
||||||
{
|
{
|
||||||
List<GameClient> recipiants = new List<GameClient>();
|
List<GameClient> recipiants = new List<GameClient>();
|
||||||
foreach (GameClient client in GameClient.ConnectedClients)
|
foreach (GameClient client in GameClient.ConnectedClients)
|
||||||
{
|
{
|
||||||
if (client.LoggedIn)
|
if (client.LoggedIn)
|
||||||
|
{
|
||||||
if (!client.LoggedinUser.MutePrivateMessage && !client.LoggedinUser.MuteAll)
|
if (!client.LoggedinUser.MutePrivateMessage && !client.LoggedinUser.MuteAll)
|
||||||
|
{
|
||||||
if (client.LoggedinUser.Username.ToLower().StartsWith(to.ToLower()))
|
if (client.LoggedinUser.Username.ToLower().StartsWith(to.ToLower()))
|
||||||
|
{
|
||||||
recipiants.Add(client);
|
recipiants.Add(client);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return recipiants.ToArray();
|
return recipiants.ToArray();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7553,11 +7553,13 @@ namespace HISP.Server
|
||||||
List<User> usersNearby = new List<User>();
|
List<User> usersNearby = new List<User>();
|
||||||
|
|
||||||
foreach (GameClient client in GameClient.ConnectedClients)
|
foreach (GameClient client in GameClient.ConnectedClients)
|
||||||
|
{
|
||||||
if (client.LoggedIn)
|
if (client.LoggedIn)
|
||||||
{
|
{
|
||||||
if (startX <= client.LoggedinUser.X && endX >= client.LoggedinUser.X && startY <= client.LoggedinUser.Y && endY >= client.LoggedinUser.Y)
|
if (startX <= client.LoggedinUser.X && endX >= client.LoggedinUser.X && startY <= client.LoggedinUser.Y && endY >= client.LoggedinUser.Y)
|
||||||
usersNearby.Add(client.LoggedinUser);
|
usersNearby.Add(client.LoggedinUser);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return usersNearby.ToArray();
|
return usersNearby.ToArray();
|
||||||
}
|
}
|
||||||
|
@ -7602,6 +7604,7 @@ namespace HISP.Server
|
||||||
List<User> usersNearby = new List<User>();
|
List<User> usersNearby = new List<User>();
|
||||||
|
|
||||||
foreach (GameClient client in GameClient.ConnectedClients)
|
foreach (GameClient client in GameClient.ConnectedClients)
|
||||||
|
{
|
||||||
if (client.LoggedIn)
|
if (client.LoggedIn)
|
||||||
{
|
{
|
||||||
if (!includeStealth && client.LoggedinUser.Stealth)
|
if (!includeStealth && client.LoggedinUser.Stealth)
|
||||||
|
@ -7611,6 +7614,7 @@ namespace HISP.Server
|
||||||
if (startX <= client.LoggedinUser.X && endX >= client.LoggedinUser.X && startY <= client.LoggedinUser.Y && endY >= client.LoggedinUser.Y)
|
if (startX <= client.LoggedinUser.X && endX >= client.LoggedinUser.X && startY <= client.LoggedinUser.Y && endY >= client.LoggedinUser.Y)
|
||||||
usersNearby.Add(client.LoggedinUser);
|
usersNearby.Add(client.LoggedinUser);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return usersNearby.ToArray();
|
return usersNearby.ToArray();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue