Core/Spells: Limited SPELL_ATTR3_PLAYERS_ONLY attribute to only allow players, not pets and totems. This fixes many boss area spells incorrectly selecting pets and totems as their targets.
This commit is contained in:
@@ -1285,6 +1285,20 @@ namespace Trinity
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
class ObjectTypeIdCheck
|
||||
{
|
||||
public:
|
||||
ObjectTypeIdCheck(TypeID typeId, bool equals) : _typeId(typeId), _equals(equals) {}
|
||||
bool operator()(WorldObject* object)
|
||||
{
|
||||
return (object->GetTypeId() == _typeId) == _equals;
|
||||
}
|
||||
|
||||
private:
|
||||
TypeID _typeId;
|
||||
bool _equals;
|
||||
};
|
||||
|
||||
// Player checks and do
|
||||
|
||||
// Prepare using Builder localized packets with caching and send to player
|
||||
|
||||
Reference in New Issue
Block a user