* Added the option to specify target entry in conditions table for spells with AoE GO targets.

* A few examples where this is desirable are posted on the forum.

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-07-30 01:51:33 +02:00
parent cad437d7f0
commit eb852f5bbd
6 changed files with 209 additions and 148 deletions
@@ -1177,13 +1177,17 @@ namespace Trinity
class GameObjectInRangeCheck
{
public:
GameObjectInRangeCheck(float _x, float _y, float _z, float _range) : x(_x), y(_y), z(_z), range(_range) {}
GameObjectInRangeCheck(float _x, float _y, float _z, float _range, uint32 _entry = 0) :
x(_x), y(_y), z(_z), range(_range), entry(_entry) {}
bool operator() (GameObject* go)
{
return go->IsInRange(x, y, z, range);
if (!entry || go->GetGOInfo() && go->GetGOInfo()->id == entry)
return go->IsInRange(x, y, z, range);
else return false;
}
private:
float x, y, z, range;
uint32 entry;
};
// Player checks and do