Created
August 1, 2012 00:45
-
-
Save Nighoo/3222061 to your computer and use it in GitHub Desktop.
Set PvP enabled on Creatures with flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit e13386802dbbdfc25f986b3cb092241752b1b78d | |
Author: Nighoo <nighoo@overninethousand.de> | |
Date: Tue Mar 20 21:20:51 2012 +0100 | |
Set PvP enabled on Creatures with flag | |
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp | |
index 90cfa9c..56a2a49 100644 | |
--- a/src/game/Creature.cpp | |
+++ b/src/game/Creature.cpp | |
@@ -389,6 +389,9 @@ bool Creature::UpdateEntry(uint32 Entry, Team team, const CreatureData *data /*= | |
SetPvP(false); | |
} | |
+ 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]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment