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:
+2
-2
@@ -182,8 +182,8 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
// Summon Chromie and global whisper
|
||||
if (Creature* chromie = instance->SummonCreature(NPC_CHROMIE_2, ChromieSummonPos))
|
||||
if (!instance->GetPlayers().isEmpty())
|
||||
if (Player* plr = instance->GetPlayers().getFirst()->getSource())
|
||||
sCreatureTextMgr->SendChat(chromie, SAY_CRATES_COMPLETED, plr->GetGUID(), CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
if (Player* player = instance->GetPlayers().getFirst()->getSource())
|
||||
sCreatureTextMgr->SendChat(chromie, SAY_CRATES_COMPLETED, player->GetGUID(), CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
}
|
||||
DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, _crateCount);
|
||||
break;
|
||||
|
||||
+2
-2
@@ -78,8 +78,8 @@ public:
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
if (Player* player = itr->getSource())
|
||||
return player;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
if (Player* player = itr->getSource())
|
||||
return player;
|
||||
}
|
||||
}
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
|
||||
|
||||
@@ -522,14 +522,14 @@ public:
|
||||
|
||||
void HandleAnimation()
|
||||
{
|
||||
Player* plr = Unit::GetPlayer(*me, PlayerGUID);
|
||||
if (!plr)
|
||||
Player* player = Unit::GetPlayer(*me, PlayerGUID);
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
Unit* Fandral = plr->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
|
||||
Unit* Arygos = plr->FindNearestCreature(C_ARYGOS, 100.0f, me);
|
||||
Unit* Caelestrasz = plr->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
|
||||
Unit* Merithra = plr->FindNearestCreature(C_MERITHRA, 100.0f, me);
|
||||
Unit* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
|
||||
Unit* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f, me);
|
||||
Unit* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
|
||||
Unit* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f, me);
|
||||
|
||||
if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
|
||||
return;
|
||||
@@ -659,19 +659,19 @@ public:
|
||||
Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
|
||||
break; //Text: sands will stop
|
||||
case 34:
|
||||
DoCast(plr, 23017, true);//Arcane Channeling
|
||||
DoCast(player, 23017, true);//Arcane Channeling
|
||||
break;
|
||||
case 35:
|
||||
me->CastSpell(-8088, 1520.43f, 2.67f, 25158, true);
|
||||
break;
|
||||
case 36:
|
||||
DoCast(plr, 25159, true);
|
||||
DoCast(player, 25159, true);
|
||||
break;
|
||||
case 37:
|
||||
me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
|
||||
break;
|
||||
case 38:
|
||||
DoCast(plr, 25166, true);
|
||||
DoCast(player, 25166, true);
|
||||
me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
|
||||
break;
|
||||
case 39:
|
||||
@@ -719,11 +719,11 @@ public:
|
||||
uint32 entries[4] = { 15423, 15424, 15414, 15422 };
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
mob = plr->FindNearestCreature(entries[i], 50, me);
|
||||
mob = player->FindNearestCreature(entries[i], 50, me);
|
||||
while (mob)
|
||||
{
|
||||
mob->RemoveFromWorld();
|
||||
mob = plr->FindNearestCreature(15423, 50, me);
|
||||
mob = player->FindNearestCreature(15423, 50, me);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -755,14 +755,14 @@ public:
|
||||
me->GetMotionMaster()->MoveCharge(-8117.99f, 1532.24f, 3.94f, 4);
|
||||
break;
|
||||
case 60:
|
||||
if (plr)
|
||||
DoScriptText(ANACHRONOS_SAY_10, me, plr);
|
||||
if (player)
|
||||
DoScriptText(ANACHRONOS_SAY_10, me, player);
|
||||
me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
|
||||
break;
|
||||
case 61:
|
||||
me->GetMotionMaster()->MoveCharge(-8057.1f, 1470.32f, 2.61f, 6);
|
||||
if (plr->IsInRange(me, 0, 15))
|
||||
plr->GroupEventHappens(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD , me);
|
||||
if (player->IsInRange(me, 0, 15))
|
||||
player->GroupEventHappens(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD , me);
|
||||
break;
|
||||
case 62:
|
||||
me->SetDisplayId(15500);
|
||||
@@ -842,7 +842,7 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
//Player* plr = me->GetPlayer(PlayerGUID);
|
||||
//Player* player = me->GetPlayer(PlayerGUID);
|
||||
|
||||
if (!Timers)
|
||||
{
|
||||
@@ -1083,12 +1083,12 @@ class go_crystalline_tear : public GameObjectScript
|
||||
public:
|
||||
go_crystalline_tear() : GameObjectScript("go_crystalline_tear") { }
|
||||
|
||||
bool OnQuestAccept(Player* plr, GameObject* go, Quest const* quest)
|
||||
bool OnQuestAccept(Player* player, GameObject* go, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
|
||||
{
|
||||
|
||||
if (Unit* Anachronos_Quest_Trigger = go->FindNearestCreature(15454, 100, plr))
|
||||
if (Unit* Anachronos_Quest_Trigger = go->FindNearestCreature(15454, 100, player))
|
||||
{
|
||||
|
||||
Unit* Merithra = Anachronos_Quest_Trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
|
||||
@@ -1123,9 +1123,9 @@ public:
|
||||
|
||||
if (Anachronos)
|
||||
{
|
||||
CAST_AI(npc_anachronos_the_ancient::npc_anachronos_the_ancientAI, Anachronos->AI())->PlayerGUID = plr->GetGUID();
|
||||
CAST_AI(npc_anachronos_the_ancient::npc_anachronos_the_ancientAI, Anachronos->AI())->PlayerGUID = player->GetGUID();
|
||||
CAST_AI(npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI, CAST_CRE(Anachronos_Quest_Trigger)->AI())->Failed=false;
|
||||
CAST_AI(npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI, CAST_CRE(Anachronos_Quest_Trigger)->AI())->PlayerGUID = plr->GetGUID();
|
||||
CAST_AI(npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI, CAST_CRE(Anachronos_Quest_Trigger)->AI())->PlayerGUID = player->GetGUID();
|
||||
CAST_AI(npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI, CAST_CRE(Anachronos_Quest_Trigger)->AI())->EventStarted=true;
|
||||
CAST_AI(npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI, CAST_CRE(Anachronos_Quest_Trigger)->AI())->Announced=true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user