Skip to content

Commit

Permalink
Send noble positions and professions along with Units.
Browse files Browse the repository at this point in the history
  • Loading branch information
RosaryMala committed Feb 3, 2017
1 parent d97b049 commit c8e6845
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/remotefortressreader/remotefortressreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
#include "df/world_region_details.h"
#include "df/world_site.h"
#include "df/world_site_realization.h"
#include "df/entity_position.h"

#if DF_VERSION > 40001
#include "df/plant_growth.h"
Expand Down Expand Up @@ -1800,6 +1801,19 @@ static command_result GetUnitList(color_ostream &stream, const EmptyMessage *in,
for (int j = 0; j < unit->appearance.colors.size(); j++)
appearance->add_colors(unit->appearance.colors[j]);
appearance->set_size_modifier(unit->appearance.size_modifier);

send_unit->set_profession_id(unit->profession);

std::vector<Units::NoblePosition> pvec;

if (Units::getNoblePositions(&pvec, unit))
{
for (int j = 0; j < pvec.size(); j++)
{
auto noble_positon = pvec[j];
send_unit->add_noble_positions(noble_positon.position->code);
}
}
}
return CR_OK;
}
Expand Down

0 comments on commit c8e6845

Please sign in to comment.