diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-19 12:55:29 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-19 12:55:29 +0000 |
commit | 3c89751e48a424ce26bc1c6f78f4bf7fb6242fac (patch) | |
tree | 3c8b08a06bfe053c32d6312092576db372fc757e /src/map/script.c | |
parent | 2a2455a8ac012ef30c85c07d0ad5dd39307acae4 (diff) | |
download | hercules-3c89751e48a424ce26bc1c6f78f4bf7fb6242fac.tar.gz hercules-3c89751e48a424ce26bc1c6f78f4bf7fb6242fac.tar.bz2 hercules-3c89751e48a424ce26bc1c6f78f4bf7fb6242fac.tar.xz hercules-3c89751e48a424ce26bc1c6f78f4bf7fb6242fac.zip |
* Cleaned/clarified some #include relationships between headers
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects)
* Removed way messed-up script function 'unitdeadsit'
* Tagged 'FIXME' lines written by myself
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/src/map/script.c b/src/map/script.c index 472b4e545..86019c40e 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8,7 +8,6 @@ //#define DEBUG_HASH #include "../common/cbasetypes.h" -#include "../common/socket.h" #include "../common/timer.h" #include "../common/malloc.h" #include "../common/lock.h" @@ -53,6 +52,7 @@ #include <setjmp.h> #include <errno.h> + /////////////////////////////////////////////////////////////////////////////// //## TODO possible enhancements: [FlavioJS] // - 'callfunc' supporting labels in the current npc "::LabelName" @@ -4031,7 +4031,6 @@ BUILDIN_FUNC(unitattack); BUILDIN_FUNC(unitstop); BUILDIN_FUNC(unittalk); BUILDIN_FUNC(unitemote); -BUILDIN_FUNC(unitdeadsit); BUILDIN_FUNC(unitskilluseid); // originally by Qamera [celest] BUILDIN_FUNC(unitskillusepos); // originally by Qamera [celest] // <--- [zBuffer] List of mob control commands @@ -4373,7 +4372,6 @@ struct script_function buildin_func[] = { BUILDIN_DEF(unitstop,"i"), BUILDIN_DEF(unittalk,"is"), BUILDIN_DEF(unitemote,"ii"), - BUILDIN_DEF(unitdeadsit,"ii"), BUILDIN_DEF(unitskilluseid,"iii?"), // originally by Qamera [Celest] BUILDIN_DEF(unitskillusepos,"iiiii"), // [Celest] // <--- [zBuffer] List of mob control commands @@ -10667,7 +10665,7 @@ BUILDIN_FUNC(soundeffectall) name = script_getstr(st,2); type = script_getnum(st,3); - //FIXME: enumerating map squares (map_foreach) is slower than enumerating the list of online players (map_foreachpc?) + //FIXME: enumerating map squares (map_foreach) is slower than enumerating the list of online players (map_foreachpc?) [ultramage] if(!script_hasdata(st,4)) { // area around @@ -13075,41 +13073,6 @@ BUILDIN_FUNC(unitemote) return 0; } -/// Makes the unit do an action -/// TODO actions -/// -/// unitdeadsit <unit_id>,<action>; -BUILDIN_FUNC(unitdeadsit) -{ - int unit_id; - int action; - struct block_list* bl; - - unit_id = script_getnum(st,2); - action = script_getnum(st,3); - - bl = map_id2bl(unit_id); - if( bl != NULL ) - { - if( action > -1 && action < 4 ) - { - unsigned char buf[61] = ""; - struct view_data *vd = status_get_viewdata(bl); - if (vd) vd->dead_sit = action; - WBUFW(buf, 0) = 0x8a; - WBUFL(buf, 2) = bl->id; - WBUFB(buf,26) = (unsigned char)action; - clif_send(buf, 61, bl, AREA); - } else - { - ShowWarning("script:unitdeadsit: %d is not a valid action\n", action); - return 1; - } - } - - return 0; -} - /// Makes the unit cast the skill on the target or self if no target is specified /// /// unitskilluseid <unit_id>,<skill_id>,<skill_lv>{,<target_id>}; |