diff options
| author | Rat <none@none> | 2010-04-14 23:07:41 +0200 |
|---|---|---|
| committer | Rat <none@none> | 2010-04-14 23:07:41 +0200 |
| commit | 6bcb297de4d5231373a3e2bf2b40e527b91cdf46 (patch) | |
| tree | a5379b14ceb2ac9e7273143b334bfc693e2ef042 /src/game/ScriptedCreature.h | |
| parent | cc262e1cde544eb7cf643df79fa00c9f34af4785 (diff) | |
*code cleanup
*totally destroyed m_creature, use "me" for future coding
--HG--
branch : trunk
Diffstat (limited to 'src/game/ScriptedCreature.h')
| -rw-r--r-- | src/game/ScriptedCreature.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/ScriptedCreature.h b/src/game/ScriptedCreature.h index 605bc7c3bc3..b416b9f3781 100644 --- a/src/game/ScriptedCreature.h +++ b/src/game/ScriptedCreature.h @@ -29,7 +29,7 @@ class ScriptedInstance; class SummonList : public std::list<uint64> { public: - explicit SummonList(Creature* creature) : m_creature(creature) {} + explicit SummonList(Creature* creature) : me(creature) {} void Summon(Creature *summon) { push_back(summon->GetGUID()); } void Despawn(Creature *summon) { remove(summon->GetGUID()); } void DespawnEntry(uint32 entry); @@ -37,7 +37,7 @@ class SummonList : public std::list<uint64> void DoAction(uint32 entry, uint32 info); void DoZoneInCombat(uint32 entry = 0); private: - Creature *m_creature; + Creature *me; }; struct ScriptedAI : public CreatureAI @@ -86,7 +86,7 @@ struct ScriptedAI : public CreatureAI //************* //Pointer to creature we are manipulating - Creature* m_creature; + Creature* me; //For fleeing bool IsFleeing; @@ -144,16 +144,16 @@ struct ScriptedAI : public CreatureAI //Returns a list of all friendly units missing a specific buff within range std::list<Creature*> DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellId); - //Return a player with at least minimumRange from m_creature + //Return a player with at least minimumRange from me Player* GetPlayerAtMinimumRange(float fMinimumRange); - //Spawns a creature relative to m_creature + //Spawns a creature relative to me Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime); //Selects a unit from the creature's current aggro list Unit* SelectUnit(SelectAggroTarget pTarget, uint32 uiPosition); - bool HealthBelowPct(uint32 pct) const { return me->GetHealth() * 100 < m_creature->GetMaxHealth() * pct; } + bool HealthBelowPct(uint32 pct) const { return me->GetHealth() * 100 < me->GetMaxHealth() * pct; } //Returns spells that meet the specified criteria from the creatures spell list SpellEntry const* SelectSpell(Unit* Target, int32 School, int32 Mechanic, SelectTargetType Targets, uint32 PowerCostMin, uint32 PowerCostMax, float RangeMin, float RangeMax, SelectEffect Effect); @@ -238,7 +238,7 @@ struct Scripted_NoMovementAI : public ScriptedAI Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {} virtual ~Scripted_NoMovementAI() {} - //Called at each attack of m_creature by any victim + //Called at each attack of me by any victim void AttackStart(Unit* who); }; |
