mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* prototype: adding account-wide house recall * updating restriction db / has permissions * additional ObjMaint refactoring * re-adding CheckPlayers() * the call to GetVisibleObjects() in Monster.FindNextTarget() is no longer needed in new design * removing more unused code * very preliminary testing * prevent 1 character from purchasing multiple houses * adding account/character houses * further work on AccountHouses / CharacterHouses * latest updates, account/character multihouse polish, apartment deed location * adding /house-select process * HouseManager refactoring, removing async, fixing PlayerHouse.CompareTo equals, fixed InventoryLoaded for weenies, added Player_House.GetHouseInstance() * first posted draft * wiring up the remaining HouseInstance -> GetHouseInstance() * preventing maintenance items from being added for houses owned by players in multihouse state * cleaning up log messages, handling some edge cases
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using ACE.Server.WorldObjects;
|
|
|
|
namespace ACE.Server.Entity
|
|
{
|
|
public class PlayerHouse: IComparable<PlayerHouse>
|
|
{
|
|
public uint AccountId;
|
|
public uint PlayerGuid;
|
|
public string PlayerName;
|
|
public House House;
|
|
public DateTime RentDue;
|
|
|
|
public PlayerHouse(IPlayer player, House house)
|
|
{
|
|
if (player.Account != null)
|
|
AccountId = player.Account.AccountId;
|
|
else
|
|
Console.WriteLine($"PlayerHouse({player.Name}, {house.Name} ({house.Guid})) - couldn't find account id");
|
|
|
|
PlayerGuid = player.Guid.Full;
|
|
PlayerName = player.Name;
|
|
|
|
House = house;
|
|
|
|
RentDue = DateTimeOffset.FromUnixTimeSeconds(player.HouseRentTimestamp.Value).UtcDateTime;
|
|
}
|
|
|
|
public int CompareTo(PlayerHouse playerHouse)
|
|
{
|
|
var result = RentDue.CompareTo(playerHouse.RentDue);
|
|
|
|
if (result == 0)
|
|
result = House.Guid.Full.CompareTo(playerHouse.House.Guid.Full);
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|