[Zone] Zone State Automated Testing and Improvements (#4808)

* [Zone] Zone State Automated Testing and Improvements

* Spawn condition

* Update zone.cpp

* Remove redundant logic

* Update zone_state.cpp

* TestZLocationDrift

* Protect NPC resumed NPC's from being able to die
This commit is contained in:
Chris Miles authored and GitHub committed 2025-03-30 01:45:28 -05:00
1 parent c8a7066d0e
commit b9cfdea76c
23 files changed
+1312 -168

No files matched your search

+8 -4
View File
@@ -368,18 +368,22 @@ void Zone::LoadLootDrops(const std::vector<uint32> in_lootdrop_ids)
m_lootdrops.emplace_back(e);
// add lootdrop entries
for (const auto &f: lootdrop_entries) {
if (e.id == f.lootdrop_id) {
// add lootdrop entries
for (const auto &h: lootdrop_entries) {
if (e.id == h.lootdrop_id) {
// check if lootdrop entry already exists in memory
has_entry = false;
for (const auto &g: m_lootdrop_entries) {
if (f.lootdrop_id == g.lootdrop_id && f.item_id == g.item_id && f.multiplier == g.multiplier) {
for (const auto &i: m_lootdrop_entries) {
if (h.lootdrop_id == i.lootdrop_id && h.item_id == i.item_id) {
has_entry = true;
break;
}
}
if (!has_entry) {
m_lootdrop_entries.emplace_back(h);
}
}
}
}