capturing spellbook order/keep spellbook open

Status
Not open for further replies.
Level 26
Joined
Feb 2, 2006
Messages
1,497
Hello there,
for my custom grimoire system I use the spellbook ability from Warcraft. Unfortunately, whenever I remove spells from the spellbook (using another spellbook ability with the same id as described here: http://www.wc3c.net/showthread.php?t=81742) it closes the spellbook which I want to prevent.
Besides I am not able to capture any order id when I click on the spellbook so I don't know how to trigger reopening it manually.
For removing abilities from spellbook I simply call:
JASS:
call UnitRemoveAbility(this.grimoire().character().unit(), this.grimoireAbility())
where grimoireAbility() returns the ability id of the spellbook ability with the same id but only the one single spell which should be removed from the spellbook.
Adding works like this:
JASS:
call UnitAddAbility(this.grimoire().character().unit(), this.grimoireAbility())
call SetPlayerAbilityAvailable(this.grimoire().character().player(), this.grimoireAbility(), false)
call SetUnitAbilityLevel(this.grimoire().character().unit(), this.ability(), 1)
 
Status
Not open for further replies.
Top