Core: Codestyle clean-up
"plr"->player Note: codestyle methods needs maintained, Player* player.
This commit is contained in:
1 parent
c51f6e7fa0
commit
f75ec5ba2b
67 files changed
+852
-852
No files matched your search
@@ -5344,11 +5344,11 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 64142: // Upper Deck - Create Foam Sword
|
||||
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
Player* plr = unitTarget->ToPlayer();
|
||||
Player* player = unitTarget->ToPlayer();
|
||||
static uint32 const itemId[] = {45061, 45176, 45177, 45178, 45179, 0};
|
||||
// player can only have one of these items
|
||||
for (uint32 const* itr = &itemId[0]; *itr; ++itr)
|
||||
if (plr->HasItemCount(*itr, 1, true))
|
||||
if (player->HasItemCount(*itr, 1, true))
|
||||
return;
|
||||
DoCreateItem(effIndex, itemId[urand(0, 4)]);
|
||||
return;
|
||||
@@ -6155,15 +6155,15 @@ void Spell::EffectSelfResurrect(SpellEffIndex effIndex)
|
||||
mana = CalculatePctN(m_caster->GetMaxPower(POWER_MANA), damage);
|
||||
}
|
||||
|
||||
Player* plr = m_caster->ToPlayer();
|
||||
plr->ResurrectPlayer(0.0f);
|
||||
Player* player = m_caster->ToPlayer();
|
||||
player->ResurrectPlayer(0.0f);
|
||||
|
||||
plr->SetHealth(health);
|
||||
plr->SetPower(POWER_MANA, mana);
|
||||
plr->SetPower(POWER_RAGE, 0);
|
||||
plr->SetPower(POWER_ENERGY, plr->GetMaxPower(POWER_ENERGY));
|
||||
player->SetHealth(health);
|
||||
player->SetPower(POWER_MANA, mana);
|
||||
player->SetPower(POWER_RAGE, 0);
|
||||
player->SetPower(POWER_ENERGY, player->GetMaxPower(POWER_ENERGY));
|
||||
|
||||
plr->SpawnCorpseBones();
|
||||
player->SpawnCorpseBones();
|
||||
}
|
||||
|
||||
void Spell::EffectSkinning(SpellEffIndex /*effIndex*/)
|
||||
@@ -6937,9 +6937,9 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player* plr = m_caster->ToPlayer();
|
||||
Player* player = m_caster->ToPlayer();
|
||||
|
||||
if (plr->getClass() != CLASS_DEATH_KNIGHT)
|
||||
if (player->getClass() != CLASS_DEATH_KNIGHT)
|
||||
return;
|
||||
|
||||
// needed later
|
||||
@@ -6949,9 +6949,9 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
if (count == 0) count = 1;
|
||||
for (uint32 j = 0; j < MAX_RUNES && count > 0; ++j)
|
||||
{
|
||||
if (plr->GetRuneCooldown(j) && plr->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
|
||||
if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
|
||||
{
|
||||
plr->SetRuneCooldown(j, 0);
|
||||
player->SetRuneCooldown(j, 0);
|
||||
--count;
|
||||
}
|
||||
}
|
||||
@@ -6964,8 +6964,8 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
|
||||
for (uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
if (plr->GetRuneCooldown(i) && (plr->GetCurrentRune(i) == RUNE_FROST || plr->GetCurrentRune(i) == RUNE_DEATH))
|
||||
plr->SetRuneCooldown(i, 0);
|
||||
if (player->GetRuneCooldown(i) && (player->GetCurrentRune(i) == RUNE_FROST || player->GetCurrentRune(i) == RUNE_DEATH))
|
||||
player->SetRuneCooldown(i, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user