Last edited by Robske; 07-25-2011 at 06:30 AM.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
I don't have WoW installed on this computer so I can't test this, but you could try checking if both UnitCastingInfo() = nil, and the object animation = crafting.
Hope this helps.
Thanks The Seadragon,
But I already got to that conclusion. In order to determine if a flag is being captured using only the 2 bits of information described above I need to check for players who do not have any casting/channeling info, have the crafting animation and being interact-distance from a flag that has the capturing animation. (additionally check if the flag/player relation allows interaction - horde players can't cap horde flags)
The object animation id for flags (gameobjects) will probably be the same offset as fishing bobbers, so no problem there.
I do not know where the animation data for players is stored.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
It still needs to play a spell visual right?, i don't really remember its been a lonnnng time since i played a BG. If so it prob goes through
0x005D50A0 CGObject_C::PlaySpellVisualKit(PlaySpellVisualKitData const&)
at some point
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
I do have access to IDA thoughCGUnit_C::GetCurrentAnimation looks very promising, thanks.
Edit: Great Success,
Animation.Crafting is 123.Code:var cappers = from player in Core.ObjectManager.Players from flag in from gameObject in Core.ObjectManager.GameObjects where gameObject.Name.Contains("Flag") || gameObject.Name.Contains("Banner") select gameObject where !player.IsCasting && !player.IsChanneling && player.CurrentAnimation == Animation.Crafting && player.DistanceTo(flag) < 8 select new { Player = player, Flag = flag };
Last edited by Robske; 07-25-2011 at 12:14 PM.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
I haven't researched this at any point, but have you checked for an aura?
http://www.wowhead.com/spells=0?filter=na=flag
For example:
Capture Point Flag Visual - Horde Controlled - Spell - World of Warcraft
Last edited by EmilyStrange; 07-25-2011 at 01:15 PM. Reason: typo and example