[Spawn] Split spawn2 enabled into its own state table (#3664)

* [Spawn] Split spawn2 enabled into its own state table

* Update spawn2.cpp

* Update repo

* Make spawn2 enabled/disabled instance aware

* Update questmgr.cpp

* Make sure packet stuff is aware of instance_id

* Update questmgr.cpp

* Update database_update_manifest.cpp

* Cleanup

* Revert "Cleanup"

This reverts commit 64b58bfc52.

* Update database_instances.cpp
This commit is contained in:
Chris Miles
2023-11-06 17:34:42 -06:00
committed by GitHub
parent fad9599642
commit 0811a899d1
13 changed files with 552 additions and 106 deletions
+11 -12
View File
@@ -1729,28 +1729,27 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (zone)
{
ServerSpawnStatusChange_Struct *ssc = (ServerSpawnStatusChange_Struct*)pack->pBuffer;
LinkedListIterator<Spawn2*> iterator(zone->spawn2_list);
if (ssc->instance_id != zone->GetInstanceID()) {
break;
}
LinkedListIterator<Spawn2 *> iterator(zone->spawn2_list);
iterator.Reset();
Spawn2 *found_spawn = nullptr;
while (iterator.MoreElements())
{
Spawn2* cur = iterator.GetData();
if (cur->GetID() == ssc->id)
{
while (iterator.MoreElements()) {
Spawn2 *cur = iterator.GetData();
if (cur->GetID() == ssc->id) {
found_spawn = cur;
break;
}
iterator.Advance();
}
if (found_spawn)
{
if (ssc->new_status == 0)
{
if (found_spawn) {
if (ssc->new_status == 0) {
found_spawn->Disable();
}
else
{
else {
found_spawn->Enable();
}
}