Talk:Blood Control

No XP is granted to the party if a charmed enemy dies, nor is any XP granted if the charmed enemy kills anybody or anything. For coders: It is not possible to check if a particular enemy has the ABILITY_SPELL_BLOOD_CONTROL / EFFECT_TYPE_CHARM effect on them to grant XP to the spellcaster on charmed enemy's death, because when the EVENT_TYPE_DYING occurs, all effects are removed from a creature. However, you can get around this by checking for two conditions:

!IsObjectHostile(OBJECT_SELF, oKiller) && !IsPartyMember(oKiller)

Meaning, award XP to the party, if an enemy of the party is killed by another enemy of the party and if the killer is not member of the party. This can also happen if an enemy mage casts a damaging AOE spell like fireball and kills their allies in the process. I think in such a case your party deserves to get XP as you are actually the real cause behind the enemy's death (ethically speaking, lol).

XP is set through the script creature_core.nss. Personally, I set the XP granting rules as follows:

a) IsObjectValid(oKiller) && IsPartyMember(oKiller) && IsObjectHostile(OBJECT_SELF, oKiller) ->party enemy killed by party member (no XP for friendly casualties).

b) !IsObjectHostile(OBJECT_SELF, oKiller) && !IsPartyMember(oKiller) ->party enemy is killed by another party enemy. WRFan (talk) 23:23, June 29, 2010 (UTC)