Skip to content

Commit be9ee6a

Browse files
authored
fix: white pk skull (#3372)
Fix white skull correctly removes only if it isn't in fight mode.
1 parent 6a1716b commit be9ee6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/creatures/players/player.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3948,7 +3948,7 @@ void Player::addInFightTicks(bool pzlock /*= false*/) {
39483948
updateImbuementTrackerStats();
39493949

39503950
safeCall([this] {
3951-
addCondition(Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(PZ_LOCKED), 0));
3951+
addCondition(Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_configManager().getNumber(PZ_LOCKED)));
39523952
});
39533953
}
39543954

@@ -5650,7 +5650,8 @@ void Player::onAddCombatCondition(ConditionType_t type) {
56505650
void Player::onEndCondition(ConditionType_t type) {
56515651
Creature::onEndCondition(type);
56525652

5653-
if (type == CONDITION_INFIGHT) {
5653+
const auto &conditionFight = getCondition(CONDITION_INFIGHT);
5654+
if (type == CONDITION_INFIGHT && !conditionFight) {
56545655
onIdleStatus();
56555656
pzLocked = false;
56565657
clearAttacked();

0 commit comments

Comments
 (0)