mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Misc): rename some variables that can be confusing (#10592)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user