- Helden abspalten geht ab sofort
- givemen und giveunit in give_men und give_unit umgenannt, weil auch give_item z.b.
This commit is contained in:
Enno Rehling 2004-09-11 17:50:27 +00:00
parent f68f9af5c5
commit 8dfe5ae9a1
4 changed files with 12 additions and 9 deletions

View File

@ -554,7 +554,7 @@ give_cmd(unit * u, order * ord)
cmistake(u, ord, 40, MSG_COMMERCE); cmistake(u, ord, 40, MSG_COMMERCE);
return; return;
} }
giveunit(u, u2, ord); give_unit(u, u2, ord);
return; return;
} }
if (findparam(s, u->faction->locale) == P_ANY) { /* Alle Gegenstände übergeben */ if (findparam(s, u->faction->locale) == P_ANY) { /* Alle Gegenstände übergeben */
@ -600,7 +600,7 @@ give_cmd(unit * u, order * ord)
return; return;
} }
n = u->number; n = u->number;
givemen(n, u, u2, ord); give_men(n, u, u2, ord);
return; return;
} }
@ -649,7 +649,7 @@ give_cmd(unit * u, order * ord)
msg_feedback(u, ord, "race_noregroup", "race", u->race)); msg_feedback(u, ord, "race_noregroup", "race", u->race));
return; return;
} }
givemen(n, u, u2, ord); give_men(n, u, u2, ord);
return; return;
} }

View File

@ -142,7 +142,7 @@ give_item(int want, const item_type * itype, unit * src, unit * dest, struct ord
} }
void void
givemen(int n, unit * u, unit * u2, struct order * ord) give_men(int n, unit * u, unit * u2, struct order * ord)
{ {
ship *sh; ship *sh;
int k = 0; int k = 0;
@ -160,7 +160,7 @@ givemen(int n, unit * u, unit * u2, struct order * ord)
error = 307; error = 307;
#endif #endif
#ifdef HEROES #ifdef HEROES
} else if (u2 && (fval(u, UFL_HERO)!=fval(u2, UFL_HERO))) { } else if (u2 && u2->number>0 && fval(u, UFL_HERO)!=fval(u2, UFL_HERO)) {
error = 75; error = 75;
#endif #endif
} else if ((u && unit_has_cursed_item(u)) || (u2 && unit_has_cursed_item(u2))) { } else if ((u && unit_has_cursed_item(u)) || (u2 && unit_has_cursed_item(u2))) {
@ -232,6 +232,8 @@ givemen(int n, unit * u, unit * u2, struct order * ord)
set_racename(&u2->attribs, get_racename(u->attribs)); set_racename(&u2->attribs, get_racename(u->attribs));
u2->race = u->race; u2->race = u->race;
u2->irace = u->irace; u2->irace = u->irace;
if (fval(u, UFL_HERO)) fset(u2, UFL_HERO);
else freset(u2, UFL_HERO);
} }
if (u2) { if (u2) {
@ -273,7 +275,7 @@ givemen(int n, unit * u, unit * u2, struct order * ord)
} }
void void
giveunit(unit * u, unit * u2, order * ord) give_unit(unit * u, unit * u2, order * ord)
{ {
region * r = u->region; region * r = u->region;
int n = u->number; int n = u->number;
@ -314,7 +316,7 @@ giveunit(unit * u, unit * u2, order * ord)
} }
} }
} }
givemen(u->number, u, NULL, ord); give_men(u->number, u, NULL, ord);
cmistake(u, ord, 153, MSG_COMMERCE); cmistake(u, ord, 153, MSG_COMMERCE);
} else { } else {
cmistake(u, ord, 63, MSG_COMMERCE); cmistake(u, ord, 63, MSG_COMMERCE);

View File

@ -17,8 +17,8 @@ extern "C" {
#endif #endif
extern int give_item(int want, const struct item_type * itype, struct unit * src, struct unit * dest, struct order * ord); extern int give_item(int want, const struct item_type * itype, struct unit * src, struct unit * dest, struct order * ord);
extern void givemen(int n, struct unit * u, struct unit * u2, struct order * ord); extern void give_men(int n, struct unit * u, struct unit * u2, struct order * ord);
extern void giveunit(struct unit * u, struct unit * u2, struct order * ord); extern void give_unit(struct unit * u, struct unit * u2, struct order * ord);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -100,6 +100,7 @@ Global
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release.ActiveCfg = Release|Win32 {EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release.ActiveCfg = Release|Win32
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release.Build.0 = Release|Win32 {EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release.Build.0 = Release|Win32
{17F83AAB-352D-4F68-ADA6-09F36D86826F}.Debug.ActiveCfg = Debug|Win32 {17F83AAB-352D-4F68-ADA6-09F36D86826F}.Debug.ActiveCfg = Debug|Win32
{17F83AAB-352D-4F68-ADA6-09F36D86826F}.Debug.Build.0 = Debug|Win32
{17F83AAB-352D-4F68-ADA6-09F36D86826F}.Release.ActiveCfg = Release|Win32 {17F83AAB-352D-4F68-ADA6-09F36D86826F}.Release.ActiveCfg = Release|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug.ActiveCfg = Debug|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Debug.ActiveCfg = Debug|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug.Build.0 = Debug|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Debug.Build.0 = Debug|Win32