Fix refer a friend Summon
This commit is contained in:
@@ -6175,6 +6175,12 @@ void Spell::EffectSummonRaFFriend(SpellEffIndex effIndex)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER || !unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
// Xinef: Unit Target can be on other map, thank god we dont use RaF...
|
||||
m_caster->CastSpell(unitTarget, m_spellInfo->Effects[effIndex].TriggerSpell, true);
|
||||
float x, y, z;
|
||||
m_caster->GetPosition(x, y, z);
|
||||
unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(), x, y, z);
|
||||
WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
|
||||
data << uint64(m_caster->GetGUID());
|
||||
data << uint32(m_caster->GetZoneId());
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS); // auto decline after msecs
|
||||
unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user