• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

capturing spellbook order/keep spellbook open

Status
Not open for further replies.
Level 28
Joined
Feb 2, 2006
Messages
1,651
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