• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Feature Remove Experience From Summons TFS 0.4 and Any Otx 2x

MartK

Active Member
Joined
Dec 6, 2018
Messages
63
Solutions
1
Reaction score
29
First you need edit the sourcecode

1.- Go to your source files and open criature.cpp search this fuction:
Code:
void Creature::addDamagePoints(Creature* attacker, int32_t damagePoints)
{
    if(damagePoints < 0)
        return;

    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;
}

And repleace this fuction with this code:
Code:
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;
    }

And Enjoy ;), pls +Rep
 
Back
Top