The logic here is a bit off, you will cause spells with DIMINISHING_LIMITONLY to also keep diminishing for these creatures (when these spells only have different duration in pvp like warlock curses or faerie fire). The check for unit and flags_extra should look like this

```
if ((type == DRTYPE_PLAYER && (unit->GetCharmerOrOwnerPlayerOrPlayerItself() || (unit->GetTypeId() == TYPEID_UNIT && unit->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH))) || type == DRTYPE_ALL)
```