bugfix neue curse

This commit is contained in:
Enno Rehling 2009-07-23 19:58:46 +00:00
parent 2648690af9
commit df2a9b7957
1 changed files with 4 additions and 4 deletions

View File

@ -336,16 +336,16 @@ tolua_create_curse(lua_State * L)
attrib ** ap = NULL;
if (tolua_isusertype(L, 2, TOLUA_CAST "unit", 0, &tolua_err)) {
unit * target = (unit *)tolua_tousertype(L, 1, 0);
unit * target = (unit *)tolua_tousertype(L, 2, 0);
if (target) ap = &target->attribs;
} else if (tolua_isusertype(L, 2, TOLUA_CAST "region", 0, &tolua_err)) {
region * target = (region *)tolua_tousertype(L, 1, 0);
region * target = (region *)tolua_tousertype(L, 2, 0);
if (target) ap = &target->attribs;
} else if (tolua_isusertype(L, 2, TOLUA_CAST "ship", 0, &tolua_err)) {
ship * target = (ship *)tolua_tousertype(L, 1, 0);
ship * target = (ship *)tolua_tousertype(L, 2, 0);
if (target) ap = &target->attribs;
} else if (tolua_isusertype(L, 2, TOLUA_CAST "building", 0, &tolua_err)) {
building * target = (building *)tolua_tousertype(L, 1, 0);
building * target = (building *)tolua_tousertype(L, 2, 0);
if (target) ap = &target->attribs;
}
if (ap) {