using astral_appear message more consistently.

This commit is contained in:
Enno Rehling 2007-02-11 23:07:27 +00:00
parent aa32666264
commit ba210c8106
1 changed files with 25 additions and 14 deletions

View File

@ -1912,6 +1912,8 @@ sp_treewalkexit(castorder *co)
sprintf(buf, "%s ist zu schwer.", unitname(u)); sprintf(buf, "%s ist zu schwer.", unitname(u));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE); addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
} else { } else {
message * m = NULL;
remaining_cap = remaining_cap - w; remaining_cap = remaining_cap - w;
move_unit(u, rt, NULL); move_unit(u, rt, NULL);
erfolg = cast_level; erfolg = cast_level;
@ -1933,15 +1935,16 @@ sp_treewalkexit(castorder *co)
/* Meldungen in der Zielregion */ /* Meldungen in der Zielregion */
for (u2 = r->units; u2; u2 = u2->next) freset(u2->faction, FL_DH); for (u2 = r->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for(u2 = rt->units; u2; u2 = u2->next ) { for (u2 = rt->units; u2; u2 = u2->next ) {
if (!fval(u2->faction, FL_DH)) { if (!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if (cansee(u2->faction, rt, u, 0)) { if (cansee(u2->faction, rt, u, 0)) {
sprintf(buf, "%s erscheint plötzlich.", unitname(u)); fset(u2->faction, FL_DH);
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO); if (!m) m = msg_message("astral_appear", "unit", u);
r_addmessage(r, u2->faction, m);
} }
} }
} }
if (m) msg_release(m);
} }
} }
} }
@ -5706,6 +5709,7 @@ sp_enterastral(castorder *co)
addmessage(r, mage->faction, "Die Einheit ist zu schwer.", addmessage(r, mage->faction, "Die Einheit ist zu schwer.",
MSG_MAGIC, ML_MISTAKE); MSG_MAGIC, ML_MISTAKE);
} else { } else {
message * m = NULL;
remaining_cap = remaining_cap - w; remaining_cap = remaining_cap - w;
move_unit(u, rt, NULL); move_unit(u, rt, NULL);
@ -5728,13 +5732,14 @@ sp_enterastral(castorder *co)
for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH); for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for (u2 = rt->units; u2; u2 = u2->next ) { for (u2 = rt->units; u2; u2 = u2->next ) {
if (!fval(u2->faction, FL_DH)) { if (!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if (cansee(u2->faction, rt, u, 0)) { if (cansee(u2->faction, rt, u, 0)) {
sprintf(buf, "%s erscheint plötzlich.", unitname(u)); fset(u2->faction, FL_DH);
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO); if (!m) m = msg_message("astral_appear", "unit", u);
r_addmessage(r, u2->faction, m);
} }
} }
} }
if (m) msg_release(m);
} }
} }
return cast_level; return cast_level;
@ -5823,6 +5828,8 @@ sp_pullastral(castorder *co)
addmessage(r, mage->faction, "Die Einheit ist zu schwer.", addmessage(r, mage->faction, "Die Einheit ist zu schwer.",
MSG_MAGIC, ML_MISTAKE); MSG_MAGIC, ML_MISTAKE);
} else { } else {
message * m = NULL;
remaining_cap = remaining_cap - w; remaining_cap = remaining_cap - w;
move_unit(u, rt, NULL); move_unit(u, rt, NULL);
@ -5843,15 +5850,16 @@ sp_pullastral(castorder *co)
/* Meldungen in der Zielregion */ /* Meldungen in der Zielregion */
for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH); for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for(u2 = rt->units; u2; u2 = u2->next ) { for (u2 = rt->units; u2; u2 = u2->next ) {
if (!fval(u2->faction, FL_DH)) { if (!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if (cansee(u2->faction, rt, u, 0)) { if (cansee(u2->faction, rt, u, 0)) {
sprintf(buf, "%s erscheint plötzlich.", unitname(u)); fset(u2->faction, FL_DH);
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO); if (!m) m = msg_message("astral_appear", "unit", u);
r_addmessage(r, u2->faction, m);
} }
} }
} }
if (m) msg_release(m);
} }
} }
return cast_level; return cast_level;
@ -5933,6 +5941,8 @@ sp_leaveastral(castorder *co)
addmessage(r, mage->faction, "Die Einheit ist zu schwer.", addmessage(r, mage->faction, "Die Einheit ist zu schwer.",
MSG_MAGIC, ML_MISTAKE); MSG_MAGIC, ML_MISTAKE);
} else { } else {
message * m = NULL;
remaining_cap = remaining_cap - w; remaining_cap = remaining_cap - w;
move_unit(u, rt, NULL); move_unit(u, rt, NULL);
@ -5955,13 +5965,14 @@ sp_leaveastral(castorder *co)
for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH); for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for (u2 = rt->units; u2; u2 = u2->next ) { for (u2 = rt->units; u2; u2 = u2->next ) {
if (!fval(u2->faction, FL_DH)) { if (!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if (cansee(u2->faction, rt, u, 0)) { if (cansee(u2->faction, rt, u, 0)) {
sprintf(buf, "%s erscheint plötzlich.", unitname(u)); fset(u2->faction, FL_DH);
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO); if (!m) m = msg_message("astral_appear", "unit", u);
r_addmessage(r, u2->faction, m);
} }
} }
} }
if (m) msg_release(m);
} }
} }
return cast_level; return cast_level;