diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index ae9a6b421..238f2c3c3 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -2392,3 +2392,18 @@ void Creature::ApplyGameEventSpells(GameEventCreatureData const* eventData, bool if (cast_spell) CastSpell(this, cast_spell, true); } + +void Creature::FillGuidsListFromThreatList( std::vector& guids, uint32 maxamount /*= 0*/ ) +{ + if (!CanHaveThreatList()) + return; + + ThreatList const& threats = getThreatManager().getThreatList(); + + maxamount = maxamount > 0 ? std::min(maxamount,uint32(threats.size())) : threats.size(); + + guids.reserve(guids.size() + maxamount); + + for (ThreatList::const_iterator itr = threats.begin(); maxamount && itr != threats.end(); ++itr, --maxamount) + guids.push_back((*itr)->getUnitGuid()); +} diff --git a/src/game/Creature.h b/src/game/Creature.h index 563ccb56a..9233a091c 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -430,7 +430,10 @@ class MANGOS_DLL_SPEC Creature : public Unit bool IsTrainerOf(Player* player, bool msg) const; bool CanInteractWithBattleMaster(Player* player, bool msg) const; bool CanTrainAndResetTalentsOf(Player* pPlayer) const; + bool IsOutOfThreatArea(Unit* pVictim) const; + void FillGuidsListFromThreatList(std::vector& guids, uint32 maxamount = 0); + bool IsImmuneToSpell(SpellEntry const* spellInfo); // redefine Unit::IsImmuneToSpell bool IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3f47582c0..7cdcdc6f6 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11135" + #define REVISION_NR "11136" #endif // __REVISION_NR_H__