mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 14:35:57 +00:00
refactor(Core): SendDirectMessage (#23230)
This commit is contained in:
@@ -6177,7 +6177,7 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode,
|
||||
if (apply)
|
||||
{
|
||||
data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
|
||||
target->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
target->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4612,7 +4612,7 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint8 cas
|
||||
WorldPacket data(SMSG_CAST_FAILED, 1 + 4 + 1);
|
||||
WriteCastResultInfo(data, caster, spellInfo, castCount, result, customError);
|
||||
|
||||
caster->GetSession()->SendPacket(&data);
|
||||
caster->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::SendCastResult(SpellCastResult result)
|
||||
@@ -4649,7 +4649,7 @@ void Spell::SendPetCastResult(SpellCastResult result)
|
||||
WorldPacket data(SMSG_PET_CAST_FAILED, 1 + 4 + 1);
|
||||
WriteCastResultInfo(data, player, m_spellInfo, m_cast_count, result, m_customError);
|
||||
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::SendSpellStart()
|
||||
@@ -5184,7 +5184,7 @@ void Spell::SendResurrectRequest(Player* target)
|
||||
// override delay sent with SMSG_CORPSE_RECLAIM_DELAY, set instant resurrection for spells with this attribute
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_NO_RES_TIMER))
|
||||
data << uint32(0);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::TakeCastItem()
|
||||
|
||||
@@ -4162,8 +4162,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
WorldPacket data(SMSG_DUEL_REQUESTED, 8 + 8);
|
||||
data << pGameObj->GetGUID();
|
||||
data << caster->GetGUID();
|
||||
caster->GetSession()->SendPacket(&data);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
caster->SendDirectMessage(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
|
||||
// create duel-info
|
||||
bool isMounted = (GetSpellInfo()->Id == 62875);
|
||||
@@ -4245,7 +4245,7 @@ void Spell::EffectSummonPlayer(SpellEffIndex /*effIndex*/)
|
||||
data << m_caster->GetGUID(); // summoner guid
|
||||
data << uint32(m_caster->GetZoneId()); // summoner zone
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY * IN_MILLISECONDS); // auto decline after msecs
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::EffectActivateObject(SpellEffIndex effIndex)
|
||||
@@ -6345,5 +6345,5 @@ void Spell::EffectSummonRaFFriend(SpellEffIndex /*effIndex*/)
|
||||
data << m_caster->GetGUID();
|
||||
data << uint32(m_caster->GetZoneId());
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY * IN_MILLISECONDS); // auto decline after msecs
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user