Jump to content

Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

This patch simply sets NPC PvP flag from DB field unit_flags with UNIT_FLAG_PVP/UNIT_FLAG_PVP_ATTACKABLE.

For which repository revision was the patch created?

7928

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/viewtopic.php?id=7021

http://udbforums.org/index.php?topic=12424.0

http://udbforums.org/index.php?topic=12822.0

Who has been writing this patch?

me.

patch:

diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 24e4f8d..29f80a5 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -300,6 +300,9 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
                SetPvP(true);
    }

+    if (GetCreatureInfo()->unit_flags & UNIT_FLAG_PVP || GetCreatureInfo()->unit_flags & UNIT_FLAG_PVP_ATTACKABLE)
+        SetPvP(true);
+
    for(int i=0; i < CREATURE_MAX_SPELLS; ++i)
        m_spells[i] = GetCreatureInfo()->spells[i];

  • 40 years later...
Posted

not sure whether this patch is correct or not.

i queried the data on UDB392:

UNIT_FLAG_PVP:

SELECT COUNT(*) FROM creature_template WHERE unit_flags & 4096;

-> 1542

UNIT_FLAG_PVP_ATTACKABLE:

SELECT COUNT(*) FROM creature_template WHERE unit_flags & 8;

-> 0

Guest
This topic is now closed to further replies.
×
×
  • 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