Fixed return value of unitattack for players

Fixes #2345

Thanks to @anacondaqq
This commit is contained in:
Lemongrass3110
2017-08-16 11:33:35 +02:00
parent 165197d26f
commit 4cb4d60fee
2 changed files with 16 additions and 8 deletions

View File

@@ -7356,12 +7356,17 @@ Examples:
*unitattack <GID>,<Target ID>{,<action type>};
*unitattack <GID>,"<Target Name>"{,<action type>};
This command will make a <GID> attack the specified target. It returns 1 upon
success and 0 for all failures.
This command will make a <GID> attack the specified target. It returns true upon
success and false for all failures.
If <GID> is a player and a non-zero <action type> is given, the unit will perform a
continuous attack instead of a single attack.
Note:
Using unitattack with <GID> 0 means that it will use the currently attached unit.
For players any attack requests will fail, because talking to an NPC prevents attacking a monster.
Therefore you need to detach the player from the NPC before using this command.
---------------------------------------
*unitkill <GID>;