WoW
Blue
Tracker
Home
|
RSS
|
News
|
Contact
Recent
|
Search
|
Archive
|
CS Posts
Poster:
Graguk
at 6/9/2005 7:26:44 PM PDT
Subject: GetNumPartyPets? GetNumRaidPets?
With the addition of Party and Raid pets, is there any function to determine how many pets are in the party/raid?
Does their naming start from 1, irrespective of their master's id?
To scan the pets, I'm thinking I have to do this:
local i = 1;
while UnitName("partypet"..i) ~= nil do
i = i + 1;
end
Anyone have any thoughts/ideas?
I'd like to do:
for i = 1,GetNumPartyPets,1 do
but I don't know if the function exists..?
http://wowrankings.com/viewb.htm?name=Graguk&s_id=71
http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=156062&p=#post156062
Poster:
slouken
at 6/9/2005 9:11:11 PM PDT
Subject: Re: GetNumPartyPets? GetNumRaidPets?
try something like this:
local petCount = 0;
for i = 1, MAX_PARTY_MEMBERS
if ( UnitExists("partypet"..i) ) then
petCount = petCount + 1;
end
end
This hasn't been tested, and I don't think that's the right constant, but you get the idea. The same logic would be useful for raid pets.
http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=156062&p=#post156138
Poster:
slouken
at 6/9/2005 9:33:18 PM PDT
Subject: Re: GetNumPartyPets? GetNumRaidPets?
Right. :)
http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=156062&p=#post156158
Poster:
slouken
at 6/9/2005 10:40:01 PM PDT
Subject: Re: GetNumPartyPets? GetNumRaidPets?
Yes, UNIT_PET has a useful arg1 so you can check to see if that unit has a pet when the event is fired.
http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=156062&p=#post156231
View all recent official Blue Posts
WoW Blue Tracker: Archiving World of Warcraft Blue Posts
since March 2005
Home
|
RSS
|
News
|
Contact
Recent
|
Search
|
Archive
|
CS Posts