summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-10-02 23:58:30 +0200
committerHaru <haru@dotalux.com>2020-03-08 20:56:28 +0100
commit7879d7be752fe7488c8d1653b0ca88e6574b9e4a (patch)
treea9cf2a9396d0aed360c42693f6401d771dfab5f4
parent33eb8cd6bf37336da5a7305531aa010e1b9ace30 (diff)
downloadhercules-7879d7be752fe7488c8d1653b0ca88e6574b9e4a.tar.gz
hercules-7879d7be752fe7488c8d1653b0ca88e6574b9e4a.tar.bz2
hercules-7879d7be752fe7488c8d1653b0ca88e6574b9e4a.tar.xz
hercules-7879d7be752fe7488c8d1653b0ca88e6574b9e4a.zip
Add documentation for unit->walktoxy
-rw-r--r--src/map/unit.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index c67a7e919..3a1f2a9f9 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -514,12 +514,19 @@ static int unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data)
return 0;
}
-//flag parameter:
-//&1 -> 1/0 = easy/hard
-//&2 -> force walking
-//&4 -> Delay walking if the reason you can't walk is the canwalk delay
-//&8 -> Search for an unoccupied cell and cancel if none available
-//@return 0: success, 1: failure
+/**
+ * Makes a unit walk to (x, y) coordinates
+ * @param bl: block_list of unit to move
+ * @param x: x-coordinate
+ * @param y: y-coordinate
+ * @param flag: flag paramater with following options:
+ * - `& 1` -> 1/0 = easy / hard
+ * - `& 2` -> Force walking
+ * - `& 4` -> Delay walking, if the reason you can't walk is the `canwalk delay`
+ * - `& 8` -> Search for an unoccupied cell and cancel if none available
+ * .
+ * @return 0: success, 1: failure
+ */
static int unit_walktoxy(struct block_list *bl, short x, short y, int flag)
{
struct unit_data* ud = NULL;