Code: Select all
else if( targ->GetOwnerObj() == mChar )
return false;Code: Select all
else if( targ->IsInnocent() )Code: Select all
else if( targ->GetOwnerObj() == mChar )
return false;Code: Select all
else if( targ->IsInnocent() )mChar is usually the attacking char, which in your case is one of the summoned creatures, not the char commanding the attack. As the creatures don't own each other the check will fail.After entering some debugging messages in said function, I noticed that the WillResultInCriminal check is run several times during the battle between the summoned creatures, and it seems to sometimes fail the GetOwnerObj check and instead return true underjust below the GetOwnerObj check in the code.Code: Select all
else if( targ->IsInnocent() )
Code: Select all
CChar *tOwner = targ->GetOwnerObj();
if( ValidateObject( tOwner ) )
{
if( tOwner == mChar || tOwner == mChar->GetOwnerObj() )
return false;
}