Core: Clean up script variables to make variables consistant/standardized, and some additional warning-removals:

+ Fix compilewarning in Unit.cpp
+ Remove/comment out unused parameters for some commandscripts/scripts (warnings)
+ Replace "plr" with "player" all over the scriptbase for consistency
This commit is contained in:
click
2011-07-01 03:00:39 +02:00
parent ed4c9986c1
commit a9c9ab0efa
35 changed files with 485 additions and 485 deletions
@@ -60,13 +60,13 @@ public:
{
if (FlyBackTimer <= diff)
{
Player* plr = NULL;
Player* player = NULL;
if (me->isSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
if (summoner->GetTypeId() == TYPEID_PLAYER)
plr = CAST_PLR(summoner);
player = CAST_PLR(summoner);
if (!plr)
if (!player)
phase = 3;
switch(phase)
@@ -77,19 +77,19 @@ public:
FlyBackTimer = 500;
break;
case 1:
plr->GetClosePoint(x, y, z, me->GetObjectSize());
player->GetClosePoint(x, y, z, me->GetObjectSize());
z += 2.5; x -= 2; y -= 1.5;
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetUInt64Value(UNIT_FIELD_TARGET, plr->GetGUID());
me->SetUInt64Value(UNIT_FIELD_TARGET, player->GetGUID());
me->SetVisible(true);
FlyBackTimer = 4500;
break;
case 2:
if (!plr->isRessurectRequested())
if (!player->isRessurectRequested())
{
me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01);
DoCast(plr, SPELL_REVIVE, true);
me->MonsterWhisper(VALK_WHISPER, plr->GetGUID());
DoCast(player, SPELL_REVIVE, true);
me->MonsterWhisper(VALK_WHISPER, player->GetGUID());
}
FlyBackTimer = 5000;
break;
@@ -470,8 +470,8 @@ public:
wp_reached = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
SaySound(SAY_ENTRANCE);
if (Unit* plr = Unit::GetUnit((*me), PlayerGUID))
DoStartMovement(plr);
if (Unit* player = Unit::GetUnit((*me), PlayerGUID))
DoStartMovement(player);
break;
}
}
@@ -490,9 +490,9 @@ public:
if (withhead && Phase != 0)
ScriptedAI::MoveInLineOfSight(who);
}
void KilledUnit(Unit* plr)
void KilledUnit(Unit* player)
{
if (plr->GetTypeId() == TYPEID_PLAYER)
if (player->GetTypeId() == TYPEID_PLAYER)
{
if (withhead)
SaySound(SAY_PLAYER_DEATH);
@@ -625,19 +625,19 @@ public:
if (say_timer <= diff)
{
say_timer = 3000;
Player* plr = SelectRandomPlayer(100.0f, false);
Player* player = SelectRandomPlayer(100.0f, false);
if (count < 3)
{
if (plr)
plr->Say(Text[count], 0);
if (player)
player->Say(Text[count], 0);
}
else
{
DoCast(me, SPELL_RHYME_BIG);
if (plr)
if (player)
{
plr->Say(Text[count], 0);
plr->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
player->Say(Text[count], 0);
player->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
}
wp_reached = true;
IsFlying = true;
@@ -671,8 +671,8 @@ public:
case 2:
if (conflagrate <= diff)
{
if (Unit* plr = SelectRandomPlayer(30.0f))
DoCast(plr, SPELL_CONFLAGRATION, false);
if (Unit* player = SelectRandomPlayer(30.0f))
DoCast(player, SPELL_CONFLAGRATION, false);
conflagrate = urand(10000, 16000);
} else conflagrate -= diff;
break;
@@ -839,12 +839,12 @@ public:
return true;
pInstance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
}
/* if (soil->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER && plr->getLevel() > 64)
/* if (soil->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER && player->getLevel() > 64)
{
plr->PrepareQuestMenu(soil->GetGUID());
plr->SendPreparedQuest(soil->GetGUID());
player->PrepareQuestMenu(soil->GetGUID());
player->SendPreparedQuest(soil->GetGUID());
}
if (plr->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && plr->getLevel() > 64)
if (player->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && player->getLevel() > 64)
{ */
pPlayer->AreaExploredOrEventHappens(11405);
if (Creature* horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0))
@@ -128,9 +128,9 @@ public:
{
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* plr = itr->getSource();
if (plr && !plr->HasAura(45839, 0))
return plr;
Player* player = itr->getSource();
if (player && !player->HasAura(45839, 0))
return player;
}
}
@@ -130,9 +130,9 @@ public:
PlayerGUID = caster->GetGUID();
if (PlayerGUID)
{
Unit* plr = Unit::GetUnit((*me), PlayerGUID);
if (plr && CAST_PLR(plr)->GetQuestStatus(QUESTG) == QUEST_STATUS_INCOMPLETE)
DoCast(plr, 45110, true);
Unit* player = Unit::GetUnit((*me), PlayerGUID);
if (player && CAST_PLR(player)->GetQuestStatus(QUESTG) == QUEST_STATUS_INCOMPLETE)
DoCast(player, 45110, true);
}
DoCast(me, ENRAGE);
Unit* Myrmidon = me->FindNearestCreature(DM, 70);