Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
etorth committed Jun 12, 2022
1 parent 62773e4 commit e66f1ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/src/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,12 @@ class Player final: public BattleObject
// if multiple results returned
// we only check the first one, ignore all rest as lua does

if(const auto obj = (sol::object)(*(pfr.cbegin())); obj == sol::nil){
return false;
}
else if(obj.is<bool>()){
if(const auto obj = (sol::object)(*(pfr.cbegin())); obj.is<bool>()){
return obj.as<bool>();
}
else if(obj == sol::nil){
return false;
}
else{
throw fflerror("trigger returns invalid type(s): count = %d, [0]: %s", to_d(pfr.return_count()), to_cstr(sol::type_name(obj.lua_state(), obj.get_type())));
}
Expand Down

0 comments on commit e66f1ce

Please sign in to comment.