Google-Code-Fork / tibiaapi

Automatically exported from code.google.com/p/tibiaapi
MIT License
0 stars 0 forks source link

isGround Flag #90

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set an item object.
2. Get the item's isGround flag.

What is the expected output? What do you see instead?
Ground tiles should return True, but they don't.

Original issue reported on code.google.com by joebingham07@gmail.com on 19 Dec 2008 at 10:30

GoogleCodeExporter commented 9 years ago
Did some research and concluded that everything returns correct except for 
Flags and
Sprite. I'm trying to figure this one out.

Original comment by joebingham07@gmail.com on 20 Dec 2008 at 5:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I changed ReadInt32 for Flags back to ReadInt and here's what I got:

False: blocking
False: blocksmissiles
False: blockspath
False: floorchange
False: automap
False: height
True: helplens
False: container
False: corpse
False: fluid
False: ground
False: hangable
False: horizontal
False: vertical
False: animation
True: immovable
False: layer
False: lightsource
False: pickupable
False: readable
False: rotatable
False: rune
False: shifted
False: splash
False: stackable
False: usable
False: writable
False: top1
False: top2
False: top3
True: walkspeed

I deleted my previous post because I had ground instead of fluid container. But 
as
you can see here everything is correct except for helplens and ground. When I 
read
helplens it returns 0, which is correct, but here it says True and ground should
return true, not false.

Original comment by joebingham07@gmail.com on 20 Dec 2008 at 5:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I looked at them, but using ReadInt32, for example, on ground tile 103
isRune/isContainer/isCorpse returns True while ReadInt returns False.

Original comment by joebingham07@gmail.com on 20 Dec 2008 at 6:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Did you look at ReadInt and ReadInt32 methods? They are the same I just changed 
the
name because when you call a method "ReadInt32" you know it will return a 32 
bits
signed integer.  

I did some tests here too:

Item ID: 408 (Ground Tile)
Flags: -1610596351
Blocking: False
BlocksMissiles: False
BlocksPath: False
Floorchange: False
HasAutoMapColor: False
HasHeight: False
HasHelpLens: True
IsContainer: False
IsCorpse: False
IsFluidContainer: False
IsGround: False
IsHangable: False
IsHangableHorizontal: False
IsHangableVertizcal: False
IsIdleAnimation: False
IsImmovable: True
IsLayer: False
IsLightSource: False
IsPickupable: False
IsReadable: False
IsRotatable: False
IsRune: False
IsShifted: False
IsSplash: False
IsStackable: False
IsUsable: False
IsWritable: False
TopOrder1: False
TopOrder2: False
TopOrder3: False
WalkSpeed: True

ItemId: 3031 (Gold)
Flags: 131104
Blocking: False
BlocksMissiles: False
BlocksPath: False
Floorchange: False
HasAutoMapColor: False
HasHeight: False
HasHelpLens: False
IsContainer: False
IsCorpse: False
IsFluidContainer: False
IsGround: False
IsHangable: False
IsHangableHorizontal: False
IsHangableVertizcal: False
IsIdleAnimation: False
IsImmovable: False
IsLayer: False
IsLightSource: False
IsPickupable: True
IsReadable: False
IsRotatable: False
IsRune: False
IsShifted: False
IsSplash: False
IsStackable: True
IsUsable: False
IsWritable: False
TopOrder1: False
TopOrder2: False
TopOrder3: False
WalkSpeed: False

I think the ground flag was changed or removed.

Original comment by brunodun...@gmail.com on 20 Dec 2008 at 6:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Well I'm using BlackDemon's (from OtFans) DatEditor and he hasn't updated it 
since
the 8.2x release and it loads 8.40 just fine and shows that 103 is ground.

Original comment by joebingham07@gmail.com on 20 Dec 2008 at 6:13

GoogleCodeExporter commented 9 years ago
Because the DatEditor load the flags direct from Tibia.Dat not from tibia's 
memory.

Original comment by brunodun...@gmail.com on 20 Dec 2008 at 6:34

GoogleCodeExporter commented 9 years ago
I realized that after I commented, lol. I was thinking that the structures 
would be
the same.

Original comment by joebingham07@gmail.com on 20 Dec 2008 at 6:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I committed a fix for this, please test if everything is ok now.

Original comment by brunodun...@gmail.com on 20 Dec 2008 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by brunodun...@gmail.com on 20 Dec 2008 at 9:22