mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
Add some checks
This commit is contained in:
parent
decdd109e4
commit
9ab8d071d9
2 changed files with 7 additions and 1 deletions
|
@ -115,6 +115,9 @@ namespace HISP.Game.Inventory
|
||||||
}
|
}
|
||||||
public int GetSortPos(InventoryItem item)
|
public int GetSortPos(InventoryItem item)
|
||||||
{
|
{
|
||||||
|
if (item == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
int bias = 1000;
|
int bias = 1000;
|
||||||
int sortBy = Item.GetItemById(item.ItemId).SortBy;
|
int sortBy = Item.GetItemById(item.ItemId).SortBy;
|
||||||
if (item.Infinite)
|
if (item.Infinite)
|
||||||
|
|
|
@ -615,7 +615,10 @@ namespace HISP.Server
|
||||||
case PacketBuilder.SOCIALS_USE:
|
case PacketBuilder.SOCIALS_USE:
|
||||||
int socialId = Convert.ToInt32(packet[2] - (byte)0x21);
|
int socialId = Convert.ToInt32(packet[2] - (byte)0x21);
|
||||||
SocialType.Social social = SocialType.GetSocial(socialId);
|
SocialType.Social social = SocialType.GetSocial(socialId);
|
||||||
|
/*
|
||||||
|
* Check if player being socialed with
|
||||||
|
* is actually on this tile, not muted, etc
|
||||||
|
*/
|
||||||
if (sender.LoggedinUser.SocializingWith != null && social.BaseSocialType.Type != "GROUP")
|
if (sender.LoggedinUser.SocializingWith != null && social.BaseSocialType.Type != "GROUP")
|
||||||
{
|
{
|
||||||
if (sender.LoggedinUser.SocializingWith.MuteAll || sender.LoggedinUser.SocializingWith.MuteSocials)
|
if (sender.LoggedinUser.SocializingWith.MuteAll || sender.LoggedinUser.SocializingWith.MuteSocials)
|
||||||
|
|
Loading…
Add table
Reference in a new issue