[Server] Rename doForNearest to forEachLoaded

pull/158/head
Koncord 8 years ago
parent 3aae782a51
commit f2ce46ffed

@ -170,7 +170,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
LOG_APPEND(Log::LOG_INFO, "- Moved to %s",
player->cell.getDescription().c_str());
player->doForNearest([this](Player *pl, Player *other){
player->forEachLoaded([this](Player *pl, Player *other) {
playerController->GetPacket(ID_PLAYER_DYNAMICSTATS)->Send(other, pl->guid);
playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(other, pl->guid);
playerController->GetPacket(ID_PLAYER_SKILL)->Send(other, pl->guid);

@ -159,7 +159,7 @@ void Player::sendToLoaded(mwmp::PlayerPacket *myPacket)
}
}
void Player::doForNearest(std::function<void (Player *pl, Player *other)> func)
void Player::forEachLoaded(std::function<void(Player *pl, Player *other)> func)
{
std::list <Player*> plList;

@ -73,7 +73,7 @@ public:
CellController::TContainer getCells();
void sendToLoaded(mwmp::PlayerPacket *myPacket);
void doForNearest(std::function<void (Player *pl, Player *other)> func);
void forEachLoaded(std::function<void(Player *pl, Player *other)> func);
public:
mwmp::InventoryChanges inventoryChangesBuffer;

Loading…
Cancel
Save