summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-14 15:00:02 +0200
committerHaru <haru@dotalux.com>2015-11-14 19:03:36 +0100
commit778db38c4a584cbc3a8a9e56fcef54447e9bee47 (patch)
tree7175b7b09bb4a6feddb879c2689fb4f18392b63b /src/map/script.c
parent1c9e25d58901e9c5bcea6bcbe885bd9c3eb5c72b (diff)
downloadhercules-778db38c4a584cbc3a8a9e56fcef54447e9bee47.tar.gz
hercules-778db38c4a584cbc3a8a9e56fcef54447e9bee47.tar.bz2
hercules-778db38c4a584cbc3a8a9e56fcef54447e9bee47.tar.xz
hercules-778db38c4a584cbc3a8a9e56fcef54447e9bee47.zip
Renamed hQueue/hQueueIterator/hQueueOpt to latest standards
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/map/script.c b/src/map/script.c
index de52dd9ea..45f84ec18 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -18790,7 +18790,7 @@ BUILDIN(montransform) {
return true;
}
-struct hQueue *script_hqueue_get(int idx)
+struct script_queue *script_hqueue_get(int idx)
{
if (idx < 0 || idx >= VECTOR_LENGTH(script->hq) || VECTOR_INDEX(script->hq, idx).size == -1)
return NULL;
@@ -18812,9 +18812,9 @@ int script_hqueue_create(void)
VECTOR_INDEX(script->hq, idx).id = i;
VECTOR_INDEX(script->hq, idx).size = 0;
VECTOR_INDEX(script->hq, idx).items = 0;
- VECTOR_INDEX(script->hq, idx).onDeath[0] = '\0';
- VECTOR_INDEX(script->hq, idx).onLogOut[0] = '\0';
- VECTOR_INDEX(script->hq, idx).onMapChange[0] = '\0';
+ VECTOR_INDEX(script->hq, idx).event_death[0] = '\0';
+ VECTOR_INDEX(script->hq, idx).event_logout[0] = '\0';
+ VECTOR_INDEX(script->hq, idx).event_mapchange[0] = '\0';
return idx;
}
/* set .@id,queue(); */
@@ -18947,28 +18947,28 @@ BUILDIN(queueopt) {
if (idx < 0 || idx >= VECTOR_LENGTH(script->hq) || VECTOR_INDEX(script->hq, idx).size == -1) {
ShowWarning("buildin_queueopt: unknown queue id %d\n",idx);
script_pushint(st, 1);
- } else if( var <= HQO_NONE || var >= HQO_MAX ) {
+ } else if( var <= SQO_NONE || var >= SQO_MAX ) {
ShowWarning("buildin_queueopt: unknown optionType %d\n",var);
script_pushint(st, 1);
} else {
- switch( (enum hQueueOpt)var ) {
- case HQO_OnDeath:
+ switch ((enum ScriptQueueOptions)var) {
+ case SQO_ONDEATH:
if( script_hasdata(st, 4) )
- safestrncpy(VECTOR_INDEX(script->hq, idx).onDeath, script_getstr(st, 4), EVENT_NAME_LENGTH);
+ safestrncpy(VECTOR_INDEX(script->hq, idx).event_death, script_getstr(st, 4), EVENT_NAME_LENGTH);
else
- VECTOR_INDEX(script->hq, idx).onDeath[0] = '\0';
+ VECTOR_INDEX(script->hq, idx).event_death[0] = '\0';
break;
- case HQO_onLogOut:
+ case SQO_ONLOGOUT:
if( script_hasdata(st, 4) )
- safestrncpy(VECTOR_INDEX(script->hq, idx).onLogOut, script_getstr(st, 4), EVENT_NAME_LENGTH);
+ safestrncpy(VECTOR_INDEX(script->hq, idx).event_logout, script_getstr(st, 4), EVENT_NAME_LENGTH);
else
- VECTOR_INDEX(script->hq, idx).onLogOut[0] = '\0';
+ VECTOR_INDEX(script->hq, idx).event_logout[0] = '\0';
break;
- case HQO_OnMapChange:
+ case SQO_ONMAPCHANGE:
if( script_hasdata(st, 4) )
- safestrncpy(VECTOR_INDEX(script->hq, idx).onMapChange, script_getstr(st, 4), EVENT_NAME_LENGTH);
+ safestrncpy(VECTOR_INDEX(script->hq, idx).event_mapchange, script_getstr(st, 4), EVENT_NAME_LENGTH);
else
- VECTOR_INDEX(script->hq, idx).onMapChange[0] = '\0';
+ VECTOR_INDEX(script->hq, idx).event_mapchange[0] = '\0';
break;
default:
ShowWarning("buildin_queueopt: unsupported optionType %d\n",var);
@@ -19047,7 +19047,7 @@ void script_hqueue_clear(int idx) {
/* creates a new queue iterator, returns its id */
BUILDIN(queueiterator) {
int qid = script_getnum(st, 2);
- struct hQueue *queue = NULL;
+ struct script_queue *queue = NULL;
int idx = VECTOR_LENGTH(script->hqi);
int i;
@@ -19088,7 +19088,7 @@ BUILDIN(queueiterator) {
/* returns next/first member in the iterator, 0 if none */
BUILDIN(qiget) {
int idx = script_getnum(st, 2);
- struct hQueueIterator *it = NULL;
+ struct script_queue_iterator *it = NULL;
if (idx < 0 || idx >= VECTOR_LENGTH(script->hqi)) {
ShowWarning("buildin_qiget: unknown queue iterator id %d\n",idx);
@@ -19111,7 +19111,7 @@ BUILDIN(qiget) {
/* returns 1:0 if there is the current member in the iterator exists */
BUILDIN(qicheck) {
int idx = script_getnum(st, 2);
- struct hQueueIterator *it = NULL;
+ struct script_queue_iterator *it = NULL;
if (idx < 0 || idx >= VECTOR_LENGTH(script->hqi)) {
ShowWarning("buildin_qicheck: unknown queue iterator id %d\n",idx);
@@ -20376,7 +20376,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(showevent, "i?"),
/**
- * hQueue [Ind/Hercules]
+ * script_queue [Ind/Hercules]
**/
BUILDIN_DEF(queue,""),
BUILDIN_DEF(queuesize,"i"),