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

View File

@@ -1201,9 +1201,13 @@ public:
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* pPlayer = i->GetSource())
{
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster())
continue;
guids.push_back(pPlayer->GetGUID());
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))))

View File

@@ -354,7 +354,7 @@ public:
void IsSummonedBy(WorldObject* summoner) override
{
if (summoner->GetTypeId() != TYPEID_UNIT)
if (summoner->GetTypeId() != TYPEID_PLAYER)
{
return;
}