diff options
| author | Gyx <2359980687@qq.com> | 2012-04-01 19:56:41 +0800 |
|---|---|---|
| committer | Gyx <2359980687@qq.com> | 2012-04-01 19:56:41 +0800 |
| commit | a1c4786ba00948a1cac9d9b754d77218b9c0bc40 (patch) | |
| tree | c865bb5ec864d06547c99a224c39532de355018a /src/server/scripts/EasternKingdoms/ScarletMonastery | |
| parent | 00264e45cf7b815061ac6503988506ec454b8360 (diff) | |
Core/Script: Code style and some rewriting.
MoveInLineOfSight(Unit* unit) -> MoveInLineOfSight(Unit* who)
Signed-off-by: Gyx <2359980687@qq.com>
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletMonastery')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 31dc23d24af..813c43288d0 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -348,7 +348,7 @@ public: if (wait <= diff) { die = false; - if (Unit* body = Unit::GetUnit((*me), bodyGUID)) + if (Unit* body = Unit::GetUnit(*me, bodyGUID)) body->Kill(body); me->Kill(me); } @@ -475,7 +475,7 @@ public: wp_reached = false; me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SaySound(SAY_ENTRANCE); - if (Unit* player = Unit::GetUnit((*me), PlayerGUID)) + if (Unit* player = Unit::GetUnit(*me, PlayerGUID)) DoStartMovement(player); break; } @@ -586,7 +586,7 @@ public: std::list<HostileReference*>::const_iterator itr; for (itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr) { - Unit* unit = Unit::GetUnit((*me), (*itr)->getUnitGuid()); + Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (unit && unit->isAlive() && unit != caster) me->AddThreat(unit, caster->getThreatManager().getThreat(unit)); } @@ -606,7 +606,7 @@ public: if (!headGUID) headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID(); - Unit* Head = Unit::GetUnit((*me), headGUID); + Unit* Head = Unit::GetUnit(*me, headGUID); if (Head && Head->isAlive()) { Head->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -817,7 +817,7 @@ public: if (!debuffGUID) return; - Unit* debuff = Unit::GetUnit((*me), debuffGUID); + Unit* debuff = Unit::GetUnit(*me, debuffGUID); if (debuff) { debuff->SetVisible(false); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index ec6ac34b0bb..8d813bfe502 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -132,7 +132,7 @@ public: return; //On first death, fake death and open door, as well as initiate whitemane if exist - if (Unit* Whitemane = Unit::GetUnit((*me), instance->GetData64(DATA_WHITEMANE))) + if (Unit* Whitemane = Unit::GetUnit(*me, instance->GetData64(DATA_WHITEMANE))) { instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); @@ -181,7 +181,7 @@ public: if (_bHasDied && !_bHeal && instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { //On ressurection, stop fake death and heal whitemane and resume fight - if (Unit* Whitemane = Unit::GetUnit((*me), instance->GetData64(DATA_WHITEMANE))) + if (Unit* Whitemane = Unit::GetUnit(*me, instance->GetData64(DATA_WHITEMANE))) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetStandState(UNIT_STAND_STATE_STAND); @@ -292,7 +292,7 @@ public: //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out if (instance && Wait_Timer <= diff) { - if (Unit* Mograine = Unit::GetUnit((*me), instance->GetData64(DATA_MOGRAINE))) + if (Unit* Mograine = Unit::GetUnit(*me, instance->GetData64(DATA_MOGRAINE))) { DoCast(Mograine, SPELL_SCARLETRESURRECTION); DoScriptText(SAY_WH_RESSURECT, me); |
