forked from github/server
Merge branch 'master' of https://github.com/eressea/server
This commit is contained in:
commit
de5ef3f87b
|
@ -1,10 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<resource name="money">
|
|
||||||
<item weight="1"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="ao_healing" appearance="amulet">
|
<resource name="ao_healing" appearance="amulet">
|
||||||
<item weight="0" score="6000"/>
|
<item weight="0" score="6000"/>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<items>
|
||||||
|
</items>
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
[ -z $ERESSEA ] && ERESSEA=$HOME/eressea
|
||||||
s/preview build master
|
SRC=$ERESSEA/git
|
||||||
s/preview version
|
$SRC/s/preview build master
|
||||||
|
$SRC/s/preview version
|
||||||
for game in 2 3 4 ; do
|
for game in 2 3 4 ; do
|
||||||
s/preview -g $game run && \
|
$SRC/s/preview -g $game run && \
|
||||||
s/preview -g $game send
|
$SRC/s/preview -g $game send
|
||||||
done
|
done
|
||||||
|
|
|
@ -2766,7 +2766,7 @@ static void breed_cmd(unit * u, struct order *ord)
|
||||||
(void)init_order(ord);
|
(void)init_order(ord);
|
||||||
s = getstrtoken();
|
s = getstrtoken();
|
||||||
|
|
||||||
m = atoi((const char *)s);
|
m = s ? atoi((const char *)s) : 0;
|
||||||
if (m != 0) {
|
if (m != 0) {
|
||||||
/* first came a want-paramter */
|
/* first came a want-paramter */
|
||||||
s = getstrtoken();
|
s = getstrtoken();
|
||||||
|
@ -2775,7 +2775,7 @@ static void breed_cmd(unit * u, struct order *ord)
|
||||||
m = INT_MAX;
|
m = INT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s[0]) {
|
if (!s || !s[0]) {
|
||||||
p = P_ANY;
|
p = P_ANY;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -544,7 +544,8 @@ char *write_order(const order * ord, char *buffer, size_t size)
|
||||||
keyword_t kwd = ORD_KEYWORD(ord);
|
keyword_t kwd = ORD_KEYWORD(ord);
|
||||||
if (kwd == NOKEYWORD) {
|
if (kwd == NOKEYWORD) {
|
||||||
const char *text = ORD_STRING(ord);
|
const char *text = ORD_STRING(ord);
|
||||||
strlcpy(buffer, (const char *)text, size);
|
if (text) strlcpy(buffer, (const char *)text, size);
|
||||||
|
else buffer[0] = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
get_command(ord, buffer, size);
|
get_command(ord, buffer, size);
|
||||||
|
|
10
src/laws.c
10
src/laws.c
|
@ -3923,10 +3923,14 @@ void defaultorders(void)
|
||||||
order *ord = *ordp;
|
order *ord = *ordp;
|
||||||
if (getkeyword(ord) == K_DEFAULT) {
|
if (getkeyword(ord) == K_DEFAULT) {
|
||||||
char lbuf[8192];
|
char lbuf[8192];
|
||||||
order *new_order;
|
order *new_order = 0;
|
||||||
|
const char *s;
|
||||||
init_order(ord);
|
init_order(ord);
|
||||||
strcpy(lbuf, getstrtoken());
|
s = getstrtoken();
|
||||||
new_order = parse_order(lbuf, u->faction->locale);
|
if (s) {
|
||||||
|
strcpy(lbuf, s);
|
||||||
|
new_order = parse_order(lbuf, u->faction->locale);
|
||||||
|
}
|
||||||
*ordp = ord->next;
|
*ordp = ord->next;
|
||||||
ord->next = NULL;
|
ord->next = NULL;
|
||||||
free_order(ord);
|
free_order(ord);
|
||||||
|
|
Loading…
Reference in New Issue