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,9 +1201,13 @@ public:
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* pPlayer = i->GetSource()) if (Player* pPlayer = i->GetSource())
{ {
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster()) if (pPlayer->IsAlive())
continue; {
guids.push_back(pPlayer->GetGUID()); if (!pPlayer->GetVehicle())
{
guids.push_back(pPlayer->GetGUID());
}
}
} }
if (!guids.empty()) if (!guids.empty())
if (Player* plr = ObjectAccessor::GetPlayer(*me, guids.at(urand(0, guids.size() - 1)))) if (Player* plr = ObjectAccessor::GetPlayer(*me, guids.at(urand(0, guids.size() - 1))))
@@ -354,7 +354,7 @@ public:
void IsSummonedBy(WorldObject* summoner) override void IsSummonedBy(WorldObject* summoner) override
{ {
if (summoner->GetTypeId() != TYPEID_UNIT) if (summoner->GetTypeId() != TYPEID_PLAYER)
{ {
return; return;
} }