*Cleanup, fix a few warnings, and make the SD2 grid searchers just pass through to the standard Trinity grid searchers, as they have identical functionality. Thanks thmarth. Closes #387, #388

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-22 00:46:38 -08:00
parent 461e8d134f
commit da5c1bca54
9 changed files with 83 additions and 157 deletions
+2 -2
View File
@@ -1072,12 +1072,12 @@ namespace Trinity
class NearestCreatureEntryWithLiveStateInObjectRangeCheck
{
public:
NearestCreatureEntryWithLiveStateInObjectRangeCheck(WorldObject const& obj,uint32 entry, bool alive, float range)
NearestCreatureEntryWithLiveStateInObjectRangeCheck(WorldObject const& obj, uint32 entry, bool alive, float range)
: i_obj(obj), i_entry(entry), i_alive(alive), i_range(range) {}
bool operator()(Creature* u)
{
if(u->GetEntry() == i_entry && u->isAlive()==i_alive && i_obj.IsWithinDistInMap(u, i_range))
if (u->GetEntry() == i_entry && u->isAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range))
{
i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check
return true;