item.hp -= 1;

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.

Moderator: POL Developer

Locked
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

item.hp -= 1;

Post by OldnGrey »

For some reason I am not able to decrement an item's hp using
item.hp -= 1;

item.hp := item.hp - 1;
does work as you'd expect.

Is there any problem with those operators when dealing with refs and not integers?
The distro combat hook has armour wear using item.hp -= 1;

So this may be a bug.
If anyone else can test this for me to confirm, it would be good.
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm
Location: Montreal, Canada

Post by *Edwards »

I did in my combat hook and it's not working. I shall reply here in few minutes with a reel test & confirmation.
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm
Location: Montreal, Canada

Post by *Edwards »

Result:
For some reason I am not able to decrement an item's hp using
item.hp -= 1;

item.hp := item.hp - 1;
does work as you'd expect.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

AFAIK UObject member's values cannot be modified using -= += etc constructs. If I remember correctly, this is known bug, that is (too hard) to be fixed. Couldn't find the post stating so, thought.
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

AFAIK UObject member's values cannot be modified using -= += etc constructs
That's true. You can find it here:

http://forums.polserver.com/sutra8110.p ... ight=#8110
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Thanks guys.
That confirms there is a bug in the distro combat scripts.
Locked