Jump to content

[DEV] Creature::IsDungeonBoss() function


cyberium

Recommended Posts

Why?

For DungeonEncounters implementation and DungeonFinder.

Why not using "0x00000400"

For DB compatibility raison with trinity only so it's up to you to use "0x00000400"

DB modification is needed?

Yes, i already wrote a script but i want to see discution of that flag value here before.

Why not use the same way than achievement does?

I realy think the achievement must use this way instead, at least when DungeonEncounters will be completly implemented.

diff --git a/src/game/Creature.h b/src/game/Creature.h
index 563ccb5..74cd59a 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -53,6 +53,7 @@ enum CreatureFlagsExtra
    CREATURE_FLAG_EXTRA_INVISIBLE       = 0x00000080,       // creature is always invisible for player (mostly trigger creatures)
    CREATURE_FLAG_EXTRA_NOT_TAUNTABLE   = 0x00000100,       // creature is immune to taunt auras and effect attack me
    CREATURE_FLAG_EXTRA_AGGRO_ZONE      = 0x00000200,       // creature sets itself in combat with zone on aggro
+    CREATURE_FLAG_EXTRA_DUNGEON_BOSS    = 0x00200000,       // creature is a dungeon boss
};

// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform
@@ -444,6 +445,8 @@ class MANGOS_DLL_SPEC Creature : public Unit
            return rank != CREATURE_ELITE_NORMAL && rank != CREATURE_ELITE_RARE;
        }

+        bool IsDungeonBoss() const { return m_creatureInfo->flags_extra & CREATURE_FLAG_EXTRA_DUNGEON_BOSS; }
+
        bool IsWorldBoss() const
        {
            if(IsPet())

Waiting for your comment.

ex. of sql update needed.

UPDATE creature_template SET flags_extra = flags_extra|2097152 WHERE entry = 3914; -- boss Rethilgore difficulty(0)

Link to comment
Share on other sites

For DungeonEncounters implementation and DungeonFinder.

And what you'll do with boss-less encounters like Tribunal of Ages (Halls of Stone).

Achievement system is generic enough to handle it.

1 - Can you point me how we can do that with actual achievement code?

2 - Your exemple is part of about 5% of total encounters do i must use hack to handle achievement code and make it generate correct event at boss kill?

3 - here is the complete missed event list + some entry not found in last ytdb

-- The Lost Dwarves difficulty(0)
-- Ghaz'rilla difficulty(0)
-- Ring of Law difficulty(0)
-- The Seven difficulty(0)
-- Edge of Madness difficulty(0)
-- Ramnstein the Gorger difficulty(0)
-- Silithid Royalty difficulty(0)
-- Twin Emperors difficulty(0)
-- Maiden of the Virtue difficulty(0)
-- Opera Event difficulty(0)
-- Chess Event difficulty(0)
-- The Four Horsemen difficulty(0)
-- The Four Horsemen difficulty(1)
-- Anzu difficulty(1)
-- Yor difficulty(1)
-- Reliquary of Souls difficulty(0)
-- Prince Keleseth difficulty(1)
-- Skarvold & Dalronn difficulty(0)
-- Skarvold & Dalronn difficulty(1)
-- King Ymiron difficulty(1)
-- Frozen Commander difficulty(1)
-- Grand Magus Telestra difficulty(1)
-- Ormrok the Tree-Shaper difficulty(1)
-- Keristrasza difficulty(1)
-- Eredar Twins difficulty(0)
-- Kael'thas Sunstrider difficulty(1)
-- Salram the Fleshcrafter difficulty(0)
-- Salram the Fleshcrafter difficulty(1)
-- Tribunal of Ages difficulty(0)
-- Tribunal of Ages difficulty(1)
-- Loken difficulty(1)
-- The Iron Council difficulty(0)
-- The Iron Council difficulty(1)
-- Thorim difficulty(1)
-- Mimiron difficulty(1)
-- Eck the Ferocious difficulty(1)
-- First Prisoner difficulty(0)
-- First Prisoner difficulty(1)
-- Second Prisoner difficulty(0)
-- Second Prisoner difficulty(1)
-- Malygos difficulty(1)
-- Icecrown Gunship Battle difficulty(0)
-- Icecrown Gunship Battle difficulty(1)
-- Blood Council difficulty(0)
-- Blood Council difficulty(1)
-- Queen Lana'thel difficulty(0)
-- Queen Lana'thel difficulty(1)
-- Sindragosa difficulty(1)
-- The Lich King difficulty(1)
-- Northrend Beasts difficulty(0)
-- Northrend Beasts difficulty(1)
-- Northrend Beasts difficulty(2)
-- Faction Champions difficulty(0)
-- Northrend Beasts difficulty(3)
-- Faction Champions difficulty(1)
-- Val'kyr Twins difficulty(0)
-- Faction Champions difficulty(2)
-- Val'kyr Twins difficulty(1)
-- Faction Champions difficulty(3)
-- Val'kyr Twins difficulty(2)
-- Val'kyr Twins difficulty(3)
-- Anub'arak difficulty(2)
-- Anub'arak difficulty(3)
-- Grand Champions difficulty(0)
-- Grand Champions difficulty(1)
-- Argent Champion difficulty(1)
-- The Black Knight difficulty(1)
-- Overlrod Tyrannus difficulty(0)
-- Overlrod Tyrannus difficulty(1)
-- Escaped from Arthas difficulty(0)
-- Escaped from Arthas difficulty(1)

100% of any dungeon situation can be handled with correct DungeonEncounter.dbc implementation.

DungeonEncounters have nothing to do with achievement but achievement need total information of dungeonencounters.

Link to comment
Share on other sites

  • 9 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use