mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-12-21 08:47:12 +01:00
introduce changes from streamside fork
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Tibia GIMUD Server - a free and open-source MMORPG server emulator
|
||||
* Copyright (C) 2017 Alejandro Mujica <alejandrodemujica@gmail.com>
|
||||
* Copyright (C) 2019 Sabrehaven and Mark Samman <mark.samman@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -82,7 +82,7 @@ void House::setOwner(uint32_t guid, bool updateDatabase/* = true*/, Player* play
|
||||
setAccessList(SUBOWNER_LIST, "");
|
||||
setAccessList(GUEST_LIST, "");
|
||||
|
||||
for (Door* door : doorList) {
|
||||
for (Door* door : doorSet) {
|
||||
door->setAccessList("");
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void House::updateDoorDescription() const
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& it : doorList) {
|
||||
for (const auto& it : doorSet) {
|
||||
it->setSpecialDescription(ss.str());
|
||||
}
|
||||
}
|
||||
@@ -277,17 +277,17 @@ bool House::isInvited(const Player* player)
|
||||
void House::addDoor(Door* door)
|
||||
{
|
||||
door->incrementReferenceCounter();
|
||||
doorList.push_back(door);
|
||||
doorSet.insert(door);
|
||||
door->setHouse(this);
|
||||
updateDoorDescription();
|
||||
}
|
||||
|
||||
void House::removeDoor(Door* door)
|
||||
{
|
||||
auto it = std::find(doorList.begin(), doorList.end(), door);
|
||||
if (it != doorList.end()) {
|
||||
auto it = doorSet.find(door);
|
||||
if (it != doorSet.end()) {
|
||||
door->decrementReferenceCounter();
|
||||
doorList.erase(it);
|
||||
doorSet.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ void House::addBed(BedItem* bed)
|
||||
|
||||
Door* House::getDoorByNumber(uint32_t doorId) const
|
||||
{
|
||||
for (Door* door : doorList) {
|
||||
for (Door* door : doorSet) {
|
||||
if (door->getDoorId() == doorId) {
|
||||
return door;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ Door* House::getDoorByNumber(uint32_t doorId) const
|
||||
|
||||
Door* House::getDoorByPosition(const Position& pos)
|
||||
{
|
||||
for (Door* door : doorList) {
|
||||
for (Door* door : doorSet) {
|
||||
if (door->getPosition() == pos) {
|
||||
return door;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user