fabiofai / jnibwapi

Automatically exported from code.google.com/p/jnibwapi
0 stars 0 forks source link

Unit OrderTypeTypes mismatch #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Find a Unit's order with getOrderID()
2. Find the corresponding value in OrderTypeTypes using 
OrderTypeTypes.values()[id]

What is the expected output? What do you see instead?
As an example, when the type should be PlaceBuilding it is actually 
ZergUnitMorph and when it should be ConstructingBuilding it is BuildNydusExit. 
However, if you check the String name of the OrderType it is the correct name.

What version of the product are you using? On what operating system?
Version 0.2.1 Windows XP

Original issue reported on code.google.com by marcus.m...@gmail.com on 7 Feb 2012 at 7:47

GoogleCodeExporter commented 8 years ago
Number of excluded orders in BWAPI:
Up to ZergUnitMorph: 12
Up to BuildNydusExit: 13

The difference in values between PlaceBuilding and ZergUnitMorph is 12, the 
difference in values between ConstructingBuilding and BuildNydusExit is 13.

Probably not a coincidence.

Original comment by AHeinerm on 13 Mar 2012 at 1:41

GoogleCodeExporter commented 8 years ago
The problem is because the OrderTypesTypes enum is missing the
Undefined values like the UnitTypes and other enums have. Thus, the
ordinals don't match up to the ones in the C++ BWAPI.

Marcus

On Mar 12, 2012, at 9:41 PM, "jnibwapi@googlecode.com"
<jnibwapi@googlecode.com> wrote:

Original comment by marcus.m...@gmail.com on 13 Mar 2012 at 4:08

GoogleCodeExporter commented 8 years ago
that's what it looks like so fixing it shouldn't be hard

Original comment by AHeinerm on 13 Mar 2012 at 10:19

GoogleCodeExporter commented 8 years ago
It wasn't. I added the 'undefined' types, should work properly now.

Original comment by martijn....@gmail.com on 27 Jun 2012 at 7:03