*Move SelectHostilTarget() to class Creature and return getVictim() directly.

*Fix the crash caused by mandokir script.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-21 14:17:29 -06:00
parent 148192eca1
commit d81d81b211
5 changed files with 38 additions and 27 deletions
+3 -2
View File
@@ -1238,7 +1238,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void AddThreat(Unit* pVictim, float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellEntry const *threatSpell = NULL);
float ApplyTotalThreatModifier(float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL);
void DeleteThreatList();
bool SelectHostilTarget();
//bool SelectHostilTarget();
void TauntApply(Unit* pVictim);
void TauntFadeOut(Unit *taunter);
ThreatManager& getThreatManager() { return m_ThreatManager; }
@@ -1450,6 +1450,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
uint32 m_reactiveTimer[MAX_REACTIVE];
ThreatManager m_ThreatManager;
private:
void SendAttackStop(Unit* victim); // only from AttackStop(Unit*)
//void SendAttackStart(Unit* pVictim); // only from Unit::AttackStart(Unit*)
@@ -1469,7 +1470,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
Diminishing m_Diminishing;
// Manage all Units threatening us
ThreatManager m_ThreatManager;
// ThreatManager m_ThreatManager;
// Manage all Units that are threatened by us
HostilRefManager m_HostilRefManager;