diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index e1cf1008d..34c1bc6d5 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1929,8 +1929,8 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_MAPID: { - MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1); - if (!me) + MapEntry const* mapId = sMapStore.LookupEntry(cond->ConditionValue1); + if (!mapId) { LOG_ERROR("sql.sql", "Map condition has non existing map ({}), skipped", cond->ConditionValue1); return false; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1f586c7c2..2d0376921 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12975,11 +12975,11 @@ void Unit::CombatStart(Unit* victim, bool initialAggro) if (who->GetTypeId() == TYPEID_PLAYER) SetContestedPvP(who->ToPlayer()); - Player* me = GetCharmerOrOwnerPlayerOrPlayerItself(); - if (me && who->IsPvP() && (who->GetTypeId() != TYPEID_PLAYER || !me->duel || me->duel->Opponent != who)) + Player* player = GetCharmerOrOwnerPlayerOrPlayerItself(); + if (player && who->IsPvP() && (who->GetTypeId() != TYPEID_PLAYER || !player->duel || player->duel->Opponent != who)) { - me->UpdatePvP(true); - me->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); + player->UpdatePvP(true); + player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); } } @@ -13002,11 +13002,11 @@ void Unit::CombatStartOnCast(Unit* target, bool initialAggro, uint32 duration) if (who->GetTypeId() == TYPEID_PLAYER) SetContestedPvP(who->ToPlayer()); - Player* me = GetCharmerOrOwnerPlayerOrPlayerItself(); - if (me && who->IsPvP() && (who->GetTypeId() != TYPEID_PLAYER || !me->duel || me->duel->Opponent != who)) + Player* player = GetCharmerOrOwnerPlayerOrPlayerItself(); + if (player && who->IsPvP() && (who->GetTypeId() != TYPEID_PLAYER || !player->duel || player->duel->Opponent != who)) { - me->UpdatePvP(true); - me->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); + player->UpdatePvP(true); + player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); } } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 80ef81eeb..b0aa93d69 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -477,13 +477,13 @@ public: //set tempfaction for creature static bool HandleNpcSetFactionTempIdCommand(ChatHandler* handler, uint32 tempfaction) { - Player* me = handler->GetSession()->GetPlayer(); - Unit* SelectedCreature = me->GetSelectedUnit(); + Player* player = handler->GetSession()->GetPlayer(); + Unit* unit = player->GetSelectedUnit(); - if (!SelectedCreature) + if (!unit) return false; - Creature* creature = SelectedCreature->ToCreature(); + Creature* creature = unit->ToCreature(); if (!creature) return false; @@ -496,12 +496,12 @@ public: //set orginal faction for npc static bool HandleNpcSetOriginalFaction(ChatHandler* handler) { - Player* me = handler->GetSession()->GetPlayer(); + Player* player = handler->GetSession()->GetPlayer(); - if (!me) + if (!player) return false; - Creature* creature = me->GetSelectedUnit()->ToCreature(); + Creature* creature = player->GetSelectedUnit()->ToCreature(); if (!creature) return false; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index d08b617dc..66fe3db85 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -895,15 +895,15 @@ public: { if (Unit* target = GetTarget()) if (target->GetDisplayId() != 11686) - if (Creature* me = target->ToCreature()) - if (Player* p = me->SelectNearestPlayer(2.75f)) - if (me->GetExactDist2d(p) <= 2.75f) + if (Creature* creature = target->ToCreature()) + if (Player* player = creature->SelectNearestPlayer(2.75f)) + if (creature->GetExactDist2d(player) <= 2.75f) { - me->AI()->DoAction(1); // despawning = true; - me->GetMotionMaster()->MoveIdle(); - me->CastSpell((Unit*)nullptr, me->GetEntry() == NPC_CONCENTRATED_LIGHT ? SPELL_UNLEASHED_LIGHT : SPELL_UNLEASHED_DARK, false); - me->SetDisplayId(11686); - me->DespawnOrUnsummon(1500); + creature->AI()->DoAction(1); // despawning = true; + creature->GetMotionMaster()->MoveIdle(); + creature->CastSpell((Unit*)nullptr, creature->GetEntry() == NPC_CONCENTRATED_LIGHT ? SPELL_UNLEASHED_LIGHT : SPELL_UNLEASHED_DARK, false); + creature->SetDisplayId(11686); + creature->DespawnOrUnsummon(1500); } }