forked from github/server
catch attempts to cast a spell without the magic skill
This commit is contained in:
parent
14e2e96c73
commit
e3f2ca9aaf
|
@ -2563,6 +2563,7 @@ static castorder *cast_cmd(unit * u, order * ord)
|
||||||
* Vertrauter einen Spruch seines Magiers zaubert, dessen halbes Talent.
|
* Vertrauter einen Spruch seines Magiers zaubert, dessen halbes Talent.
|
||||||
*/
|
*/
|
||||||
skill = effskill(u, SK_MAGIC, NULL);
|
skill = effskill(u, SK_MAGIC, NULL);
|
||||||
|
if (skill > 0) {
|
||||||
sp = unit_getspell(u, s, u->faction->locale);
|
sp = unit_getspell(u, s, u->faction->locale);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2577,7 +2578,7 @@ static castorder *cast_cmd(unit * u, order * ord)
|
||||||
/* wir zaubern selbst */
|
/* wir zaubern selbst */
|
||||||
mage = u;
|
mage = u;
|
||||||
}
|
}
|
||||||
else if (skill > 0) {
|
else {
|
||||||
/* als Vertrauter suchen wir einen Spender-Magier mit dem Spruch */
|
/* als Vertrauter suchen wir einen Spender-Magier mit dem Spruch */
|
||||||
mage = get_familiar_mage(u);
|
mage = get_familiar_mage(u);
|
||||||
if (mage) {
|
if (mage) {
|
||||||
|
@ -2594,8 +2595,9 @@ static castorder *cast_cmd(unit * u, order * ord)
|
||||||
familiar = u;
|
familiar = u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* OBS: hier kein else! */
|
}
|
||||||
if (!sp) {
|
|
||||||
|
if (!sp || !mage) {
|
||||||
/* Fehler 'Spell not found' */
|
/* Fehler 'Spell not found' */
|
||||||
cmistake(u, ord, 173, MSG_MAGIC);
|
cmistake(u, ord, 173, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue