void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
uint32_t attackerId = 0;
[B][COLOR="red"] if(attacker)
{
if(Creature* master = attacker->getMaster())
attacker = master;[/COLOR][/B]
attackerId = attacker->getID();
[B][COLOR="red"] }[/COLOR][/B]
[COLOR="red"][B] if(attacker->getPlayer())[/B][/COLOR]
{
CountMap::iterator it = damageMap.find(attackerId);
if(it != damageMap.end())
{
it->second.ticks = OTSYS_TIME();
if(damagePoints > 0)
it->second.total += damagePoints;
}
else
damageMap[attackerId] = CountBlock_t(damagePoints);
[B][COLOR="red"] }[/COLOR][/B]
if(damagePoints > 0)
lastHitCreature = attackerId;
}