void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
uint32_t attackerId = 0;
if(attacker)
attackerId = attacker->getID();
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);
if(damagePoints > 0)
lastHitCreature = attackerId;
}
void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
uint32_t attackerId = 0;
if(attacker)
attackerId = attacker->getID();
if(attacker->getMonster())
return;
CountMap::iterator...
void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
uint32_t attackerId = 0;
if(attacker)
attackerId = attacker->getID();
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);
if(damagePoints > 0)
lastHitCreature = attackerId;
}
void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
uint32_t attackerId = 0;
if(attacker)
attackerId = attacker->getID();
if(attacker->getMonster())
return;
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);
if(damagePoints > 0)
lastHitCreature = attackerId;
}
This is a bugfix for monsters gaining xp if they hit eachother with something (such as an AoE). So yes in a way if the monster hits another the player will still get all of the experience.Is it mean monsters will help the player and player will get all experience?