Jump to content

Recommended Posts

Was trying to figure if a door is open with wrobot, its a barrier that you can cross after you kill a mob, i used WowGameObject.State in HB to check if it was open, is there anything in wrobot that gets me that info ? tried IsMDXCollidable , and sometimes it updates, sometimes it wont.

Link to comment
https://wrobot.eu/forums/topic/5821-check-if-a-door-is-open/
Share on other sites

Hello, what you are looking for is a descriptor field. I researched a bit in my decompiler and have found in HB your "WowGameObject.State". It has "return (WoWGameObjectState) this.Bytes1[0];" in Wrobot it's "WoWGameObject.GOType" with "return (WoWGameObjectType) (Memory.WowMemory.Memory.ReadInt32(this.GetDescriptorAddress(Descriptors.GameObjectFields.Bytes1)) >> 8 & (int) byte.MaxValue);" but if you looking at the enum of "WoWGameObjectState"(HB) / "WoWGameObjectType(Wrobot)" you'll notice it's different. I guess you need to read with wrobot additional offset to get your information i think it can be:

.Data0, .Data1 or .Data8 from WoWGameObject.

So if you looking where it gets used you'll find WoWGameObject.LockEntry which looks very promising:

...
switch (this.GOType)
{
	case WoWGameObjectType.Door:
	case WoWGameObjectType.Button:
	return this.Data1;
...

But i'm not sure(couldn't test it now) so you can try to compare some values with the door while open/closed. If it's still returning the not desired value you can try to return the other data what i mentioned above.

I hope that helps a bit.

Good Luck

Link to comment
https://wrobot.eu/forums/topic/5821-check-if-a-door-is-open/#findComment-26485
Share on other sites

var door = ObjectManager.GetObjectWoWGameObject().FirstOrDefault(o => o.GOType == WoWGameObjectType.Door && o.GetDistance < 7 && o.CanOpen);
			if (door != null && door.IsValid)
			{
				Questing.Gather(door.Position, door.Entry);
			}

you welcome

Link to comment
https://wrobot.eu/forums/topic/5821-check-if-a-door-is-open/#findComment-26489
Share on other sites

is canopen == false then this mean u can't interact with gameobject. 

you need to check can you pass?

if TraceLine.TraceLineGo(PointBeyondGate)
  //NOPE. LINE COLLIDED SOMETHING
else
 //YAY! Path is clear

 

Link to comment
https://wrobot.eu/forums/topic/5821-check-if-a-door-is-open/#findComment-26491
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...