219 | | void MaNGOS::WorldObjectSearcher<Check>::Visit(PlayerMapType &m) |
220 | | { |
221 | | // already found |
222 | | if(i_object) |
223 | | return; |
224 | | |
225 | | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
226 | | { |
227 | | if(i_check(itr->getSource())) |
228 | | { |
229 | | i_object = itr->getSource(); |
230 | | return; |
231 | | } |
232 | | } |
233 | | } |
234 | | |
235 | | template<class Check> |
236 | | void MaNGOS::WorldObjectSearcher<Check>::Visit(CreatureMapType &m) |
237 | | { |
238 | | // already found |
239 | | if(i_object) |
240 | | return; |
241 | | |
242 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
243 | | { |
244 | | if(i_check(itr->getSource())) |
245 | | { |
246 | | i_object = itr->getSource(); |
247 | | return; |
248 | | } |
249 | | } |
250 | | } |
251 | | |
252 | | template<class Check> |
253 | | void MaNGOS::WorldObjectSearcher<Check>::Visit(CorpseMapType &m) |
| 221 | void Trinity::WorldObjectSearcher<Check>::Visit(PlayerMapType &m) |
| 222 | { |
| 223 | // already found |
| 224 | if(i_object) |
| 225 | return; |
| 226 | |
| 227 | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 228 | { |
| 229 | if(i_check(itr->getSource())) |
| 230 | { |
| 231 | i_object = itr->getSource(); |
| 232 | return; |
| 233 | } |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | template<class Check> |
| 238 | void Trinity::WorldObjectSearcher<Check>::Visit(CreatureMapType &m) |
| 239 | { |
| 240 | // already found |
| 241 | if(i_object) |
| 242 | return; |
| 243 | |
| 244 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 245 | { |
| 246 | if(i_check(itr->getSource())) |
| 247 | { |
| 248 | i_object = itr->getSource(); |
| 249 | return; |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | template<class Check> |
| 255 | void Trinity::WorldObjectSearcher<Check>::Visit(CorpseMapType &m) |
287 | | void MaNGOS::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m) |
288 | | { |
289 | | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
290 | | if(i_check(itr->getSource())) |
291 | | i_objects.push_back(itr->getSource()); |
292 | | } |
293 | | |
294 | | template<class Check> |
295 | | void MaNGOS::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m) |
296 | | { |
297 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
298 | | if(i_check(itr->getSource())) |
299 | | i_objects.push_back(itr->getSource()); |
300 | | } |
301 | | |
302 | | template<class Check> |
303 | | void MaNGOS::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m) |
| 289 | void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m) |
| 290 | { |
| 291 | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 292 | if(i_check(itr->getSource())) |
| 293 | i_objects.push_back(itr->getSource()); |
| 294 | } |
| 295 | |
| 296 | template<class Check> |
| 297 | void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m) |
| 298 | { |
| 299 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 300 | if(i_check(itr->getSource())) |
| 301 | i_objects.push_back(itr->getSource()); |
| 302 | } |
| 303 | |
| 304 | template<class Check> |
| 305 | void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m) |
366 | | void MaNGOS::UnitSearcher<Check>::Visit(CreatureMapType &m) |
367 | | { |
368 | | // already found |
369 | | if(i_object) |
370 | | return; |
371 | | |
372 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
373 | | { |
374 | | if(i_check(itr->getSource())) |
375 | | { |
376 | | i_object = itr->getSource(); |
377 | | return; |
378 | | } |
379 | | } |
380 | | } |
381 | | |
382 | | template<class Check> |
383 | | void MaNGOS::UnitSearcher<Check>::Visit(PlayerMapType &m) |
384 | | { |
385 | | // already found |
386 | | if(i_object) |
387 | | return; |
388 | | |
389 | | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
390 | | { |
391 | | if(i_check(itr->getSource())) |
392 | | { |
393 | | i_object = itr->getSource(); |
394 | | return; |
395 | | } |
396 | | } |
397 | | } |
398 | | |
399 | | template<class Check> |
400 | | void MaNGOS::UnitLastSearcher<Check>::Visit(CreatureMapType &m) |
401 | | { |
402 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
403 | | { |
404 | | if(i_check(itr->getSource())) |
405 | | i_object = itr->getSource(); |
406 | | } |
407 | | } |
408 | | |
409 | | template<class Check> |
410 | | void MaNGOS::UnitLastSearcher<Check>::Visit(PlayerMapType &m) |
411 | | { |
412 | | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
413 | | { |
414 | | if(i_check(itr->getSource())) |
415 | | i_object = itr->getSource(); |
416 | | } |
417 | | } |
418 | | |
419 | | template<class Check> |
420 | | void MaNGOS::UnitListSearcher<Check>::Visit(PlayerMapType &m) |
421 | | { |
422 | | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
423 | | if(i_check(itr->getSource())) |
424 | | i_objects.push_back(itr->getSource()); |
425 | | } |
426 | | |
427 | | template<class Check> |
428 | | void MaNGOS::UnitListSearcher<Check>::Visit(CreatureMapType &m) |
| 368 | void Trinity::UnitSearcher<Check>::Visit(CreatureMapType &m) |
| 369 | { |
| 370 | // already found |
| 371 | if(i_object) |
| 372 | return; |
| 373 | |
| 374 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 375 | { |
| 376 | if(i_check(itr->getSource())) |
| 377 | { |
| 378 | i_object = itr->getSource(); |
| 379 | return; |
| 380 | } |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | template<class Check> |
| 385 | void Trinity::UnitSearcher<Check>::Visit(PlayerMapType &m) |
| 386 | { |
| 387 | // already found |
| 388 | if(i_object) |
| 389 | return; |
| 390 | |
| 391 | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 392 | { |
| 393 | if(i_check(itr->getSource())) |
| 394 | { |
| 395 | i_object = itr->getSource(); |
| 396 | return; |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | template<class Check> |
| 402 | void Trinity::UnitLastSearcher<Check>::Visit(CreatureMapType &m) |
| 403 | { |
| 404 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 405 | { |
| 406 | if(i_check(itr->getSource())) |
| 407 | i_object = itr->getSource(); |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | template<class Check> |
| 412 | void Trinity::UnitLastSearcher<Check>::Visit(PlayerMapType &m) |
| 413 | { |
| 414 | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 415 | { |
| 416 | if(i_check(itr->getSource())) |
| 417 | i_object = itr->getSource(); |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | template<class Check> |
| 422 | void Trinity::UnitListSearcher<Check>::Visit(PlayerMapType &m) |
| 423 | { |
| 424 | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 425 | if(i_check(itr->getSource())) |
| 426 | i_objects.push_back(itr->getSource()); |
| 427 | } |
| 428 | |
| 429 | template<class Check> |
| 430 | void Trinity::UnitListSearcher<Check>::Visit(CreatureMapType &m) |
438 | | void MaNGOS::CreatureSearcher<Check>::Visit(CreatureMapType &m) |
439 | | { |
440 | | // already found |
441 | | if(i_object) |
442 | | return; |
443 | | |
444 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
445 | | { |
446 | | if(i_check(itr->getSource())) |
447 | | { |
448 | | i_object = itr->getSource(); |
449 | | return; |
450 | | } |
451 | | } |
452 | | } |
453 | | |
454 | | template<class Check> |
455 | | void MaNGOS::CreatureLastSearcher<Check>::Visit(CreatureMapType &m) |
456 | | { |
457 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
458 | | { |
459 | | if(i_check(itr->getSource())) |
460 | | i_object = itr->getSource(); |
461 | | } |
462 | | } |
463 | | |
464 | | template<class Check> |
465 | | void MaNGOS::CreatureListSearcher<Check>::Visit(CreatureMapType &m) |
466 | | { |
467 | | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
468 | | if(i_check(itr->getSource())) |
469 | | i_objects.push_back(itr->getSource()); |
470 | | } |
471 | | |
472 | | template<class Check> |
473 | | void MaNGOS::PlayerSearcher<Check>::Visit(PlayerMapType &m) |
474 | | { |
475 | | // already found |
476 | | if(i_object) |
477 | | return; |
478 | | |
479 | | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
480 | | { |
481 | | if(i_check(itr->getSource())) |
482 | | { |
483 | | i_object = itr->getSource(); |
484 | | return; |
485 | | } |
486 | | } |
487 | | } |
488 | | |
489 | | #endif // MANGOS_GRIDNOTIFIERSIMPL_H |
| 440 | void Trinity::CreatureSearcher<Check>::Visit(CreatureMapType &m) |
| 441 | { |
| 442 | // already found |
| 443 | if(i_object) |
| 444 | return; |
| 445 | |
| 446 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 447 | { |
| 448 | if(i_check(itr->getSource())) |
| 449 | { |
| 450 | i_object = itr->getSource(); |
| 451 | return; |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | template<class Check> |
| 457 | void Trinity::CreatureLastSearcher<Check>::Visit(CreatureMapType &m) |
| 458 | { |
| 459 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 460 | { |
| 461 | if(i_check(itr->getSource())) |
| 462 | i_object = itr->getSource(); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | template<class Check> |
| 467 | void Trinity::CreatureListSearcher<Check>::Visit(CreatureMapType &m) |
| 468 | { |
| 469 | for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 470 | if(i_check(itr->getSource())) |
| 471 | i_objects.push_back(itr->getSource()); |
| 472 | } |
| 473 | |
| 474 | template<class Check> |
| 475 | void Trinity::PlayerSearcher<Check>::Visit(PlayerMapType &m) |
| 476 | { |
| 477 | // already found |
| 478 | if(i_object) |
| 479 | return; |
| 480 | |
| 481 | for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr) |
| 482 | { |
| 483 | if(i_check(itr->getSource())) |
| 484 | { |
| 485 | i_object = itr->getSource(); |
| 486 | return; |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | #endif // TRINITY_GRIDNOTIFIERSIMPL_H |