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

Is a dood on a farm?

WoodenJester

Member
Joined
Jun 10, 2015
Messages
342
Reaction score
1
Is there a method/property to check whether a DoodadObject is on player-land?
I've checked the API but found nothing obvious
 
there is a pointinzone function, which you can use aslong if there is a way to convert a farm to a zone. You can always map your farm as a zone. But why dont you just check if a doodadobject uniqowerid is the farm uniqownerid.
 
Looking at it from another perspective, can you interact with said plant on farm that is not yours if not then skip it and move on.

that's how i would write that


EDIT:
Also you could do a check for plant ownership, and that might simplify it even more.
 
Last edited:
Code:
DoodadObject dood;
if (dood.uniqOwnerId == 0 && dood.plantZoneId == 0)
	{
		// Do things do a doodadobject that is NOT on a farm.
	}
	
DoodadObject dood;
if (dood.uniqOwnerId != 0 && dood.plantZoneId != 0)
	{
		// Do things do a doodadobject that IS on a farm.
	}
 
Code:
DoodadObject dood;
if (dood.uniqOwnerId == 0 && dood.plantZoneId == 0)
	{
		// Do things do a doodadobject that is NOT on a farm.
	}
	
DoodadObject dood;
if (dood.uniqOwnerId != 0 && dood.plantZoneId != 0)
	{
		// Do things do a doodadobject that IS on a farm.
	}

Nice, thanks for share! I'm lf that just for personal use :P
 
Back
Top