- Joined
- Oct 23, 2011
- Messages
- 182
Weird bug with spellbook / upgrade
I'm having the strangest bug, and I'm totally stuck because of this bug.
A unit, with some kind of HP(%) upgrade that's level 3+, has a disabled spellbook with an evasion ability added, the unit will instantly die.
I came across this bug after about a month trying to figure out what was causing strange bugs in my map.
There seems to be other side effects too, which are just as strange.
(if the HP(%) upgrade was below level 3, and if the unit was removed by 'RemoveUnit' function some time in future,
the unit is considered 'dead' but it still attacks in a transparent, invulnerable state!)
Yes, the above conditions have to be met for this to happen.
I've even attached a test map for anyone curious.
I'm having the strangest bug, and I'm totally stuck because of this bug.
A unit, with some kind of HP(%) upgrade that's level 3+, has a disabled spellbook with an evasion ability added, the unit will instantly die.
I came across this bug after about a month trying to figure out what was causing strange bugs in my map.
There seems to be other side effects too, which are just as strange.
(if the HP(%) upgrade was below level 3, and if the unit was removed by 'RemoveUnit' function some time in future,
the unit is considered 'dead' but it still attacks in a transparent, invulnerable state!)
JASS:
struct Test extends array
private method index takes nothing returns nothing
call UnitAddAbility(.unit, 'Aspb')
endmethod
private static method periodic takes nothing returns nothing
call CreateUnit(Player(11), 'hfoo', 0, 0, 0)
endmethod
private static method onInit takes nothing returns nothing
call FogEnable(false)
call FogMaskEnable(false)
call TimerStart(CreateTimer(), 5, true, function thistype.periodic)
call SetPlayerAbilityAvailable(Player(11), 'Aspb', false)
call SetPlayerTechResearched(Player(11), 'Rhar', 3)
endmethod
implement UnitIndexStruct
endstruct
Yes, the above conditions have to be met for this to happen.
I've even attached a test map for anyone curious.
Attachments
Last edited: