What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

doodad owner

gamepwn

New Member
Joined
Jun 12, 2012
Messages
59
Reaction score
1
Hello, what is the proper way to figure a doodad's owner ?
 
Get dooodad object and look for DoodadObject.uniqOwnerId
 
Thanks, was not sure which one it was and thought I'd rather ask than test the few that could be.
 
Oh, one more related thing: how can I determine if a doodad is planted outside of any player owned farm?
 
build a list of farms and plants

List<Creature> farms =
getCreatures().Where(x => x.type == BotTypes.Housing).Distinct().ToList();

plantfilter = getDoodads().Where( ... ) // write filter to a list of plants you want

then you need to loop through each farm and

illegalplants = plantfilter.Where(x => x.plantZoneId != farm.plantZoneId).ToList(); // puts list of plants that's not in a farm.

then do what you want with that.
 
Right, so I'd have to enumerate all the housings around me then and check that it's not there; thought it would come to something less computation intensive, like it having a plantZoneId that's in a known list of "NPC" zone ids.Thanks anyway!
 
you may want to see if an illegal plant have the plantZoneId of the mapzone. which could save some time.
 
Sorry, I know it's a simple test, but got sidetracked and still don't have any time for AA yet, will post when I get to test it.
 
Back
Top