G gamepwn New Member Joined Jun 12, 2012 Messages 59 Reaction score 1 Oct 8, 2014 #1 Hello, what is the proper way to figure a doodad's owner ?
O Out Active Member Joined Jun 2, 2012 Messages 2,972 Reaction score 13 Oct 8, 2014 #2 Get dooodad object and look for DoodadObject.uniqOwnerId
G gamepwn New Member Joined Jun 12, 2012 Messages 59 Reaction score 1 Oct 8, 2014 #3 Thanks, was not sure which one it was and thought I'd rather ask than test the few that could be.
G gamepwn New Member Joined Jun 12, 2012 Messages 59 Reaction score 1 Oct 8, 2014 #4 Oh, one more related thing: how can I determine if a doodad is planted outside of any player owned farm?
Oh, one more related thing: how can I determine if a doodad is planted outside of any player owned farm?
N n2ation Member Joined Sep 24, 2014 Messages 31 Reaction score 0 Oct 8, 2014 #5 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.
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.
G gamepwn New Member Joined Jun 12, 2012 Messages 59 Reaction score 1 Oct 8, 2014 #6 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!
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!
N n2ation Member Joined Sep 24, 2014 Messages 31 Reaction score 0 Oct 8, 2014 #7 you may want to see if an illegal plant have the plantZoneId of the mapzone. which could save some time.
you may want to see if an illegal plant have the plantZoneId of the mapzone. which could save some time.
G gamepwn New Member Joined Jun 12, 2012 Messages 59 Reaction score 1 Oct 8, 2014 #8 n2ation said: you may want to see if an illegal plant have the plantZoneId of the mapzone. which could save some time. Click to expand... Yup, that's what I was hoping for, will test it.
n2ation said: you may want to see if an illegal plant have the plantZoneId of the mapzone. which could save some time. Click to expand... Yup, that's what I was hoping for, will test it.
N n2ation Member Joined Sep 24, 2014 Messages 31 Reaction score 0 Oct 11, 2014 #9 any update on this?
G gamepwn New Member Joined Jun 12, 2012 Messages 59 Reaction score 1 Oct 11, 2014 #10 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.
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.