• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Share experience with summon

Rikrdo

New Member
Joined
Mar 6, 2010
Messages
38
Reaction score
1
What part of the source I'd have to edit not to share experience with the summon?
 
Edit creature.cpp:
Code:
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;
}
 
Last edited:
Sorry for revive the topic, but... When i do what the @Cykotitan posted, stop to work the "registerCreatureEvent(cid, "event")"... Anyone know why this happens? -sorry the bad english-
 
@Cykotitan
Edit creature.cpp:
void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
uint32_t attackerId = 0;
if(attacker)
{
if(Creature* master = attacker->getMaster())
attacker = master;

attackerId = attacker->getID();
}

if(attacker->getPlayer())
{
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;
}


creature.cpp where I find?
i using tfs 0.4.0 crying damson
 
Back
Top