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

Area effect and damage effect in wrong order

TheGahl

Learning in Progress
Joined
Jul 28, 2018
Messages
200
Solutions
3
Reaction score
124
Hello

I have this weird issue with my OTC there the damage effect is below the area effect.

This is how it looks like:

P2wMMKn.png


And as you can see, the area effect hides the damage effect (blue = hit by fire, pink = area effect):
bhjzyU2.png


Have anyone else had this problem in their OTClient and managed to fix it?

Any ideas is very appreciated!
 
put to the effect of damage being after the area, simple
 
put to the effect of damage being after the area, simple
Yeah but where?.. I tried to look for it but TFS 1.0 isn't too easy to look for things in.
And since it doesn't happen in normal tibia client I just assumed it could be fixed in OTC as well
 
This is not otclient, this is serverside bug. It is funny it still hasnt be fixed in theforgottenserver. This is very known bug and it is not easy to fix.
This is because in combat.cpp "combatType" in
C++:
CombatDamage Combat::getCombatDamage(Creature* creature, Creature* target) const
comes first and then area spell effect in
C++:
void Combat::doCombat(Creature* creature, const Position& position) const
so if you had shortened the code it would have been looking like that:
CombatDamage Combat::getCombatDamage(Creature* creature, Creature* target) const
{
//delete everything and put in the script below:
}

void Combat::doCombat(Creature* creature, const Position& position) const
{
Creature* target = nullptr;

CombatDamage damage;
damage.origin = params.origin;
damage.primary.type = params.combatType;

if (formulaType == COMBAT_FORMULA_DAMAGE) {
damage.primary.value = 1;
}
else if (creature)
{
if (Player* player = creature->getPlayer())
{
params.valueCallback->getMinMaxValues(player, damage);
}
}

doAreaCombat(creature, position, area.get(), damage,);
}
So what is happening here "damage.primary.type = params.combatType" which is responsible for example for electric shock effect of exori vis comes first and that's why it is below of the teleport effect of exori vis, because teleport effects runs in "
doAreaCombat(creature, position, area.get(), damage,);" which comes after that
 
Back
Top