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

[Nostalrius/Sabrehaven] No exp from DoT spells; not setting player as attacker

Dawg

Member
Joined
Mar 23, 2014
Messages
181
Reaction score
22
TL;DR: does anyone know in the sources I should be checking to make sure that when a player gives another creature a condition, the casting player is set as the "attacker"?

I will explain:

A player casts "exevo gran mas pox" (poison storm). When the affected monsters die, the player gets no experience points. I believe that for some reason in the sources, the player casting the spell is not being set as the condition "owner" or "attacker."

If another player is attacked by poison storm, the target player takes damage, but the info message says "You lose 15 hitpoints." Instead of "You lose 15 hitpoints due to an attack by player". This further confirms my idea that for some reason in this distro, when players cast DoT spells, the condition owner (or maybe the 'attacker' as its called in combat.cpp) is not being assigned correctly.

It's like its the same as stepping on a "neutral" magic field.

It's worth noting that for monsters, everything is working. If you have a monster that casts a DoT spell (like an undead dragon has "drown wave", for example), players receive a message saying "You lose 20 hitpoints due to an attack by an undead dragon." Also, if the undead dragon's wave happens to hit another wild monster, if that wild monster dies, the undead dragon will "earn" the exp.

I only mention poison storm, but the same thing also happens with soulfire runes and envenom runes. I already tried adding this to poison storm.lua
Lua:
condition:setParameter(CONDITION_PARAM_OWNER, player)
within the function onTargetCreature, but it made no difference.

I have not made any other changes to the lua files for soulfire.lua, envenom.lua. I also have not made any changes to condition.cpp. I have made some changes to combat.cpp, but it is related to burst arrow fixes, nothing to do with base combat functions.

Has anyone fixed this, or does anyone know in the sources I should be checking to make sure that when a player gives another creature a condition, the casting player is set as the "attacker"?

Thanks!
 
Back
Top