Skip to content

Commit

Permalink
Internal: Removed unused method causing linux compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r committed Jan 20, 2025
1 parent 557f800 commit 271e10a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions playerbot/WorldPosition.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,28 +210,6 @@ namespace ai
WeightedShuffle(data.begin(), data.end(), weights.begin(), weights.end(), gen);
}

template<class T>
void GetNextPoint(std::vector<T>& data) const
{
std::vector<uint32> weights;

std::transform(data.begin(), data.end(), std::back_inserter(weights), [this](T element) { return 200000 / (1 + this->distance(*std::get<WorldPosition*>(T))); });

//If any weight is 0 add 1 to all weights.
for (auto& w : weights)
{
if (w > 0)
continue;

std::for_each(weights.begin(), weights.end(), [](uint32& d) { d += 1; });
break;
}

std::mt19937 gen(time(0));

WeightedShuffle(data.begin(), data.end(), weights.begin(), weights.end(), gen);
}

//Map functions. Player independent.
const MapEntry* getMapEntry() const { return sMapStore.LookupEntry(mapid); }
uint32 getFirstInstanceId() const { for (auto& map : sMapMgr.Maps()) { if (map.second->GetId() == getMapId()) return map.second->GetInstanceId(); }; return 0; }
Expand Down

0 comments on commit 271e10a

Please sign in to comment.