ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Hi! I've been struggling with walk on fields for OTX 3.8, applied this commit Fix monsters walking over fields. (#2207) · otland/forgottenserver@18fbfdc (https://github.com/otland/forgottenserver/commit/18fbfdc33a65c5cba9d5a02bcc8116dfd10362b0) with some minor changes here (monster.h):
and here (tile.cpp):
The trouble is that the monster delays too much to enter fields after being attacked, someone can help me fixing this?
Here is a video showing the issue.
Regards!
For now I've just changed the firefield ticks, just realized that the monster start attacking after being burned for the first time
But I still want to see if I can make the monster attack at the moment it got damaged. Or with a minium delay after that
Code:
uint64_t getLostExperience() const override {
return skillLoss ? mType->info.experience : 0;
}
uint16_t getLookCorpse() const override {
return mType->info.lookcorpse;
}
void dropLoot(Container* corpse, Creature* lastHitCreature) override;
uint32_t getDamageImmunities() const override {
return mType->info.damageImmunities;
}
uint32_t getConditionImmunities() const override {
return mType->info.conditionImmunities;
}
void getPathSearchParams(const Creature* creature, FindPathParams& fpp) const override;
bool useCacheMap() const override {
return !randomStepping;
}
and here (tile.cpp):
Code:
MagicField* field = getFieldItem();
if (!field || field->isBlocking() || field->getDamage() == 0) {
return RETURNVALUE_NOERROR;
}
CombatType_t combatType = field->getCombatType();
//There is 3 options for a monster to enter a magic field
//1) Monster is immune
if (!monster->isImmune(combatType)) {
//1) Monster is able to walk over field type
//2) Being attacked while random stepping will make it ignore field damages
if (hasBitSet(FLAG_IGNOREFIELDDAMAGE, flags)) {
if (!(monster->canWalkOnFieldType(combatType) || monster->isIgnoringFieldDamage())) {
return RETURNVALUE_NOTPOSSIBLE;
}
}
else {
return RETURNVALUE_NOTPOSSIBLE;
}
}
return RETURNVALUE_NOERROR;
}
The trouble is that the monster delays too much to enter fields after being attacked, someone can help me fixing this?
Here is a video showing the issue.
Regards!
Post automatically merged:
For now I've just changed the firefield ticks, just realized that the monster start attacking after being burned for the first time
Code:
<attribute key="ticks" value="5000" />
But I still want to see if I can make the monster attack at the moment it got damaged. Or with a minium delay after that
Last edited: