Fix icon not disappearing for debuffs

This commit is contained in:
gsemaj 2023-07-25 19:11:28 +00:00
parent 618126f963
commit 2bc2235179
2 changed files with 3 additions and 2 deletions

View File

@ -69,7 +69,7 @@ static SkillResult handleSkillDamageNDebuff(SkillData* skill, int power, ICombat
if(status == ETBU_DEL) Buffs::timeBuffTimeout(self); if(status == ETBU_DEL) Buffs::timeBuffTimeout(self);
}, },
[](EntityRef self, Buff* buff, time_t currTime) { [](EntityRef self, Buff* buff, time_t currTime) {
//Buffs::timeBuffTick(self, buff); Buffs::timeBuffTick(self, buff);
}, },
&debuff); &debuff);
} }

View File

@ -155,7 +155,8 @@ void Buffs::timeBuffTimeout(EntityRef self) {
Entity* entity = self.getEntity(); Entity* entity = self.getEntity();
ICombatant* combatant = dynamic_cast<ICombatant*>(entity); ICombatant* combatant = dynamic_cast<ICombatant*>(entity);
INITSTRUCT(sP_FE2CL_CHAR_TIME_BUFF_TIME_OUT, pkt); // send a buff timeout to other players INITSTRUCT(sP_FE2CL_CHAR_TIME_BUFF_TIME_OUT, pkt); // send a buff timeout to other players
pkt.eCT = combatant->getCharType(); int32_t eCharType = combatant->getCharType();
pkt.eCT = eCharType == 4 ? 2 : eCharType; // convention not followed by client here
pkt.iID = combatant->getID(); pkt.iID = combatant->getID();
pkt.iConditionBitFlag = combatant->getCompositeCondition(); pkt.iConditionBitFlag = combatant->getCompositeCondition();
NPCManager::sendToViewable(entity, &pkt, P_FE2CL_CHAR_TIME_BUFF_TIME_OUT, sizeof(sP_FE2CL_CHAR_TIME_BUFF_TIME_OUT)); NPCManager::sendToViewable(entity, &pkt, P_FE2CL_CHAR_TIME_BUFF_TIME_OUT, sizeof(sP_FE2CL_CHAR_TIME_BUFF_TIME_OUT));