Salocin/TrinityCore — comment on commit 23ad608974ad6fd7e43e45a804f9b3e2493cf156
File: src/server/game/Entities/Unit/Unit.cpp line 1546
By MilleTest:

if (spellProto->AttributesCu & SPELL_ATTR0_CU_BINARY)
if (victim->GetTypeId() == TYPEID_PLAYER)
if(victim != this)
{
int32 tmp = int32(averageResist * 10000);
int32 rand = irand(0, 10000);
return rand < tmp ? 100 : 0;
}
return 0;

Possibile Fix problem for self cast