Eldora
Banned User
- Joined
- Oct 19, 2009
- Messages
- 604
- Reaction score
- 26
Need help to replace the white skull system with a message saying "PK!" above the players head instead.
I have already disabled the white skull, just need to add the "PK!" text message instead
player.cpp
I have already disabled the white skull, just need to add the "PK!" text message instead
player.cpp
C++:
void Player::onAttackedCreature(Creature* target)
{
Creature::onAttackedCreature(target);
if(!hasFlag(PlayerFlag_NotGainInFight)){
bool doPzLock = false;
if(target != this){
if(Player* targetPlayer = target->getPlayer()){
doPzLock = checkPzBlock(targetPlayer);
#ifdef __SKULLSYSTEM__
if( !isPartner(targetPlayer) &&
!Combat::isInPvpZone(this, targetPlayer) &&
!targetPlayer->hasAttacked(this)){
addAttacked(targetPlayer);
if(targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE){
//add a white skull
//setSkull(SKULL_WHITE);
//g_game.updateCreatureSkull(this);
}
if(getSkull() == SKULL_NONE){
//yellow skull
targetPlayer->sendCreatureSkull(this);
}
}
#endif
}
}
addInFightTicks(g_config.getNumber(ConfigManager::IN_FIGHT_DURATION), doPzLock);
}
}