public bool Equals(Buff b) { if (b == null) { return false; } return Type.Equals(b.Type) && Time.Equals(b.Time); }
public Player() { // initialize item and buff arrays int release = VersionUtils.TERRARIA_CURRENT_RELEASE; Armor = new Item[VersionUtils.GetArmorSize(release)]; Dyes = new Item[VersionUtils.GetDyeSize(release)]; Inventory = new Item[VersionUtils.GetInventorySize(release)]; Bank1 = new Item[VersionUtils.GetBankSize(release)]; Bank2 = new Item[VersionUtils.GetBankSize(release)]; Buffs = new Buff[VersionUtils.GetBuffCount(release)]; // initialize spawn data arrays int size = VersionUtils.MAX_WORLDS; SpawnX = new int[size]; SpawnY = new int[size]; SpawnWorldName = new string[size]; SpawnWorldId = new int[size]; }