forked from github/server
Bug in Untoten-Message
Bug in Astraler Blick, Zauber disabled Bug in GIB, wenn Fluch aktiviert
This commit is contained in:
parent
a70e25ed9c
commit
f79c3332eb
|
@ -516,7 +516,7 @@ give_peasants(int n, const item_type * itype, unit * src)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
give_item(int want, const item_type * itype, unit * src, unit * dest, const char * cmd)
|
||||
{
|
||||
short error = 0;
|
||||
|
@ -528,13 +528,13 @@ give_item(int want, const item_type * itype, unit * src, unit * dest, const char
|
|||
if (dest && src->faction != dest->faction && src->faction->age < GIVERESTRICTION) {
|
||||
ADDMSG(&src->faction->msgs, msg_error(src, cmd, "giverestriction",
|
||||
"turns", GIVERESTRICTION));
|
||||
return;
|
||||
return -1;
|
||||
} else if (n == 0) {
|
||||
error = 36;
|
||||
} else if (itype->flags & ITF_CURSED) {
|
||||
error = 25;
|
||||
} else if (itype->give && !itype->give(src, dest, itype, n, cmd)) {
|
||||
return;
|
||||
return -1;
|
||||
} else {
|
||||
int use = new_use_pooled(src, item2resource(itype), GET_SLACK, n);
|
||||
if (use<n) use += new_use_pooled(src, item2resource(itype), GET_RESERVE|GET_POOLED_SLACK, n-use);
|
||||
|
@ -561,6 +561,8 @@ TODO: Einen Trigger benutzen!
|
|||
}
|
||||
}
|
||||
add_give(src, dest, n, item2resource(itype), cmd, error);
|
||||
if (error) return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -923,10 +925,10 @@ dogive(region * r, unit * u, strlist * S, boolean liefere, int mode)
|
|||
while (*itmp) {
|
||||
const herb_type * htype = resource2herb((*itmp)->type->rtype);
|
||||
if (htype && (*itmp)->number>0) {
|
||||
give_item((*itmp)->number, (*itmp)->type, u, u2, S->s);
|
||||
n = 1;
|
||||
if (give_item((*itmp)->number, (*itmp)->type, u, u2, S->s)==0) continue;
|
||||
}
|
||||
else itmp = &(*itmp)->next;
|
||||
itmp = &(*itmp)->next;
|
||||
}
|
||||
}
|
||||
if (!n) cmistake(u, S->s, 38, MSG_COMMERCE);
|
||||
|
@ -972,9 +974,9 @@ dogive(region * r, unit * u, strlist * S, boolean liefere, int mode)
|
|||
if ((*itmp)->number > 0
|
||||
&& (*itmp)->number - new_get_resvalue(u, (*itmp)->type->rtype) > 0) {
|
||||
n = (*itmp)->number - new_get_resvalue(u, (*itmp)->type->rtype);
|
||||
give_item(n, (*itmp)->type, u, u2, S->s);
|
||||
if (give_item(n, (*itmp)->type, u, u2, S->s)==0) continue;
|
||||
}
|
||||
else itmp = &(*itmp)->next;
|
||||
itmp = &(*itmp)->next;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -6239,6 +6239,8 @@ sp_showastral(castorder *co)
|
|||
int cast_level = co->level;
|
||||
int power = co->force;
|
||||
|
||||
return 0;
|
||||
|
||||
switch(getplaneid(r)) {
|
||||
case 0:
|
||||
rt = r_standard_to_astral(r);
|
||||
|
|
|
@ -5246,6 +5246,7 @@
|
|||
<message name="undeadrise">
|
||||
<type>
|
||||
<arg name="region" type="region"></arg>
|
||||
<arg name="amount" type="int"></arg>
|
||||
</type>
|
||||
<locale name="de">
|
||||
<nr section="events">
|
||||
|
|
Loading…
Reference in New Issue