forked from github/server
bug 2156: fix volcano reporting, maybe.
This commit is contained in:
parent
6927eed52e
commit
54ae00bb7d
2 changed files with 5 additions and 1 deletions
|
@ -225,7 +225,7 @@ volcano_destruction(region * volcano, region * r, const char *damage)
|
|||
if (!fval(u->faction, FFL_SELECT)) {
|
||||
fset(u->faction, FFL_SELECT);
|
||||
ADDMSG(&u->faction->msgs, msg_message("volcanooutbreaknn",
|
||||
"region", r));
|
||||
"region", volcano));
|
||||
}
|
||||
}
|
||||
if (u == *up) {
|
||||
|
|
|
@ -43,6 +43,7 @@ static void test_volcano_outbreak(CuTest *tc) {
|
|||
|
||||
test_setup();
|
||||
mt_register(mt_new_va("volcanooutbreak", "regionv:region", "regionn:region", 0));
|
||||
mt_register(mt_new_va("volcanooutbreaknn", "region:region", 0));
|
||||
mt_register(mt_new_va("volcano_dead", "unit:unit", "region:region", "dead:int", 0));
|
||||
t_volcano = test_create_terrain("volcano", LAND_REGION);
|
||||
t_active = test_create_terrain("activevolcano", LAND_REGION);
|
||||
|
@ -66,6 +67,9 @@ static void test_volcano_outbreak(CuTest *tc) {
|
|||
CuAssertPtrEquals(tc, r, m->parameters[0].v);
|
||||
CuAssertPtrEquals(tc, rn, m->parameters[1].v);
|
||||
|
||||
CuAssertPtrNotNull(tc, m = test_find_messagetype(f->msgs, "volcanooutbreaknn"));
|
||||
CuAssertPtrEquals(tc, r, m->parameters[0].v);
|
||||
|
||||
CuAssertPtrNotNull(tc, m = test_find_messagetype_ex(f->msgs, "volcano_dead", NULL));
|
||||
CuAssertPtrEquals(tc, u1, m->parameters[0].v);
|
||||
CuAssertPtrEquals(tc, r, m->parameters[1].v);
|
||||
|
|
Loading…
Reference in a new issue