mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[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:
+11
-12
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user