@@ -90,15 +90,15 @@ curses determineCurse(df::unit * unit)
9090 cursetype = curses::Ghost;
9191
9292 // zombies: undead or hate life (according to ag), not bloodsuckers
93- if ( (unit->curse . add_tags1 . bits .OPPOSED_TO_LIFE || unit->curse . add_tags1 .bits .NOT_LIVING )
94- && !unit->curse . add_tags1 . bits .BLOODSUCKER )
93+ if ( (unit->uwss_add_caste_flag . bits .OPPOSED_TO_LIFE || unit->uwss_add_caste_flag .bits .NOT_LIVING )
94+ && !unit->uwss_add_caste_flag . bits .BLOODSUCKER )
9595 cursetype = curses::Zombie;
9696
9797 // necromancers: alive, don't eat, don't drink, don't age
98- if (!unit->curse . add_tags1 .bits .NOT_LIVING
99- && unit->curse . add_tags1 .bits .NO_EAT
100- && unit->curse . add_tags1 .bits .NO_DRINK
101- && unit->curse . add_tags2 .bits .NO_AGING
98+ if (!unit->uwss_add_caste_flag .bits .NOT_LIVING
99+ && unit->uwss_add_caste_flag .bits .NO_EAT
100+ && unit->uwss_add_caste_flag .bits .NO_DRINK
101+ && unit->uwss_add_property .bits .NO_AGING
102102 )
103103 cursetype = curses::Necromancer;
104104
@@ -108,21 +108,21 @@ curses determineCurse(df::unit * unit)
108108 auto syndrome = df::syndrome::find (active_syndrome->type );
109109 if (syndrome) {
110110 for (auto classname : syndrome->syn_class )
111- if (classname && *classname == " WERECURSE" ) {
112- cursetype = curses::Werebeast;
113- break ;
114- }
111+ if (classname && *classname == " WERECURSE" ) {
112+ cursetype = curses::Werebeast;
113+ break ;
114+ }
115115 }
116116 }
117117
118118 // vampires: bloodsucker (obvious enough)
119- if (unit->curse . add_tags1 .bits .BLOODSUCKER )
119+ if (unit->uwss_add_caste_flag .bits .BLOODSUCKER )
120120 cursetype = curses::Vampire;
121121
122122 return cursetype;
123123}
124124
125- command_result cursecheck (color_ostream & out, vector <string> & parameters)
125+ command_result cursecheck (color_ostream& out, vector <string>& parameters)
126126{
127127 df::unit* selected_unit = Gui::getSelectedUnit (out, true );
128128
@@ -133,19 +133,19 @@ command_result cursecheck (color_ostream &out, vector <string> & parameters)
133133 bool verbose = false ;
134134 size_t cursecount = 0 ;
135135
136- for (auto parameter : parameters)
136+ for (auto parameter : parameters)
137137 {
138- if (parameter == " help" || parameter == " ?" )
138+ if (parameter == " help" || parameter == " ?" )
139139 return CR_WRONG_USAGE;
140- if (parameter == " detail" )
140+ if (parameter == " detail" )
141141 giveDetails = true ;
142- if (parameter == " ids" )
142+ if (parameter == " ids" )
143143 giveUnitID = true ;
144- if (parameter == " nick" )
144+ if (parameter == " nick" )
145145 giveNick = true ;
146- if (parameter == " all" )
146+ if (parameter == " all" )
147147 ignoreDead = false ;
148- if (parameter == " verbose" )
148+ if (parameter == " verbose" )
149149 {
150150 // verbose makes no sense without enabling details
151151 giveDetails = true ;
@@ -157,11 +157,11 @@ command_result cursecheck (color_ostream &out, vector <string> & parameters)
157157 vector<df::unit*> to_check;
158158 if (selected_unit)
159159 to_check.push_back (selected_unit);
160- for (df::unit * unit : to_check.size () ? to_check : world->units .all )
160+ for (df::unit* unit : to_check.size () ? to_check : world->units .all )
161161 {
162162 // filter out all "living" units that are currently removed from play
163163 // don't spam all completely dead creatures if not explicitly wanted
164- if ((!Units::isActive (unit) && !Units::isKilled (unit)) || (Units::isKilled (unit) && ignoreDead))
164+ if ((!Units::isActive (unit) && !Units::isKilled (unit)) || (Units::isKilled (unit) && ignoreDead))
165165 {
166166 continue ;
167167 }
@@ -170,9 +170,9 @@ command_result cursecheck (color_ostream &out, vector <string> & parameters)
170170
171171 if (cursetype != curses::None)
172172 {
173- cursecount++;
173+ cursecount++;
174174
175- if (giveNick)
175+ if (giveNick)
176176 {
177177 Units::setNickname (unit, curse_names[cursetype]); // "CURSED");
178178 }
@@ -196,8 +196,8 @@ command_result cursecheck (color_ostream &out, vector <string> & parameters)
196196 if (verbose)
197197 {
198198 out << " Curse flags: "
199- << bitfield_to_string (unit->curse . add_tags1 ) << std::endl
200- << bitfield_to_string (unit->curse . add_tags2 ) << std::endl;
199+ << bitfield_to_string (unit->uwss_add_caste_flag ) << std::endl
200+ << bitfield_to_string (unit->uwss_add_property ) << std::endl;
201201 }
202202 }
203203
0 commit comments