forked from github/server
- missing description of blessed_harvest
- missing message causes warning instead of error - curseinfo for gad/good magicresistance zone
This commit is contained in:
parent
d2aa46fb39
commit
7cca06e400
|
@ -395,7 +395,7 @@ msg_message(const char * name, const char* sig, ...)
|
||||||
memset(args, 0, sizeof(args));
|
memset(args, 0, sizeof(args));
|
||||||
|
|
||||||
if (!mtype) {
|
if (!mtype) {
|
||||||
log_error(("trying to create message of unknown type \"%s\"\n", name));
|
log_warning(("trying to create message of unknown type \"%s\"\n", name));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
|
#include "goodies.h"
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -109,31 +111,42 @@ msg_create_va(const struct message_type * type, ...)
|
||||||
|
|
||||||
typedef struct messagetype_list {
|
typedef struct messagetype_list {
|
||||||
struct messagetype_list * next;
|
struct messagetype_list * next;
|
||||||
const message_type * type;
|
const struct message_type * data;
|
||||||
} messagetype_list;
|
} messagetype_list;
|
||||||
|
|
||||||
static messagetype_list * messagetypes;
|
#define MT_MAXHASH 1023
|
||||||
|
static messagetype_list * messagetypes[MT_MAXHASH];
|
||||||
const message_type *
|
|
||||||
mt_register(const message_type * type)
|
|
||||||
{
|
|
||||||
messagetype_list * mtl = messagetypes;
|
|
||||||
while (mtl && mtl->type!=type) mtl=mtl->next;
|
|
||||||
if (mtl==NULL) {
|
|
||||||
mtl = malloc(sizeof(messagetype_list));
|
|
||||||
mtl->type = type;
|
|
||||||
mtl->next = messagetypes;
|
|
||||||
messagetypes = mtl;
|
|
||||||
}
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
const message_type *
|
const message_type *
|
||||||
mt_find(const char * name)
|
mt_find(const char * name)
|
||||||
{
|
{
|
||||||
messagetype_list * mtl = messagetypes;
|
const struct message_type * found = NULL;
|
||||||
while (mtl && strcasecmp(mtl->type->name, name)!=0) mtl=mtl->next;
|
unsigned int hash = hashstring(name) % MT_MAXHASH;
|
||||||
return mtl?mtl->type:NULL;
|
messagetype_list * type = messagetypes[hash];
|
||||||
|
while (type) {
|
||||||
|
if (strcmp(type->data->name, name)==0) {
|
||||||
|
if (found==NULL) found = type->data;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
type = type->next;
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const message_type *
|
||||||
|
mt_register(const message_type * type)
|
||||||
|
{
|
||||||
|
unsigned int hash = hashstring(type->name) % MT_MAXHASH;
|
||||||
|
messagetype_list * mtl = messagetypes[hash];
|
||||||
|
while (mtl && mtl->data!=type) mtl=mtl->next;
|
||||||
|
if (mtl==NULL) {
|
||||||
|
mtl = malloc(sizeof(messagetype_list));
|
||||||
|
mtl->data = type;
|
||||||
|
mtl->next = messagetypes[hash];
|
||||||
|
messagetypes[hash] = mtl;
|
||||||
|
}
|
||||||
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -4009,6 +4009,10 @@
|
||||||
they will flee from the dreadful chants and try to make
|
they will flee from the dreadful chants and try to make
|
||||||
their escape.</text>
|
their escape.</text>
|
||||||
</string>
|
</string>
|
||||||
|
<string name="blessedharvest">
|
||||||
|
<text locale="de">Dieses Ernteritual verbessert die Erträge der arbeitenden Bauern in der Region um ein Silberstück. Je mehr Kraft der Druide investiert, desto länger wirkt der Zauber.</text>
|
||||||
|
<text locale="en">This ritual increases the output of the local farms. Peasants in the region produce an extra silverpiece. The stronger the druid's spell is, the longer the effect will last.</text>
|
||||||
|
</string>
|
||||||
<string name="song_of_confusion">
|
<string name="song_of_confusion">
|
||||||
<text locale="de">Aus den uralten Gesängen der Katzen
|
<text locale="de">Aus den uralten Gesängen der Katzen
|
||||||
entstammt dieses magisches Lied, welches vor einem
|
entstammt dieses magisches Lied, welches vor einem
|
||||||
|
|
|
@ -25,6 +25,22 @@
|
||||||
<text locale="fr">"($int36($id))"</text>
|
<text locale="fr">"($int36($id))"</text>
|
||||||
<text locale="en">"($int36($id))"</text>
|
<text locale="en">"($int36($id))"</text>
|
||||||
</message>
|
</message>
|
||||||
|
<message name="curseinfo::goodmagicresistancezone" section="events">
|
||||||
|
<type>
|
||||||
|
<arg name="id" type="int"></arg>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"Die natürliche Widerstandskraft gegen Verzauberung bestimmter Einheiten in dieser Region wurde gestärkt. ($int36($id))"</text>
|
||||||
|
<text locale="fr">"($int36($id))"</text>
|
||||||
|
<text locale="en">"($int36($id))"</text>
|
||||||
|
</message>
|
||||||
|
<message name="curseinfo::badmagicresistancezone" section="events">
|
||||||
|
<type>
|
||||||
|
<arg name="id" type="int"></arg>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"Die natürliche Widerstandskraft gegen Verzauberung bestimmter Einheiten in dieser Region wurde geschwächt. ($int36($id))"</text>
|
||||||
|
<text locale="fr">"($int36($id))"</text>
|
||||||
|
<text locale="en">"($int36($id))"</text>
|
||||||
|
</message>
|
||||||
<message name="curseinfo::magicwalls" section="events">
|
<message name="curseinfo::magicwalls" section="events">
|
||||||
<type>
|
<type>
|
||||||
<arg name="id" type="int"></arg>
|
<arg name="id" type="int"></arg>
|
||||||
|
|
Loading…
Reference in New Issue