[DiscordArchive] is that some custom database table or does it use the builtin boss state system?
[DiscordArchive] is that some custom database table or does it use the builtin boss state system?
Archived author: <o> • Posted: 2023-06-03T18:09:37.652000+00:00
Original source
is that some custom database table or does it use the builtin boss state system?
Archived author: Krutok • Posted: 2023-06-03T18:12:01.606000+00:00
Original source
I use the TC database table, nothing is custom, everything is original. #include "InstanceScript.h"
#include "hort_des_meisters.h"
class instance_hort_des_meisters : public InstanceMapScript
{
public:
instance_hort_des_meisters() : InstanceMapScript(HortdesMeistersScriptName, 730) { }
struct instance_hort_des_meisters_InstanceScript : public InstanceScript
{
instance_hort_des_meisters_InstanceScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
}
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_hort_des_meisters_InstanceScript(map);
}
};
void AddSC_instance_hort_des_meisters()
{
new instance_hort_des_meisters();
}
its a blanco script only save the boss state in the database
Archived author: Tea • Posted: 2023-06-03T18:13:11.558000+00:00
Original source
yeah thats all you need to use the 3 tables i mentioned
Archived author: <o> • Posted: 2023-06-03T18:14:52.078000+00:00
Original source
for those tables it's pretty much just what i wrote.
1. add an entry in `gameobject` table for your gameobject (`creature` table for creatures) and make sure it spawns in the difficulty phase you want it to. test that this causes your gobj to always spawn in the instance before moving to the next steps
2. add an entry to `spawn_group_template` with a new group id and set its flags to 4.
3. add an entry to `instance_spawn_groups` that connects your map/boss id to the spawngroup id you created earlier. iirc `bossStates` is a flag for EncounterState so you'd use 8(?) for it, then flags just 1.
4. add an entry to `spawn_group` with your group id, spawnType 1 for gameobject and then your gobj guid in spawnId
Archived author: Krutok • Posted: 2023-06-03T18:17:50.255000+00:00
Original source
I might be able to do that with the database, but I don't know how to write the script accordingly.
Archived author: <o> • Posted: 2023-06-03T18:18:04.787000+00:00
Original source
you just remove the spawn statements from the script
Archived author: <o> • Posted: 2023-06-03T18:18:16.008000+00:00
Original source
this way the core itself does the spawning for you
Archived author: <o> • Posted: 2023-06-03T18:19:27.452000+00:00
Original source
the `instance_spawn_groups` table is mostly used to stop spawing stuff when you kill a boss, but it can also be used for the opposite purpose like this
Archived author: <o> • Posted: 2023-06-03T18:24:31.671000+00:00
Original source
looking at some other values, bossStates is definitely a mask over `EncounterState`, so 8 is the value you want to cause a spawn after the encounter is done
Archived author: Krutok • Posted: 2023-06-03T18:27:06.566000+00:00
Original source
Ok, spawning may work, but if I put a chest down that can only be opened after the boss has died, it has to check the instance script. That doesn't work via the database, because that would be the second thing I want to add there. the best example is the chest in ICC with Saurfang the 3rd boss the chest is there or with the airship it can be looted when the boss is dead and that is regulated by the instance script.