forked from github/server
crash bei curse-effect messages, wenn der magier des curse nicht existiert
This commit is contained in:
parent
a1912109d2
commit
73cda7a160
2 changed files with 13 additions and 9 deletions
|
@ -999,12 +999,14 @@ spellpower(region * r, unit * u, spell * sp, int cast_level, struct order * ord)
|
||||||
force -= curse_geteffect(c);
|
force -= curse_geteffect(c);
|
||||||
curse_changevigour(&r->attribs, c, -cast_level);
|
curse_changevigour(&r->attribs, c, -cast_level);
|
||||||
cmistake(u, ord, 185, MSG_MAGIC);
|
cmistake(u, ord, 185, MSG_MAGIC);
|
||||||
|
if (mage!=NULL) {
|
||||||
if (force>0) {
|
if (force>0) {
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("reduce_spell", "self mage region", mage, u, r));
|
ADDMSG(&mage->faction->msgs, msg_message("reduce_spell", "self mage region", mage, u, r));
|
||||||
} else {
|
} else {
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("block_spell", "self mage region", mage, u, r));
|
ADDMSG(&mage->faction->msgs, msg_message("block_spell", "self mage region", mage, u, r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Patzerfluch-Effekt: */
|
/* Patzerfluch-Effekt: */
|
||||||
c = get_curse(r->attribs, ct_find("fumble"));
|
c = get_curse(r->attribs, ct_find("fumble"));
|
||||||
|
@ -1013,12 +1015,14 @@ spellpower(region * r, unit * u, spell * sp, int cast_level, struct order * ord)
|
||||||
force -= curse_geteffect(c);
|
force -= curse_geteffect(c);
|
||||||
curse_changevigour(&u->attribs, c, -1);
|
curse_changevigour(&u->attribs, c, -1);
|
||||||
cmistake(u, ord, 185, MSG_MAGIC);
|
cmistake(u, ord, 185, MSG_MAGIC);
|
||||||
|
if (mage!=NULL) {
|
||||||
if (force>0) {
|
if (force>0) {
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("reduce_spell", "self mage region", mage, u, r));
|
ADDMSG(&mage->faction->msgs, msg_message("reduce_spell", "self mage region", mage, u, r));
|
||||||
} else {
|
} else {
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("block_spell", "self mage region", mage, u, r));
|
ADDMSG(&mage->faction->msgs, msg_message("block_spell", "self mage region", mage, u, r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
force = force * MagicPower();
|
force = force * MagicPower();
|
||||||
|
|
||||||
|
|
|
@ -4401,7 +4401,7 @@ sp_migranten(castorder *co)
|
||||||
|
|
||||||
if (kontaktiert == 0) {
|
if (kontaktiert == 0) {
|
||||||
ADDMSG(&mage->faction->msgs, msg_message("spellfail::contact",
|
ADDMSG(&mage->faction->msgs, msg_message("spellfail::contact",
|
||||||
"mage region order target", mage, mage->region, co->order,
|
"mage region command target", mage, mage->region, co->order,
|
||||||
target));
|
target));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue