SixNine
Active Member
- Joined
- Dec 12, 2018
- Messages
- 452
- Reaction score
- 41
Hello,
so this protocol have weird bug you dont need to mark (PK) icon to get skull on player you just can cast a spell accidentally and you will get a skull.
so this protocol have weird bug you dont need to mark (PK) icon to get skull on player you just can cast a spell accidentally and you will get a skull.
C++:
void Player::onAttackedCreature(Creature* target)
{
Creature::onAttackedCreature(target);
if (target && target->getZone() == ZONE_PVP) {
return;
}
if (target == this) {
addInFightTicks();
return;
}
if (hasFlag(PlayerFlag_NotGainInFight)) {
return;
}
Player* targetPlayer = target->getPlayer();
if (targetPlayer && !isPartner(targetPlayer) && !isGuildMate(targetPlayer)) {
if (!pzLocked && g_game.getWorldType() == WORLD_TYPE_PVP_ENFORCED) {
pzLocked = true;
sendIcons();
}
if (getSkull() == SKULL_NONE && getSkullClient(targetPlayer) == SKULL_YELLOW) {
addAttacked(targetPlayer);
targetPlayer->sendCreatureSkull(this);
} else if (!targetPlayer->hasAttacked(this) || targetPlayer->hasAttacked(this)) {
if (!pzLocked) {
pzLocked = true;
sendIcons();
}
if (!Combat::isInPvpZone(this, targetPlayer) && !isInWar(targetPlayer)) {
addAttacked(targetPlayer);
if (targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE) {
setSkull(SKULL_WHITE);
}
if (getSkull() == SKULL_NONE) {
targetPlayer->sendCreatureSkull(this);
}
}
}
}
addInFightTicks();
}