• 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!

[TFS 0.3.6] 8.6 Fields crash server

395003

New Member
Joined
Aug 15, 2010
Messages
8
Reaction score
0
Hello,
I have problem with fire field/energy field etc.
If i step on fire field/energy field etc. i have crash server.
Don't have any problem in console.
How i can repair this?
 
Last edited:
Solution
it's probably the second system
try to replace drainHealth with this
C++:
void Creature::drainHealth(Creature* attacker, CombatType_t combatType, int32_t damage)
{
    lastDamageSource = combatType;
    onAttacked();
   
    if(attacker && attacker->getPlayer())
    {
        if(attacker->getPlayer()->getExtraMagicDamage() > 1)
        {
            int16_t color = g_config.getNumber(ConfigManager::EXTRA_DAMAGE_COLOR);
            if(color < 0)
                color = random_range(0, 255);
           
            int realDamage = damage;
            damage = damage * attacker->getPlayer()->getExtraMagicDamage();
            std::stringstream ss;
            ss << "+" << damage - realDamage...
Have you tried different source?
Is it field created after killing monster?
Please remove the swearing word from your post :)
 
Last edited:
Have you tried different source?
Is it field created after killing monster?
Please remove the swearing word from your post :)

I try use another source and all will be fine.
Yes, if i create field in mapeditor or if dragon lord create field and die i have crash
I can step on if dragon lord alife but if he die i have crash if i step on.

Sorry my english is so bad.





do you have any gear with reflection on?
No i dont have any item

I have three systems on my source and one of them make crash

Feature - Vampiric weapons 0.2 <-- this
Feature - Increase player damage <-- and this
 
it's probably the second system
try to replace drainHealth with this
C++:
void Creature::drainHealth(Creature* attacker, CombatType_t combatType, int32_t damage)
{
    lastDamageSource = combatType;
    onAttacked();
   
    if(attacker && attacker->getPlayer())
    {
        if(attacker->getPlayer()->getExtraMagicDamage() > 1)
        {
            int16_t color = g_config.getNumber(ConfigManager::EXTRA_DAMAGE_COLOR);
            if(color < 0)
                color = random_range(0, 255);
           
            int realDamage = damage;
            damage = damage * attacker->getPlayer()->getExtraMagicDamage();
            std::stringstream ss;
            ss << "+" << damage - realDamage;
            g_game.addAnimatedText(attacker->getPosition(), (uint8_t)color, ss.str());
        }
    }
   
   
    changeHealth(-damage);
   
    if(attacker)
        attacker->onAttackedCreatureDrainHealth(this, damage);
}
 
Solution
it's probably the second system
try to replace drainHealth with this
C++:
void Creature::drainHealth(Creature* attacker, CombatType_t combatType, int32_t damage)
{
    lastDamageSource = combatType;
    onAttacked();
  
    if(attacker && attacker->getPlayer())
    {
        if(attacker->getPlayer()->getExtraMagicDamage() > 1)
        {
            int16_t color = g_config.getNumber(ConfigManager::EXTRA_DAMAGE_COLOR);
            if(color < 0)
                color = random_range(0, 255);
          
            int realDamage = damage;
            damage = damage * attacker->getPlayer()->getExtraMagicDamage();
            std::stringstream ss;
            ss << "+" << damage - realDamage;
            g_game.addAnimatedText(attacker->getPosition(), (uint8_t)color, ss.str());
        }
    }
  
  
    changeHealth(-damage);
  
    if(attacker)
        attacker->onAttackedCreatureDrainHealth(this, damage);
}

Thank works fine <3 u help me one more time i love u <3
 
Hello sorry Vulcan_ but i have same problem, but i have equip reflection items, i add the attribute in items.xml, then when i step on an fire field my server crash. how i can fix ? i use TFS 0.3.6 Cliente 8.6
 
Back
Top