Skip to content

Commit 26aa5c7

Browse files
authored
fix: ignore removed creatures or creatures with no HP when assembling tile descriptions (#520)
PR from opentibiabr/canary#3765
1 parent ffe4db5 commit 26aa5c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server/network/protocol/protocolgame.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,10 @@ void ProtocolGame::GetTileDescription(const std::shared_ptr<Tile> &tile, Network
15881588
if (creatures) {
15891589
bool playerAdded = false;
15901590
for (auto creature : std::ranges::reverse_view(*creatures)) {
1591+
if (!creature || creature->isRemoved() || !creature->isAlive()) {
1592+
continue;
1593+
}
1594+
15911595
if (!player->canSeeCreature(creature)) {
15921596
continue;
15931597
}

0 commit comments

Comments
 (0)