Merge branch 'develop' of github.com:ennorehling/eressea into develop

This commit is contained in:
Enno Rehling 2019-09-24 20:44:37 +02:00
commit 237ec44ea0
3 changed files with 12 additions and 11 deletions

View File

@ -1153,7 +1153,8 @@ static void destroy_items(troop dt) {
} }
static void calculate_defense_type(troop at, troop dt, int type, bool missile, static void calculate_defense_type(troop at, troop dt, int type, bool missile,
const weapon_type **dwtype, int *defskill) { const weapon_type **dwtype, int *defskill)
{
const weapon *weapon; const weapon *weapon;
weapon = select_weapon(dt, false, true); /* missile=true to get the unmodified best weapon she has */ weapon = select_weapon(dt, false, true); /* missile=true to get the unmodified best weapon she has */
*defskill = weapon_effskill(dt, at, weapon, false, false); *defskill = weapon_effskill(dt, at, weapon, false, false);
@ -1265,14 +1266,11 @@ terminate(troop dt, troop at, int type, const char *damage_formula, bool missile
unit *au = af->unit; unit *au = af->unit;
unit *du = df->unit; unit *du = df->unit;
battle *b = df->side->battle; battle *b = df->side->battle;
int armor_value; int armor_value;
const weapon_type *dwtype = NULL; const weapon_type *dwtype = NULL;
const weapon_type *awtype = NULL; const weapon_type *awtype = NULL;
const armor_type *armor = NULL; const armor_type *armor = NULL;
const armor_type *shield = NULL; const armor_type *shield = NULL;
int reduced_damage, attskill = 0, defskill = 0; int reduced_damage, attskill = 0, defskill = 0;
bool magic = false; bool magic = false;

View File

@ -260,7 +260,7 @@ static int tolua_faction_debug_messages(lua_State * L)
int i = 1; int i = 1;
if (f->msgs) { if (f->msgs) {
mlist *ml; mlist *ml;
for (ml = self->msgs->begin; ml; ml = ml->next, ++i) { for (ml = f->msgs->begin; ml; ml = ml->next, ++i) {
char buf[120]; char buf[120];
nr_render(ml->msg, default_locale, buf, sizeof(buf), NULL); nr_render(ml->msg, default_locale, buf, sizeof(buf), NULL);
puts(buf); puts(buf);

View File

@ -1,8 +1,11 @@
#pragma once
struct lua_State;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct lua_State;
int tolua_factionlist_next(struct lua_State *L); int tolua_factionlist_next(struct lua_State *L);
void tolua_faction_open(struct lua_State *L); void tolua_faction_open(struct lua_State *L);