Esempio n. 1
0
    void EjectPlayers()
    {
        for(uint8 i = 0; i < SpectralRealmList.size(); ++i)
        {
            Player* plr = DirtyHackToGetPlayerFromSpectralList(SpectralRealmList[i]);
            if(plr && !plr->HasAura(SPELL_SPECTRAL_REALM, 0))
            {
                EjectPlayer(plr);
                SpectralRealmList.erase(SpectralRealmList.begin() + i);
            }
        }

        SpectralRealmList.clear();
    }
    void EjectPlayers()
    {
        if (SpectralRealmList.empty())
            return;

        Map::PlayerList const& players = instance->GetPlayers();

        for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
        {
            Player* plr = itr->getSource();

            if (plr && !plr->HasAura(SPELL_SPECTRAL_REALM))
            {
                SpectralRealmList.remove(plr->GetGUID());
                EjectPlayer(plr);
            }
        }

        //SpectralRealmList.clear();
    }
Esempio n. 3
0
    void EjectPlayers()
    {
        if (SpectralRealmList.empty())
            return;

        Map::PlayerList const& players = instance->GetPlayers();

        for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
        {
            Player* plr = itr->getSource();
			// only choose players without spectral exhaustion debuff that are in demon realm
			if (plr && !plr->HasAura(SPELL_SPECTRAL_EXHAUSTION) && plr->GetPositionZ() < DEMON_REALM_Z+3)
            {
                SpectralRealmList.remove(plr->GetGUID());
                EjectPlayer(plr);
            }
        }

        //SpectralRealmList.clear();
    }
Esempio n. 4
0
/*
================
sdTransportPositionManager::EjectAllPlayers
================
*/
void sdTransportPositionManager::EjectAllPlayers( int flags ) {
	if ( gameLocal.isClient ) {
		return;
	}

	for( int i = 0; i < positions.Num(); i++ ) {
		idPlayer* player = positions[ i ].GetPlayer();
		EjectPlayer( positions[ i ], true );
		if ( player != NULL ) {
			const sdDeclDamage* damageDecl = transport->GetLastDamage();
			if ( flags & EF_KILL_PLAYERS ) {
				if ( ( damageDecl != NULL && damageDecl->GetForcePassengerKill() ) || !positions[ i ].GetEjectOnKilled() ) {
					player->Kill( transport->GetLastAttacker(), true, transport->GetKillPlayerDamage(), damageDecl );
				}
			}

			i = -1; // in case any players have been moved around due to the removal of this player
		}
	}
}
Esempio n. 5
0
    void EjectPlayers()
    {
        if (SpectralRealmList.empty())
            return;

        Map::PlayerList const& players = instance->GetPlayers();
        for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
        {
            Player* plr = itr->getSource();
            if (!plr)
                continue;

            if (std::find(SpectralRealmList.begin(),SpectralRealmList.end(),plr->GetGUID())!=SpectralRealmList.end() &&
                !plr->HasAura(SPELL_SPECTRAL_REALM, 0))
            {
                EjectPlayer(plr);
            }
        }

        SpectralRealmList.clear();
    }