Core: Cleaning up hungarian notation - Phase5: pWho -> who
This commit is contained in:
@@ -79,7 +79,7 @@ public:
|
||||
SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
@@ -372,9 +372,9 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (pInstance)
|
||||
@@ -385,8 +385,8 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
{
|
||||
if (!pAdd->getVictim() && pAdd != me)
|
||||
{
|
||||
pWho->SetInCombatWith(pAdd);
|
||||
pAdd->AddThreat(pWho, 0.0f);
|
||||
who->SetInCombatWith(pAdd);
|
||||
pAdd->AddThreat(who, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,8 +395,8 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
{
|
||||
if (pDelrissa->isAlive() && !pDelrissa->getVictim())
|
||||
{
|
||||
pWho->SetInCombatWith(pDelrissa);
|
||||
pDelrissa->AddThreat(pWho, 0.0f);
|
||||
who->SetInCombatWith(pDelrissa);
|
||||
pDelrissa->AddThreat(who, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -618,7 +618,7 @@ public:
|
||||
boss_priestess_lackey_commonAI::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoCast(me, SPELL_SUMMON_IMP);
|
||||
}
|
||||
|
||||
@@ -657,13 +657,13 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (PlayerGUID || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(me, INTERACTION_DISTANCE))
|
||||
if (PlayerGUID || who->GetTypeId() != TYPEID_PLAYER || !who->IsWithinDist(me, INTERACTION_DISTANCE))
|
||||
return;
|
||||
|
||||
if (MeetQuestCondition(pWho))
|
||||
PlayerGUID = pWho->GetGUID();
|
||||
if (MeetQuestCondition(who))
|
||||
PlayerGUID = who->GetGUID();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_MO_AGGRO, me);
|
||||
DoCast(me, SPELL_RETRIBUTIONAURA);
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pWho*/, const SpellEntry* pSpell)
|
||||
void SpellHit(Unit* /*who*/, const SpellEntry* pSpell)
|
||||
{
|
||||
//When hit with ressurection say text
|
||||
if (pSpell->Id == SPELL_SCARLETRESURRECTION)
|
||||
@@ -260,15 +260,15 @@ public:
|
||||
m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED)
|
||||
return;
|
||||
|
||||
ScriptedAI::AttackStart(pWho);
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_WH_INTRO, me);
|
||||
}
|
||||
|
||||
@@ -182,11 +182,11 @@ public:
|
||||
IsIntro = false;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho || Intro || IsIntro)
|
||||
if (!who || Intro || IsIntro)
|
||||
return;
|
||||
ScriptedAI::AttackStart(pWho);
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void DoIntro()
|
||||
|
||||
@@ -103,7 +103,7 @@ class boss_arlokk : public CreatureScript
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
|
||||
pSummoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
@@ -130,9 +130,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pWho->GetEntry() == NPC_MARAUDING_OWL || pWho->GetEntry() == NPC_VILE_AMBUSHER)
|
||||
if (who->GetEntry() == NPC_MARAUDING_OWL || who->GetEntry() == NPC_VILE_AMBUSHER)
|
||||
return;
|
||||
|
||||
if (rand()%1)
|
||||
@@ -236,13 +236,13 @@ public:
|
||||
npc_escortAI::JustRespawned();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (pWho->GetEntry() == NPC_OUTRUNNER && !m_bIsByOutrunner)
|
||||
if (who->GetEntry() == NPC_OUTRUNNER && !m_bIsByOutrunner)
|
||||
{
|
||||
DoScriptText(SAY_RIN_BY_OUTRUNNER, pWho);
|
||||
DoScriptText(SAY_RIN_BY_OUTRUNNER, who);
|
||||
m_bIsByOutrunner = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -335,12 +335,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (Creature* pMarzon = Unit::GetCreature(*me, MarzonGUID))
|
||||
{
|
||||
if (pMarzon->isAlive() && !pMarzon->isInCombat())
|
||||
pMarzon->AI()->AttackStart(pWho);
|
||||
pMarzon->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ public:
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_MARZON_2, me);
|
||||
|
||||
@@ -481,7 +481,7 @@ public:
|
||||
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
if (pSummoner && pSummoner->GetTypeId() == TYPEID_UNIT && pSummoner->isAlive() && !pSummoner->isInCombat())
|
||||
pSummoner->ToCreature()->AI()->AttackStart(pWho);
|
||||
pSummoner->ToCreature()->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,10 +76,10 @@ public:
|
||||
m_uiPeriodicSay = 6000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
DoScriptText(RAND(SAY_ATTACKED_1, SAY_ATTACKED_2), me, pWho);
|
||||
DoScriptText(RAND(SAY_ATTACKED_1, SAY_ATTACKED_2), me, who);
|
||||
}
|
||||
|
||||
void WaypointStart(uint32 uiPointId)
|
||||
|
||||
@@ -255,13 +255,13 @@ public:
|
||||
{
|
||||
npc_andorhal_towerAI(Creature* c) : Scripted_NoMovementAI(c) {}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!pWho || pWho->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!who || who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (me->FindNearestGameObject(GO_BEACON_TORCH, 10.0f))
|
||||
CAST_PLR(pWho)->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
|
||||
CAST_PLR(who)->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/){}
|
||||
void EnterCombat(Unit* /*who*/){}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
|
||||
@@ -149,18 +149,18 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, false))
|
||||
if (me->Attack(who, false))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
me->GetMotionMaster()->MoveChase(pWho, 30.0f);
|
||||
me->GetMotionMaster()->MoveChase(who, 30.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
|
||||
@@ -121,18 +121,18 @@ class example_creature : public CreatureScript
|
||||
|
||||
// *** HANDLED FUNCTION ***
|
||||
// Enter Combat called once per combat
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
//Say some stuff
|
||||
DoScriptText(SAY_AGGRO, me, pWho);
|
||||
DoScriptText(SAY_AGGRO, me, who);
|
||||
}
|
||||
|
||||
// *** HANDLED FUNCTION ***
|
||||
// Attack Start is called when victim change (including at start of combat)
|
||||
// By default, attack pWho and start movement toward the victim.
|
||||
//void AttackStart(Unit* pWho)
|
||||
// By default, attack who and start movement toward the victim.
|
||||
//void AttackStart(Unit* who)
|
||||
//{
|
||||
// ScriptedAI::AttackStart(pWho);
|
||||
// ScriptedAI::AttackStart(who);
|
||||
//}
|
||||
|
||||
// *** HANDLED FUNCTION ***
|
||||
|
||||
@@ -98,7 +98,7 @@ class example_escort : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->SetInCombatWithZone();
|
||||
|
||||
@@ -350,7 +350,7 @@ class npc_muglash : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
if (HasEscortState(STATE_ESCORT_PAUSED))
|
||||
|
||||
@@ -101,13 +101,13 @@ public:
|
||||
m_uiFallAsleepTimer = urand(10000, 45000);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_LILADRIS)
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && who->GetEntry() == NPC_LILADRIS)
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, INTERACTION_DISTANCE*5))
|
||||
if (me->IsWithinDistInMap(who, INTERACTION_DISTANCE*5))
|
||||
{
|
||||
if (Player* player = GetLeaderForFollower())
|
||||
{
|
||||
@@ -368,15 +368,15 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_GELKAK)
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && who->GetEntry() == NPC_GELKAK)
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, 10.0f))
|
||||
if (me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
DoScriptText(SAY_AT_CLOSE, pWho);
|
||||
DoScriptText(SAY_AT_CLOSE, who);
|
||||
DoAtEnd();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,16 +118,16 @@ public:
|
||||
m_uiDespawnTimer = 0;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (pWho->GetEntry() == NPC_SMEED)
|
||||
if (who->GetEntry() == NPC_SMEED)
|
||||
{
|
||||
if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return;
|
||||
|
||||
if (me->IsWithinDistInMap(pWho, 10.0f))
|
||||
if (me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
DoScriptText(RAND(SAY_SMEED_HOME_1, SAY_SMEED_HOME_2, SAY_SMEED_HOME_3), pWho);
|
||||
DoScriptText(RAND(SAY_SMEED_HOME_1, SAY_SMEED_HOME_2, SAY_SMEED_HOME_3), who);
|
||||
|
||||
//spell have no implemented effect (dummy), so useful to notify spellHit
|
||||
DoCast(me, SPELL_KODO_KOMBO_GOSSIP, true);
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/) { }
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
|
||||
void Reset() {}
|
||||
|
||||
|
||||
@@ -510,18 +510,18 @@ public:
|
||||
MoveToDock();
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
if (IsCombatMovementAllowed())
|
||||
me->GetMotionMaster()->MoveChase(pWho);
|
||||
me->GetMotionMaster()->MoveChase(who);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,9 +653,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_ATTACKED_1, me, pWho);
|
||||
DoScriptText(SAY_ATTACKED_1, me, who);
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
|
||||
@@ -541,13 +541,13 @@ public:
|
||||
TortaGUID = 0;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE | STATE_FOLLOW_POSTEVENT) && pWho->GetEntry() == NPC_TORTA)
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE | STATE_FOLLOW_POSTEVENT) && who->GetEntry() == NPC_TORTA)
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, INTERACTION_DISTANCE))
|
||||
if (me->IsWithinDistInMap(who, INTERACTION_DISTANCE))
|
||||
{
|
||||
if (Player* player = GetLeaderForFollower())
|
||||
{
|
||||
@@ -555,7 +555,7 @@ public:
|
||||
player->GroupEventHappens(QUEST_TOOGA, me);
|
||||
}
|
||||
|
||||
TortaGUID = pWho->GetGUID();
|
||||
TortaGUID = who->GetGUID();
|
||||
SetFollowComplete(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,15 +70,15 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_ARYNIA)
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && who->GetEntry() == NPC_ARYNIA)
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, 10.0f))
|
||||
if (me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
DoScriptText(SAY_AT_HOME, pWho);
|
||||
DoScriptText(SAY_AT_HOME, who);
|
||||
DoComplete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,17 +158,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
//not always use
|
||||
if (rand()%4)
|
||||
return;
|
||||
|
||||
//only aggro text if not player and only in this area
|
||||
if (pWho->GetTypeId() != TYPEID_PLAYER && me->GetAreaId() == AREA_MERCHANT_COAST)
|
||||
if (who->GetTypeId() != TYPEID_PLAYER && me->GetAreaId() == AREA_MERCHANT_COAST)
|
||||
{
|
||||
//appears to be pretty much random (possible only if escorter not in combat with pWho yet?)
|
||||
DoScriptText(RAND(SAY_GIL_AGGRO_1, SAY_GIL_AGGRO_2, SAY_GIL_AGGRO_3, SAY_GIL_AGGRO_4), me, pWho);
|
||||
//appears to be pretty much random (possible only if escorter not in combat with who yet?)
|
||||
DoScriptText(RAND(SAY_GIL_AGGRO_1, SAY_GIL_AGGRO_2, SAY_GIL_AGGRO_3, SAY_GIL_AGGRO_4), me, who);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -217,13 +217,13 @@ public:
|
||||
SpraggleGUID = 0;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_SPRAGGLE)
|
||||
if (!me->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && who->GetEntry() == NPC_SPRAGGLE)
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, INTERACTION_DISTANCE))
|
||||
if (me->IsWithinDistInMap(who, INTERACTION_DISTANCE))
|
||||
{
|
||||
if (Player* player = GetLeaderForFollower())
|
||||
{
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
player->GroupEventHappens(QUEST_A_LITTLE_HELP, me);
|
||||
}
|
||||
|
||||
SpraggleGUID = pWho->GetGUID();
|
||||
SpraggleGUID = who->GetGUID();
|
||||
SetFollowComplete(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_SARTHARION_AGGRO, me);
|
||||
DoZoneInCombat();
|
||||
@@ -1013,7 +1013,7 @@ public:
|
||||
m_bHasPortalOpen = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_TENEBRON_AGGRO, me);
|
||||
DoZoneInCombat();
|
||||
@@ -1109,7 +1109,7 @@ public:
|
||||
m_bHasPortalOpen = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_SHADRON_AGGRO, me);
|
||||
DoZoneInCombat();
|
||||
@@ -1208,7 +1208,7 @@ public:
|
||||
m_bHasPortalOpen = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_VESPERON_AGGRO, me);
|
||||
DoZoneInCombat();
|
||||
@@ -1523,9 +1523,9 @@ public:
|
||||
me->DealDamage(me, me->GetHealth());
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* pWho)
|
||||
void JustSummoned(Creature* who)
|
||||
{
|
||||
pWho->SetInCombatWithZone();
|
||||
who->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
@@ -1541,8 +1541,8 @@ public:
|
||||
m_uiHatchEggTimer -= uiDiff;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/) {}
|
||||
void MoveInLineOfSight(Unit* /*pWho*/) {}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
+3
-3
@@ -218,7 +218,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoCastSpellShield();
|
||||
}
|
||||
@@ -616,10 +616,10 @@ public:
|
||||
uiHexMendingTimer = urand(20000, 25000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoCast(me, SPELL_EARTH_SHIELD);
|
||||
DoCast(pWho, SPELL_HEX_OF_MENDING);
|
||||
DoCast(who, SPELL_HEX_OF_MENDING);
|
||||
};
|
||||
|
||||
void JustReachedHome()
|
||||
|
||||
+10
-10
@@ -185,9 +185,9 @@ public:
|
||||
m_vBurrowGUID.clear();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* pWho)
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, me);
|
||||
if (m_pInstance)
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*pWho*/)
|
||||
void MoveInLineOfSight(Unit* /*who*/)
|
||||
{
|
||||
if (!m_bIntro)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
DoCast(SPELL_FROST_SPHERE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*pWho*/, uint32& uiDamage)
|
||||
void DamageTaken(Unit* /*who*/, uint32& uiDamage)
|
||||
{
|
||||
if (me->GetHealth() < uiDamage)
|
||||
{
|
||||
@@ -660,17 +660,17 @@ public:
|
||||
m_uiTargetGUID = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
m_uiTargetGUID = pWho->GetGUID();
|
||||
DoCast(pWho, SPELL_MARK);
|
||||
m_uiTargetGUID = who->GetGUID();
|
||||
DoCast(who, SPELL_MARK);
|
||||
me->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_uiSpeed = 0;
|
||||
m_uiIncreaseSpeedTimer = 1*IN_MILLISECONDS;
|
||||
me->TauntApply(pWho);
|
||||
me->TauntApply(who);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*pWho*/, uint32& uiDamage)
|
||||
void DamageTaken(Unit* /*who*/, uint32& uiDamage)
|
||||
{
|
||||
uiDamage = 0;
|
||||
}
|
||||
|
||||
+12
-12
@@ -406,20 +406,20 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
return count;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho) return;
|
||||
if (!who) return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 10.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->AddThreat(who, 10.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
if (mAIType == AI_MELEE || mAIType == AI_PET)
|
||||
DoStartMovement(pWho);
|
||||
DoStartMovement(who);
|
||||
else
|
||||
DoStartMovement(pWho, 20.0f);
|
||||
DoStartMovement(who, 20.0f);
|
||||
SetCombatMovement(true);
|
||||
}
|
||||
}
|
||||
@@ -872,9 +872,9 @@ public:
|
||||
DoCast(me, SPELL_SHADOWFORM);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
boss_faction_championsAI::EnterCombat(pWho);
|
||||
boss_faction_championsAI::EnterCombat(who);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
@@ -1865,9 +1865,9 @@ public:
|
||||
SetEquipmentSlots(false, 47519, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
boss_faction_championsAI::EnterCombat(pWho);
|
||||
boss_faction_championsAI::EnterCombat(who);
|
||||
DoCast(SPELL_SEAL_OF_COMMAND);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -141,9 +141,9 @@ public:
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* pWho)
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
Summons.Summon(pSummoned);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (m_pInstance)
|
||||
|
||||
+11
-11
@@ -162,7 +162,7 @@ public:
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
|
||||
@@ -265,11 +265,11 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
m_uiTargetGUID = pWho->GetGUID();
|
||||
me->TauntApply(pWho);
|
||||
DoCast(pWho, SPELL_SNOBOLLED);
|
||||
m_uiTargetGUID = who->GetGUID();
|
||||
me->TauntApply(who);
|
||||
DoCast(who, SPELL_SNOBOLLED);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
|
||||
@@ -402,16 +402,16 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* pWho)
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (instanceScript)
|
||||
instanceScript->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (instanceScript)
|
||||
@@ -756,16 +756,16 @@ public:
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* pWho)
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
|
||||
|
||||
+5
-5
@@ -195,9 +195,9 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* pWho)
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, me);
|
||||
if (m_pInstance)
|
||||
@@ -302,7 +302,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
return Unit::GetCreature((*me), m_pInstance->GetData64(m_uiSisterNpcId));
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (m_pInstance)
|
||||
@@ -474,9 +474,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
boss_twin_baseAI::EnterCombat(pWho);
|
||||
boss_twin_baseAI::EnterCombat(who);
|
||||
if (m_pInstance)
|
||||
{
|
||||
m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
|
||||
|
||||
+4
-4
@@ -120,7 +120,7 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/) {}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
@@ -530,7 +530,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/) {}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
@@ -844,7 +844,7 @@ class npc_garrosh_toc : public CreatureScript
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/) {}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
@@ -922,7 +922,7 @@ class npc_varian_toc : public CreatureScript
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/) {}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
|
||||
@@ -796,7 +796,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pWho*/)
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
DoCast(SPELL_HALLUCINATION_2);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
pInstance->SetData(DATA_MOORABI_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoCast(me, SPELL_MOJO_FRENZY, true);
|
||||
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
magneticPullTimer = 20000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoCast(SPELL_STALAGG_TESLA);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ public:
|
||||
staticFieldTimer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoCast(SPELL_FEUGEN_TESLA);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
timeBombTimer = urand(20000, 25000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
@@ -139,24 +139,24 @@ public:
|
||||
instance->SetData(DATA_UROM_PLATAFORM, instance->GetData(DATA_UROM_PLATAFORM)+1);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->GetPositionZ() > 518.63f)
|
||||
DoStartNoMovement(pWho);
|
||||
DoStartNoMovement(who);
|
||||
|
||||
if (me->GetPositionZ() < 518.63f)
|
||||
{
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
DoScriptText(SayAggro[3], me);
|
||||
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
me->GetMotionMaster()->MoveChase(pWho, 0, 0);
|
||||
me->GetMotionMaster()->MoveChase(who, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
m_pInstance->SetData(TYPE_BJARNGRIM, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
@@ -385,14 +385,14 @@ public:
|
||||
m_uiRenewSteel_Timer = 10000 + rand()%1000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature* pBjarngrim = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_BJARNGRIM)))
|
||||
{
|
||||
if (pBjarngrim->isAlive() && !pBjarngrim->getVictim())
|
||||
pBjarngrim->AI()->AttackStart(pWho);
|
||||
pBjarngrim->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
m_pInstance->SetData(TYPE_VOLKHAN, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
@@ -133,16 +133,16 @@ public:
|
||||
m_pInstance->SetData(TYPE_VOLKHAN, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
if (!m_bHasTemper)
|
||||
me->GetMotionMaster()->MoveChase(pWho);
|
||||
me->GetMotionMaster()->MoveChase(who);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,16 +395,16 @@ public:
|
||||
m_uiImmolation_Timer = 5000;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
if (!m_bIsFrozen)
|
||||
me->GetMotionMaster()->MoveChase(pWho);
|
||||
me->GetMotionMaster()->MoveChase(who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me);
|
||||
_EnterCombat();
|
||||
|
||||
@@ -123,12 +123,12 @@ public:
|
||||
pInstance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (Phase == IDLE && pWho->isTargetableForAttack() && me->IsHostileTo(pWho) && me->IsWithinDistInMap(pWho, 40))
|
||||
if (Phase == IDLE && who->isTargetableForAttack() && me->IsHostileTo(who) && me->IsWithinDistInMap(who, 40))
|
||||
{
|
||||
Phase = INTRO;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
@@ -95,34 +95,34 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
|
||||
if (Creature* pGuard1 = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_EREKEM_GUARD_1) : 0))
|
||||
{
|
||||
pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (!pGuard1->getVictim() && pGuard1->AI())
|
||||
pGuard1->AI()->AttackStart(pWho);
|
||||
pGuard1->AI()->AttackStart(who);
|
||||
}
|
||||
if (Creature* pGuard2 = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_EREKEM_GUARD_2) : 0))
|
||||
{
|
||||
pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (!pGuard2->getVictim() && pGuard2->AI())
|
||||
pGuard2->AI()->AttackStart(pWho);
|
||||
pGuard2->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoCast(me, SPELL_EARTH_SHIELD);
|
||||
@@ -288,17 +288,17 @@ public:
|
||||
uiGushingWoundTimer = urand(1000, 3000);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
@@ -138,17 +138,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*pWho*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
DoCast(me, SPELL_WATER_GLOBULE);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/)
|
||||
void AttackStart(Unit* /*who*/)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -85,17 +85,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,17 +78,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,21 +121,21 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*pWho*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
|
||||
@@ -89,17 +89,17 @@ public:
|
||||
voidDance = true;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
DoStartMovement(pWho);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
DoStartMovement(who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -502,24 +502,24 @@ public:
|
||||
{
|
||||
npc_fezzix_geartwistAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(pWho);
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
if (pWho->GetTypeId() != TYPEID_UNIT)
|
||||
if (who->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
if (pWho->GetEntry() == NPC_JENNY && me->IsWithinDistInMap(pWho, 10.0f))
|
||||
if (who->GetEntry() == NPC_JENNY && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (Unit* pOwner = pWho->GetOwner())
|
||||
if (Unit* pOwner = who->GetOwner())
|
||||
{
|
||||
if (pOwner->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (pWho->HasAura(SPELL_CRATES_CARRIED))
|
||||
if (who->HasAura(SPELL_CRATES_CARRIED))
|
||||
{
|
||||
pOwner->CastSpell(pOwner, SPELL_GIVE_JENNY_CREDIT, true); // Maybe is not working.
|
||||
CAST_PLR(pOwner)->CompleteQuest(QUEST_LOADER_UP);
|
||||
CAST_CRE(pWho)->DisappearAndDie();
|
||||
CAST_CRE(who)->DisappearAndDie();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -860,10 +860,10 @@ public:
|
||||
HarpoonerGUID = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (me->canAttack(pWho))
|
||||
AttackStart(pWho);
|
||||
if (me->canAttack(who))
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
@@ -876,16 +876,16 @@ public:
|
||||
WithRedDragonBlood = true;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!HarpoonerGUID)
|
||||
return;
|
||||
|
||||
if (me->HasAura(SPELL_SUBDUED) && pWho->GetEntry() == NPC_RAELORASZ)
|
||||
if (me->HasAura(SPELL_SUBDUED) && who->GetEntry() == NPC_RAELORASZ)
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, INTERACTION_DISTANCE))
|
||||
if (me->IsWithinDistInMap(who, INTERACTION_DISTANCE))
|
||||
{
|
||||
if (Player* pHarpooner = Unit::GetPlayer(*me, HarpoonerGUID))
|
||||
{
|
||||
@@ -1616,10 +1616,10 @@ public:
|
||||
bEnslaved = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (me->canAttack(pWho))
|
||||
AttackStart(pWho);
|
||||
if (me->canAttack(who))
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
|
||||
@@ -1636,11 +1636,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
FollowerAI::MoveInLineOfSight(pWho);
|
||||
FollowerAI::MoveInLineOfSight(who);
|
||||
|
||||
if (pWho->GetEntry() == NPC_LIBRARIAN_DONATHAN && me->IsWithinDistInMap(pWho, INTERACTION_DISTANCE))
|
||||
if (who->GetEntry() == NPC_LIBRARIAN_DONATHAN && me->IsWithinDistInMap(who, INTERACTION_DISTANCE))
|
||||
{
|
||||
SetFollowComplete();
|
||||
me->DisappearAndDie();
|
||||
@@ -1702,7 +1702,7 @@ public:
|
||||
CasterGUID = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2278,9 +2278,9 @@ public:
|
||||
m_uiTimer = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/) {}
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/) {}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
|
||||
@@ -57,19 +57,19 @@ public:
|
||||
|
||||
void Reset(){}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/){}
|
||||
void EnterCombat(Unit* /*who*/){}
|
||||
|
||||
void AttackStart(Unit* /*pWho*/){}
|
||||
void AttackStart(Unit* /*who*/){}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!pWho || !pWho->IsInWorld() || pWho->GetZoneId() != 4395)
|
||||
if (!who || !who->IsInWorld() || who->GetZoneId() != 4395)
|
||||
return;
|
||||
|
||||
if (!me->IsWithinDist(pWho, 65.0f, false))
|
||||
if (!me->IsWithinDist(who, 65.0f, false))
|
||||
return;
|
||||
|
||||
Player* player = pWho->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
|
||||
if (!player || player->isGameMaster() || player->IsBeingTeleported())
|
||||
return;
|
||||
@@ -81,11 +81,11 @@ public:
|
||||
{
|
||||
if (GetClosestCreatureWithEntry(me, NPC_APPLEBOUGH_A, 32.0f))
|
||||
{
|
||||
if (me->isInBackInMap(pWho, 12.0f)) // In my line of sight, "outdoors", and behind me
|
||||
DoCast(pWho, SPELL_TRESPASSER_A); // Teleport the Horde unit out
|
||||
if (me->isInBackInMap(who, 12.0f)) // In my line of sight, "outdoors", and behind me
|
||||
DoCast(who, SPELL_TRESPASSER_A); // Teleport the Horde unit out
|
||||
}
|
||||
else // In my line of sight, and "indoors"
|
||||
DoCast(pWho, SPELL_TRESPASSER_A); // Teleport the Horde unit out
|
||||
DoCast(who, SPELL_TRESPASSER_A); // Teleport the Horde unit out
|
||||
}
|
||||
break;
|
||||
case 29255:
|
||||
@@ -93,11 +93,11 @@ public:
|
||||
{
|
||||
if (GetClosestCreatureWithEntry(me, NPC_SWEETBERRY_H, 32.0f))
|
||||
{
|
||||
if (me->isInBackInMap(pWho, 12.0f)) // In my line of sight, "outdoors", and behind me
|
||||
DoCast(pWho, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
|
||||
if (me->isInBackInMap(who, 12.0f)) // In my line of sight, "outdoors", and behind me
|
||||
DoCast(who, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
|
||||
}
|
||||
else // In my line of sight, and "indoors"
|
||||
DoCast(pWho, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
|
||||
DoCast(who, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -356,21 +356,21 @@ public:
|
||||
{
|
||||
npc_guardian_pavilionAI(Creature* creature) : Scripted_NoMovementAI(creature) {}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (me->GetAreaId() != AREA_SUNREAVER_PAVILION && me->GetAreaId() != AREA_SILVER_COVENANT_PAVILION)
|
||||
return;
|
||||
|
||||
if (!pWho || pWho->GetTypeId() != TYPEID_PLAYER || !me->IsHostileTo(pWho) || !me->isInBackInMap(pWho, 5.0f))
|
||||
if (!who || who->GetTypeId() != TYPEID_PLAYER || !me->IsHostileTo(who) || !me->isInBackInMap(who, 5.0f))
|
||||
return;
|
||||
|
||||
if (pWho->HasAura(SPELL_TRESPASSER_H) || pWho->HasAura(SPELL_TRESPASSER_A))
|
||||
if (who->HasAura(SPELL_TRESPASSER_H) || who->HasAura(SPELL_TRESPASSER_A))
|
||||
return;
|
||||
|
||||
if (pWho->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
|
||||
pWho->CastSpell(pWho, SPELL_TRESPASSER_H, true);
|
||||
if (who->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
|
||||
who->CastSpell(who, SPELL_TRESPASSER_H, true);
|
||||
else
|
||||
pWho->CastSpell(pWho, SPELL_TRESPASSER_A, true);
|
||||
who->CastSpell(who, SPELL_TRESPASSER_A, true);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/) {}
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void Reset() {}
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@ public:
|
||||
DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true);
|
||||
}
|
||||
|
||||
void UnlockRageclaw(Unit* pWho)
|
||||
void UnlockRageclaw(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
Creature* Rageclaw = Unit::GetCreature(*me, RageclawGUID);
|
||||
@@ -628,9 +628,9 @@ public:
|
||||
uiBattleShoutTimer = 7000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoCast(pWho, SPELL_IMPALE);
|
||||
DoCast(who, SPELL_IMPALE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoCast(me, SPELL_GROW);
|
||||
}
|
||||
@@ -1195,12 +1195,12 @@ public:
|
||||
uiMissleTimer = urand(2000, 7000);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
AttackStartNoMove(pWho);
|
||||
AttackStartNoMove(who);
|
||||
}
|
||||
|
||||
void SetData(uint32 uiData, uint32 uiValue)
|
||||
|
||||
@@ -94,12 +94,12 @@ public:
|
||||
m_pInstance->SetData(TYPE_HELLMAW, FAIL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (me->HasAura(SPELL_BANISH))
|
||||
return;
|
||||
|
||||
npc_escortAI::MoveInLineOfSight(pWho);
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
|
||||
@@ -265,11 +265,11 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!Intro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isTargetableForAttack() && me->IsHostileTo(pWho) && pWho->isInAccessiblePlaceFor(me))
|
||||
if (!Intro && who->GetTypeId() == TYPEID_PLAYER && who->isTargetableForAttack() && me->IsHostileTo(who) && who->isInAccessiblePlaceFor(me))
|
||||
{
|
||||
if (me->IsWithinDistInMap(pWho, VISIBLE_RANGE) && me->IsWithinLOSInMap(pWho))
|
||||
if (me->IsWithinDistInMap(who, VISIBLE_RANGE) && me->IsWithinLOSInMap(who))
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
|
||||
@@ -278,12 +278,12 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
|
||||
AggroTargetGUID = pWho->GetGUID();
|
||||
AggroTargetGUID = who->GetGUID();
|
||||
Intro = true;
|
||||
}
|
||||
}
|
||||
if (Done)
|
||||
ScriptedAI::MoveInLineOfSight(pWho);
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
|
||||
@@ -339,18 +339,18 @@ public:
|
||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!pWho)
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
me->GetMotionMaster()->MoveChase(pWho, 30.0f);
|
||||
me->GetMotionMaster()->MoveChase(who, 30.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,14 +111,14 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->Attack(pWho, true))
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->GetMotionMaster()->MoveChase(pWho, 25.0f);
|
||||
me->AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
me->GetMotionMaster()->MoveChase(who, 25.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,12 +173,12 @@ public:
|
||||
DoCast(me, SPELL_ANCESTRAL_WOLF_BUFF, true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!pRyga && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(pWho, 15.0f))
|
||||
pRyga = pWho;
|
||||
if (!pRyga && who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
|
||||
pRyga = who;
|
||||
|
||||
npc_escortAI::MoveInLineOfSight(pWho);
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
|
||||
@@ -645,7 +645,7 @@ public:
|
||||
m_uiFrostShockTimer = 6000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoCast(me, SPELL_EARTHBIND_TOTEM, false);
|
||||
}
|
||||
|
||||
@@ -1022,18 +1022,18 @@ public:
|
||||
DoSummon(NPC_COILSKAR_ASSASSIN, me, 15.0f, 5000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
//don't always use
|
||||
if (rand()%5)
|
||||
return;
|
||||
|
||||
//only aggro text if not player
|
||||
if (pWho->GetTypeId() != TYPEID_PLAYER)
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
//appears to be random
|
||||
if (urand(0, 1))
|
||||
DoScriptText(RAND(SAY_WIL_AGGRO1, SAY_WIL_AGGRO2), pWho);
|
||||
DoScriptText(RAND(SAY_WIL_AGGRO1, SAY_WIL_AGGRO2), who);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -360,19 +360,19 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
return;
|
||||
|
||||
if (pWho->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (CAST_PLR(pWho)->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE)
|
||||
if (CAST_PLR(who)->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
float Radius = 10.0;
|
||||
if (me->IsWithinDistInMap(pWho, Radius))
|
||||
if (me->IsWithinDistInMap(who, Radius))
|
||||
{
|
||||
Start(false, false, pWho->GetGUID());
|
||||
Start(false, false, who->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,14 +174,14 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!m_pSpawnAssoc)
|
||||
return;
|
||||
|
||||
if (pWho->isTargetableForAttack() && me->IsHostileTo(pWho))
|
||||
if (who->isTargetableForAttack() && me->IsHostileTo(who))
|
||||
{
|
||||
Player* playerTarget = pWho->GetTypeId() == TYPEID_PLAYER ? CAST_PLR(pWho) : NULL;
|
||||
Player* playerTarget = who->GetTypeId() == TYPEID_PLAYER ? CAST_PLR(who) : NULL;
|
||||
|
||||
// airforce guards only spawn for players
|
||||
if (!playerTarget)
|
||||
@@ -197,10 +197,10 @@ public:
|
||||
{
|
||||
case SPAWNTYPE_ALARMBOT:
|
||||
{
|
||||
if (!pWho->IsWithinDistInMap(me, RANGE_GUARDS_MARK))
|
||||
if (!who->IsWithinDistInMap(me, RANGE_GUARDS_MARK))
|
||||
return;
|
||||
|
||||
Aura* pMarkAura = pWho->GetAura(SPELL_GUARDS_MARK);
|
||||
Aura* pMarkAura = who->GetAura(SPELL_GUARDS_MARK);
|
||||
if (pMarkAura)
|
||||
{
|
||||
// the target wasn't able to move out of our range within 25 seconds
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
if (pMarkAura->GetDuration() < AURA_DURATION_TIME_LEFT)
|
||||
{
|
||||
if (!pLastSpawnedGuard->getVictim())
|
||||
pLastSpawnedGuard->AI()->AttackStart(pWho);
|
||||
pLastSpawnedGuard->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -226,13 +226,13 @@ public:
|
||||
if (!pLastSpawnedGuard)
|
||||
return;
|
||||
|
||||
pLastSpawnedGuard->CastSpell(pWho, SPELL_GUARDS_MARK, true);
|
||||
pLastSpawnedGuard->CastSpell(who, SPELL_GUARDS_MARK, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPAWNTYPE_TRIPWIRE_ROOFTOP:
|
||||
{
|
||||
if (!pWho->IsWithinDistInMap(me, RANGE_TRIPWIRE))
|
||||
if (!who->IsWithinDistInMap(me, RANGE_TRIPWIRE))
|
||||
return;
|
||||
|
||||
if (!pLastSpawnedGuard)
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
if (!playerTarget->IsFlying())
|
||||
{
|
||||
if (!pLastSpawnedGuard->getVictim())
|
||||
pLastSpawnedGuard->AI()->AttackStart(pWho);
|
||||
pLastSpawnedGuard->AI()->AttackStart(who);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user