mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 20:48:26 +00:00
More scanning work to unify data structures
This commit is contained in:
@@ -268,10 +268,10 @@ bool Client::Process() {
|
||||
|
||||
if (mob->IsNPC()) {
|
||||
if (distance <= scan_range) {
|
||||
close_mobs.insert(std::pair<Mob *, float>(mob, distance));
|
||||
close_mobs.insert(std::pair<uint16, Mob *>(mob->GetID(), mob));
|
||||
}
|
||||
else if ((mob->GetAggroRange() * mob->GetAggroRange()) > scan_range) {
|
||||
close_mobs.insert(std::pair<Mob *, float>(mob, distance));
|
||||
close_mobs.insert(std::pair<uint16, Mob *>(mob->GetID(), mob));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -597,7 +597,7 @@ bool Client::Process() {
|
||||
if (zone->CanDoCombat() && ret && !GetFeigned() && client_scan_npc_aggro_timer.Check()) {
|
||||
int npc_scan_count = 0;
|
||||
for (auto & close_mob : close_mobs) {
|
||||
Mob *mob = close_mob.first;
|
||||
Mob *mob = close_mob.second;
|
||||
|
||||
if (!mob)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user