mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(Core): Adjustments to summoning ritual object handling. (#19600)
* Init. * Allow self-summoning. * Revert unintended change. Self-summoning still works fine without this being removed, I see no harm in putting it back.
This commit is contained in:
@@ -1906,8 +1906,8 @@ void GameObject::Use(Unit* user)
|
||||
|
||||
Player* targetPlayer = ObjectAccessor::FindPlayer(player->GetTarget());
|
||||
|
||||
// accept only use by player from same raid as caster, except caster itself
|
||||
if (!targetPlayer || targetPlayer == player || !targetPlayer->IsInSameRaidWith(player))
|
||||
// accept only use by player from same raid as caster
|
||||
if (!targetPlayer || !targetPlayer->IsInSameRaidWith(player))
|
||||
return;
|
||||
|
||||
//required lvl checks!
|
||||
@@ -1918,10 +1918,7 @@ void GameObject::Use(Unit* user)
|
||||
if (level < info->meetingstone.minLevel)
|
||||
return;
|
||||
|
||||
if (info->entry == 194097)
|
||||
spellId = 61994; // Ritual of Summoning
|
||||
else
|
||||
spellId = 23598; // Meeting Stone Summon
|
||||
spellId = 23598; // Meeting Stone Summon
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6471,7 +6471,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
Player* target = ObjectAccessor::FindPlayer(m_caster->ToPlayer()->GetTarget());
|
||||
if (!target || m_caster->ToPlayer() == target || (!target->IsInSameRaidWith(m_caster->ToPlayer()) && m_spellInfo->Id != 48955)) // refer-a-friend spell
|
||||
if (!target || (!target->IsInSameRaidWith(m_caster->ToPlayer()) && m_spellInfo->Id != 48955)) // refer-a-friend spell
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
// Xinef: Implement summon pending error
|
||||
|
||||
@@ -5380,9 +5380,6 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
Map* cMap = m_caster->GetMap();
|
||||
// if gameobject is summoning object, it should be spawned right on caster's position
|
||||
if (goinfo->type == GAMEOBJECT_TYPE_SUMMONING_RITUAL)
|
||||
m_caster->GetPosition(fx, fy, fz);
|
||||
|
||||
GameObject* pGameObj = sObjectMgr->IsGameObjectStaticTransport(name_id) ? new StaticTransport() : new GameObject();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user