{
object_type *o_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
- BIT_FLAGS result;
- result = 0L;
+ BIT_FLAGS result = 0L;
for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++) {
o_ptr = &creature_ptr->inventory_list[i];
object_flags(creature_ptr, o_ptr, flgs);
if (have_flag(flgs, TR_XTRA_MIGHT))
- result |= (i - INVEN_RARM);
+ result |= 0x01 << (i - INVEN_RARM);
}
return result;
}
-void have_esp_evil(player_type *creature_ptr)
+BIT_FLAGS have_esp_evil(player_type *creature_ptr)
{
object_type *o_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
-
- creature_ptr->esp_evil = FALSE;
+ BIT_FLAGS result = 0L;
if (creature_ptr->realm1 == REALM_HEX) {
if (hex_spelling(creature_ptr, HEX_DETECT_EVIL))
- creature_ptr->esp_evil = TRUE;
+ result |= 0x01 << FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++) {
object_flags(creature_ptr, o_ptr, flgs);
if (have_flag(flgs, TR_ESP_EVIL))
- creature_ptr->esp_evil = TRUE;
+ result |= 0x01 << (i - INVEN_RARM);
}
+
+ return result;
}
void have_esp_animal(player_type *creature_ptr)
bool have_pass_wall(player_type *creature_ptr);
bool have_kill_wall(player_type *creature_ptr);
BIT_FLAGS have_xtra_might(player_type *creature_ptr);
-void have_esp_evil(player_type *creature_ptr);
+BIT_FLAGS have_esp_evil(player_type *creature_ptr);
void have_esp_animal(player_type *creature_ptr);
void have_esp_undead(player_type *creature_ptr);
void have_esp_demon(player_type *creature_ptr);
bool old_esp_giant = creature_ptr->esp_giant;
bool old_esp_dragon = creature_ptr->esp_dragon;
bool old_esp_human = creature_ptr->esp_human;
- bool old_esp_evil = creature_ptr->esp_evil;
+ BIT_FLAGS old_esp_evil = creature_ptr->esp_evil;
bool old_esp_good = creature_ptr->esp_good;
bool old_esp_nonliving = creature_ptr->esp_nonliving;
bool old_esp_unique = creature_ptr->esp_unique;
creature_ptr->pass_wall = have_pass_wall(creature_ptr);
creature_ptr->kill_wall = have_kill_wall(creature_ptr);
creature_ptr->xtra_might = have_xtra_might(creature_ptr);
- have_esp_evil(creature_ptr);
+ creature_ptr->esp_evil = have_esp_evil(creature_ptr);
have_esp_animal(creature_ptr);
have_esp_undead(creature_ptr);
have_esp_demon(creature_ptr);