HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Warcraft Bug - Spellbook and Ordering a Unit

01-09-2008, 07:32 PM#1
EnderA
This may be old news, but I discovered a bug in Warcraft related to Spellbook's Order ID and issuing an order to a unit. I haven't narrowed it down further than the following situation:

A custom spellbook has the Order ID blizzard. A building has that spellbook as an ability. A separate unit has an ability based off of Blizzard. A trigger orders the unit to cast blizzard on a point.

The result: The unit actually does not cast the spell.

Simply change the Order ID of the spellbook to something else and voilà - the unit casts the spell.

The crucial thing to note: The unit you're ordering does NOT have the spellbook, merely the blizzard spell, yet the spellbook somehow hijacks and overrides the triggered order!


Questions I still have about the bug: Does it happen with orders other than blizzard? Can the spellbook be given to any unit (not just a structure) to create this bug? Perhaps a unit doesn't have to have the abilty, does the spellbook ability just have to exist? Does it affect player-issued orders as well?

Anyways, the bug tormented me for hours (I thought there was something wrong with my triggers) until I finally randomly changed the spellbook's OrderID on the off-chance that it somehow caused the bug. I was very surprised, yet relieved, when I discovered that it was the source of the problem.


EDIT: Attached demo-map, which narrows the bug down. It is easier to see for yourself. Instructions:
Type "help" for a list of commands. Type:
"give1" - give Channel with Blizzard ID, No Target to SpellBuilding
"give2" - give Channel with Blizzard ID, Unit Target to SpellBuilding
"give3" - give Channel with Blizzard ID, Point Target to SpellBuilding
"give4" - give Channel with Blizzard ID, Unit and Point Target to SpellBuilding
"give5" - give SpellBook with Blizzard ID to SpellBuilding
"give6" - give Blizzard to Caster

Hit ESCAPE to order Caster to cast Blizzard on the middle of the map. Message will pop up notifying of success/failure.

How it works:
If SpellBuilding learns a non-point target spell with the Blizzard OrderID before the Caster learns Blizzard, then the Caster will not cast blizzard when ordered to (by pressing ESC.) If Caster is given the ability in any other way or order, the Caster will cast when ordered.
Attached Files
File type: w3xWc3BugProof2.w3x (18.5 KB)
01-09-2008, 08:38 PM#2
DioD
demo map plz.

unit with no spell book will cast spell, nothing can stop him.
01-09-2008, 08:43 PM#3
xombie
So you're saying a unit with the blizzard spell is not casting the spell when ordered "blizzard"? Your hunch is because of a spell book - is that basically what you're saying?
01-09-2008, 09:40 PM#4
EnderA
Here is the demo map. By default, the building (called SpellBuilding) has the ability "Channel with Blizzard ID". The footman (called Caster) has a no-mana blizzard. A trigger orders the Caster to cast Blizzard on the center of the map when you hit escape.

To show that the trigger works without the ability, simply remove the ability from the SpellBuilding, then test the map again. The Caster will cast the ability.

Oddly enough, the channel ability does not display in-game in the building. (I don't know why that is, but that's a separate issue.)
Attached Files
File type: w3xWc3BugProof.w3x (16.7 KB)
01-09-2008, 09:46 PM#5
xombie
For the spell book not showing in-game, are you sure the Visible box is clicked in the Channel ability?

Also, try to check whether or not the IssuePointOrder returns true or false.
01-09-2008, 10:05 PM#6
EnderA
Quote:
Originally Posted by xombie
For the spell book not showing in-game, are you sure the Visible box is clicked in the Channel ability?

Also, try to check whether or not the IssuePointOrder returns true or false.

Ah yes, that was why Channel wasn't showing. Anyways, that's not the point.

IssuePointOrder returns false. Here's the new map with your change - it displays the return value with the text.

EDIT: See the EDIT at the bottom of my original post for a newer version with in-game customizability (you must restart the map to test ability learning in a different order, however.)
Attached Files
File type: w3xWc3BugProof.w3x (17.0 KB)