diff options
-rw-r--r-- | data/sql/updates/pending_db_world/rev_1631986343234423300.sql | 27 | ||||
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 33 | ||||
-rw-r--r-- | src/server/game/Entities/Creature/CreatureData.h | 6 |
3 files changed, 33 insertions, 33 deletions
diff --git a/data/sql/updates/pending_db_world/rev_1631986343234423300.sql b/data/sql/updates/pending_db_world/rev_1631986343234423300.sql new file mode 100644 index 0000000000..c3c5c11360 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1631986343234423300.sql @@ -0,0 +1,27 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1631986343234423300'); + +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x80000000 WHERE `entry` IN ( +28684, /* Krik'thir the Gatewatcher */ +36502, /* Devourer of Souls */ +36658, /* Scourgelord Tyrannus */ +32871, /* Algalon */ +39863, /* Halion */ +33186, /* Razorscale */ +36626, /* Festergut */ +32867, /* Steelbreaker - Assembly of Iron */ +32927, /* Runemaster Molgeim - Assembly of Iron */ +32857, /* Stormcaller Brundir - Assembly of Iron */ +33350, /* Mimiron */ +16060, /* Gothik the Harvester */ +36678, /* Professor Putricide */ +15990, /* Kel'Thuzad */ +33993, /* Emalon the Storm Watcher */ +17257, /* Magtheridon */ +25315, /* Kil'jaeden */ +15928, /* Thaddius */ +32930, /* Kologarn */ +32906, /* Freya */ +36597, /* The Lich King */ +36853, /* Sindragosa */ +36855, /* Lady Deathwhisper */ +37955 /* Blood-Queen Lana'thel */); diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 34a7647206..50e09e0368 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -196,38 +196,9 @@ void CreatureAI::EnterEvadeMode() } } - // @todo: Turn into a flags_extra in creature_template // despawn bosses at reset - only verified tbc/woltk bosses with this reset type - add bosses in last line respectively (dungeon/raid) and increase array limit - static constexpr std::array<uint32, 24> bosses = { - /* dungeons */ - 28684, /* Krik'thir the Gatewatcher */ - 36502, /* Devourer of Souls */ - 36658, /* Scourgelord Tyrannus */ - /* raids */ - 32871, /* Algalon */ - 39863, /* Halion */ - 33186, /* Razorscale */ - 36626, /* Festergut */ - 32867, /* Steelbreaker - Assembly of Iron */ - 32927, /* Runemaster Molgeim - Assembly of Iron */ - 32857, /* Stormcaller Brundir - Assembly of Iron */ - 33350, /* Mimiron */ - 16060, /* Gothik the Harvester */ - 36678, /* Professor Putricide */ - 15990, /* Kel'Thuzad */ - 33993, /* Emalon the Storm Watcher */ - 17257, /* Magtheridon */ - 25315, /* Kil'jaeden */ - 15928, /* Thaddius */ - 32930, /* Kologarn */ - 32906, /* Freya */ - 36597, /* The Lich King */ - 36853, /* Sindragosa */ - 36855, /* Lady Deathwhisper */ - 37955 /* Blood-Queen Lana'thel */ - }; - - if (std::find(std::begin(bosses), std::end(bosses), me->GetEntry()) != std::end(bosses)) + CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(me->GetEntry()); + if (cInfo && cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_HARD_RESET)) { me->DespawnOnEvade(); me->m_Events.AddEvent(new PhasedRespawn(*me), me->m_Events.CalculateTime(20000)); diff --git a/src/server/game/Entities/Creature/CreatureData.h b/src/server/game/Entities/Creature/CreatureData.h index 1fd3d49665..b54979049e 100644 --- a/src/server/game/Entities/Creature/CreatureData.h +++ b/src/server/game/Entities/Creature/CreatureData.h @@ -73,11 +73,11 @@ enum CreatureFlagsExtra : uint32 CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB) CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000, // creature ignore pathfinding CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK = 0x40000000, // creature is immune to knockback effects - CREATURE_FLAG_EXTRA_UNUSED_32 = 0x80000000, + CREATURE_FLAG_EXTRA_HARD_RESET = 0x80000000, // Masks CREATURE_FLAG_EXTRA_UNUSED = (CREATURE_FLAG_EXTRA_UNUSED_12 | CREATURE_FLAG_EXTRA_UNUSED_25 | CREATURE_FLAG_EXTRA_UNUSED_26 | - CREATURE_FLAG_EXTRA_UNUSED_27 | CREATURE_FLAG_EXTRA_UNUSED_28 | CREATURE_FLAG_EXTRA_UNUSED_32), + CREATURE_FLAG_EXTRA_UNUSED_27 | CREATURE_FLAG_EXTRA_UNUSED_28), CREATURE_FLAG_EXTRA_DB_ALLOWED = (0xFFFFFFFF & ~(CREATURE_FLAG_EXTRA_UNUSED | CREATURE_FLAG_EXTRA_DUNGEON_BOSS)) }; @@ -177,6 +177,8 @@ struct CreatureTemplate return exotic || (type_flags & CREATURE_TYPE_FLAG_TAMEABLE_EXOTIC) == 0; } + [[nodiscard]] bool HasFlagsExtra (uint32 flag) const { return (flags_extra & flag) != 0; } + void InitializeQueryData(); }; |