[DiscordArchive] <@!281892403445497857> https://github.com/azerothcore/azerothcore-wotlk/issues/2909 possibly related
[DiscordArchive] <@!281892403445497857> https://github.com/azerothcore/azerothcore-wotlk/issues/2909 possibly related
Archived author: Kitzunu • Posted: 2020-04-19T15:15:50.053000+00:00
Original source
I assume it means not started?
Very poor name for it's actual meaning
Archived author: Asunyaa • Posted: 2020-04-19T15:16:33.209000+00:00
Original source
No, the state for not being started is "NOT_STARTED"
Archived author: Kitzunu • Posted: 2020-04-19T15:17:01.676000+00:00
Original source
Yea I just looked it up in the core
Archived author: Kitzunu • Posted: 2020-04-19T15:17:11.855000+00:00
Original source
```cpp
case NOT_STARTED:
return "NOT_STARTED";
case IN_PROGRESS:
return "IN_PROGRESS";
case FAIL:
return "FAIL";
case DONE:
return "DONE";
case SPECIAL:
return "SPECIAL";
case TO_BE_DECIDED:
return "TO_BE_DECIDED";
default:
return "INVALID";
enum EncounterState
{
NOT_STARTED = 0,
IN_PROGRESS = 1,
FAIL = 2,
DONE = 3,
SPECIAL = 4,
TO_BE_DECIDED = 5,
};
```
Archived author: Kitzunu • Posted: 2020-04-19T15:19:29.771000+00:00
Original source
```cpp
bool InstanceScript::SetBossState(uint32 id, EncounterState state)
{
if (id < bosses.size())
{
BossInfo* bossInfo = &bosses[id];
if (bossInfo->state == TO_BE_DECIDED) // loading
{
bossInfo->state = state;
//sLog->outError("Inialize boss %u state as %u.", id, (uint32)state);
return false;
}
else
{
if (bossInfo->state == state)
return false;
if (state == DONE)
for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
if ((*i)->isWorldBoss() && (*i)->IsAlive())
return false;
bossInfo->state = state;
SaveToDB();
}
for (uint32 type = 0; type < MAX_DOOR_TYPES; ++type)
for (DoorSet::iterator i = bossInfo->door[type].begin(); i != bossInfo->door[type].end(); ++i)
UpdateDoorState(*i);
for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
UpdateMinionState(*i, state);
return true;
}
return false;
}
```
Archived author: Kitzunu • Posted: 2020-04-19T15:19:59.704000+00:00
Original source
Perhaps it is a place holder before the core(?) can read from DB what state the boss actually is in?
Archived author: Asunyaa • Posted: 2020-04-19T15:20:30.805000+00:00
Original source
Thats exactly what I thought too.. The thing is, I now killed ONLY the 4 horseman, my instance-ID got saved to the DB
Archived author: Asunyaa • Posted: 2020-04-19T15:20:40.228000+00:00
Original source
And the bossstates are saved as the following
Archived author: Asunyaa • Posted: 2020-04-19T15:20:46.480000+00:00
Original source
N X X 0 0 0 0 0 5 0 0 5 0 0 0 3 5 5 1
Archived author: Kitzunu • Posted: 2020-04-19T15:20:53.380000+00:00
Original source
that says me nothing x)