fix(Script/Nexus/EOE/Oculus) The Scion of Eternity(EOE) target wrong and player can not ride the dragon in Oculus (#14830)

Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
cctvzj
2023-02-06 03:03:35 +08:00
committed by GitHub
parent afb071bb04
commit 1805cc269e
2 changed files with 8 additions and 4 deletions
@@ -1201,10 +1201,14 @@ public:
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* pPlayer = i->GetSource())
{
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster())
continue;
if (pPlayer->IsAlive())
{
if (!pPlayer->GetVehicle())
{
guids.push_back(pPlayer->GetGUID());
}
}
}
if (!guids.empty())
if (Player* plr = ObjectAccessor::GetPlayer(*me, guids.at(urand(0, guids.size() - 1))))
me->CastSpell(plr, SPELL_SCION_ARCANE_BARRAGE);
@@ -354,7 +354,7 @@ public:
void IsSummonedBy(WorldObject* summoner) override
{
if (summoner->GetTypeId() != TYPEID_UNIT)
if (summoner->GetTypeId() != TYPEID_PLAYER)
{
return;
}