mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
Cleaning unused variables
This commit is contained in:
@@ -445,7 +445,7 @@ public:
|
||||
|
||||
if (status)
|
||||
handler->PSendSysMessage(LANG_LIQUID_STATUS, liquidStatus.level, liquidStatus.depth_level, liquidStatus.entry, liquidStatus.type_flags, status);
|
||||
if (Transport* t = object->GetTransport())
|
||||
if (object->GetTransport())
|
||||
handler->PSendSysMessage("Transport offset: %.2f, %.2f, %.2f, %.2f", object->m_movementInfo.transport.pos.GetPositionX(), object->m_movementInfo.transport.pos.GetPositionY(), object->m_movementInfo.transport.pos.GetPositionZ(), object->m_movementInfo.transport.pos.GetOrientation());
|
||||
|
||||
return true;
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
// pussywizard:
|
||||
bool reset = true;
|
||||
if (instance)
|
||||
if (Creature* nefarian = instance->instance->GetCreature(instance->GetData64(DATA_NEFARIAN)))
|
||||
if (/*Creature* nefarian = */instance->instance->GetCreature(instance->GetData64(DATA_NEFARIAN)))
|
||||
reset = false;
|
||||
if (reset)
|
||||
_Reset();
|
||||
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
spawnPos.m_positionX += 5.0f*cos(4.5f);
|
||||
spawnPos.m_positionY += 5.0f*sin(4.5f);
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
if (Creature* s = me->SummonCreature(NPC_SCOURGE_ZOMBIE, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
|
||||
if (me->SummonCreature(NPC_SCOURGE_ZOMBIE, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
|
||||
{
|
||||
spawnPos.m_positionX += 2.5f*cos(4.5f);
|
||||
spawnPos.m_positionY += 2.5f*sin(4.5f);
|
||||
|
||||
@@ -1186,7 +1186,7 @@ public:
|
||||
}
|
||||
|
||||
// Check if exhausted
|
||||
if (Aura* exh = caster->GetAura(SPELL_RAM_EXHAUSTED))
|
||||
if (caster->GetAura(SPELL_RAM_EXHAUSTED))
|
||||
{
|
||||
if (privateLevel)
|
||||
{
|
||||
@@ -1397,7 +1397,7 @@ public:
|
||||
SpellCastResult CheckTarget()
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Player* pCaster = caster->ToPlayer())
|
||||
if (caster->ToPlayer())
|
||||
if (Unit* target = caster->ToPlayer()->GetSelectedUnit())
|
||||
if (target->GetEntry() == 23487 && target->IsAlive())
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
Events.ScheduleEvent(EVENT_SUMMON_KEEPER, 6000);
|
||||
Events.SetPhase(0);
|
||||
|
||||
if (Creature* medivh = instance->GetCreature(_medivhGUID))
|
||||
if (instance->GetCreature(_medivhGUID))
|
||||
{
|
||||
uint8 position = (_currentRift-1)%4;
|
||||
instance->SummonCreature(NPC_TIME_RIFT, PortalLocation[position]);
|
||||
|
||||
@@ -1080,7 +1080,7 @@ class spell_halion_clear_debuffs : public SpellScriptLoader
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
if (GetHitUnit())
|
||||
{
|
||||
GetHitUnit()->RemoveAurasDueToSpell(GetSpellInfo()->Effects[EFFECT_0].CalcValue());
|
||||
GetHitUnit()->RemoveAurasDueToSpell(GetSpellInfo()->Effects[EFFECT_1].CalcValue());
|
||||
|
||||
@@ -1810,7 +1810,7 @@ public:
|
||||
events.RepeatEvent(5000);
|
||||
break;
|
||||
case EVENT_SPELL_STRANGULATE:
|
||||
if( Unit* target = SelectEnemyCaster(false, 30.0f) )
|
||||
if(SelectEnemyCaster(false, 30.0f))
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_STRANGULATE, false);
|
||||
events.RepeatEvent(120000);
|
||||
|
||||
@@ -1871,7 +1871,7 @@ public:
|
||||
events.ScheduleEvent(2, 4500);
|
||||
break;
|
||||
case 3:
|
||||
if (Unit* target = SelectTargetFromPlayerList(30.0f, 0, true))
|
||||
if (SelectTargetFromPlayerList(30.0f, 0, true))
|
||||
me->CastSpell(me->GetVictim(), 70145, false);
|
||||
events.ScheduleEvent(3, 9000);
|
||||
break;
|
||||
|
||||
@@ -571,7 +571,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
// helper for summoning wave mobs
|
||||
void Summon(uint32 entry, const Position& pos)
|
||||
{
|
||||
if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
|
||||
if (me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
|
||||
if (TempSummon* trigger = me->SummonCreature(WORLD_TRIGGER, pos, TEMPSUMMON_TIMED_DESPAWN, 2000))
|
||||
{
|
||||
trigger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(GO_ExitPortalGUID))
|
||||
go->SetPhaseMask(1, true);
|
||||
if (Creature* c = instance->GetCreature(NPC_MalygosGUID))
|
||||
if (Creature* alexstrasza = c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f ,TEMPSUMMON_TIMED_DESPAWN, 604800000))
|
||||
if (c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f ,TEMPSUMMON_TIMED_DESPAWN, 604800000))
|
||||
break;
|
||||
}
|
||||
if (data == DONE)
|
||||
|
||||
@@ -455,7 +455,7 @@ public:
|
||||
}
|
||||
case EVENT_ABEDNEUM_HEAD: // Third
|
||||
{
|
||||
if (Creature *abedneum = GetAbedneum())
|
||||
if (GetAbedneum())
|
||||
{
|
||||
Player *plr = SelectTargetFromPlayerList(100.0f);
|
||||
if (!plr)
|
||||
|
||||
@@ -550,7 +550,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_ELEVATOR_INTERVAL_1, 6000);
|
||||
break;
|
||||
case EVENT_ELEVATOR_INTERVAL_1:
|
||||
if( Creature* VX001 = me->SummonCreature(NPC_VX001, 2744.65f, 2569.46f, 364.40f, 3.14f, TEMPSUMMON_MANUAL_DESPAWN) )
|
||||
if(me->SummonCreature(NPC_VX001, 2744.65f, 2569.46f, 364.40f, 3.14f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
if( GameObject *elevator = me->FindNearestGameObject(GO_MIMIRON_ELEVATOR, 100.0f) )
|
||||
{
|
||||
|
||||
@@ -413,7 +413,7 @@ class boss_high_nethermancer_zerevor : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_SPELL_BLIZZARD, 40000);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_EXPLOSION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f))
|
||||
if (SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f))
|
||||
me->CastSpell(me, SPELL_ARCANE_EXPLOSION, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_EXPLOSION, 10000);
|
||||
break;
|
||||
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
return true;
|
||||
if (!pPlayer->HasItemCount(ITEM_MAGMA_TOTEM))
|
||||
return true;
|
||||
if (Creature* c = pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
if (pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
return true;
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Disturb the stone and summon Lord Ahune.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1337);
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
return true;
|
||||
if (!pPlayer->HasItemCount(ITEM_MAGMA_TOTEM))
|
||||
return true;
|
||||
if (Creature* c = pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
if (pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
return true;
|
||||
|
||||
if (Creature* c = pGO->SummonCreature(NPC_AHUNE, AhuneSummonPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
|
||||
@@ -937,7 +937,7 @@ class spell_dk_pet_scaling : public SpellScriptLoader
|
||||
int32 modifier = 33;
|
||||
|
||||
// xinef: impurity
|
||||
if (AuraEffect const* impurityEff = owner->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
|
||||
if (owner->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
|
||||
modifier = 40;
|
||||
|
||||
amount = CalculatePct(std::max<int32>(0, owner->GetTotalAttackPowerValue(BASE_ATTACK)), modifier);
|
||||
|
||||
@@ -624,7 +624,7 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
{
|
||||
if (Unit* target = GetUnitOwner())
|
||||
{
|
||||
if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
|
||||
if (GetEffect(EFFECT_1))
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
int32 healAmount = GetSpellInfo()->Effects[EFFECT_1].CalcValue(caster ? caster : target, 0, target) * dispelInfo->GetRemovedCharges();
|
||||
|
||||
Reference in New Issue
Block a user