deivisonamorim 1 Postado Novembro 7, 2015 Share Postado Novembro 7, 2015 To com uma poblema q e o Seguinte o player nao ta pegando yellow quando ataka um PK e nao ta aparecendo pvp para o server todo guando mata um PK so aparece guando O player q pegou pk mata podem me ajuda ..? aki esta o codigo #ifdef __SKULLSYSTEM__ Skulls_t Player::getSkull() const { if(getAccessLevel() >= ACCESS_PROTECT) return SKULL_NONE; return skull; } Skulls_t Player::getSkullClient(const Player* player) const { if(!player){ return SKULL_NONE; } Skulls_t skull; skull = player->getSkull(); #ifdef __PARTYSYSTEM__ if(skull != SKULL_RED && player->party != NULL && player->party == this->party) return SKULL_GREEN; #endif if(skull == SKULL_NONE){ if(player->hasAttacked(this)){ skull = SKULL_YELLOW; } } return skull; } bool Player::hasAttacked(const Player* attacked) const { if(accessLevel >= ACCESS_PROTECT) return false; if(!attacked) return false; AttackedSet::const_iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it != attackedSet.end()){ return true; } else{ return false; } } void Player::addAttacked(const Player* attacked) { if(accessLevel >= ACCESS_PROTECT) return; if(!attacked || attacked == this) return; AttackedSet::iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it == attackedSet.end()){ attackedSet.insert(attacked_id); } } void Player::clearAttacked() { attackedSet.clear(); } void Player::addUnjustifiedDead(const Player* attacked) { if(getAccessLevel() >= ACCESS_PROTECT || attacked == this) return; std::stringstream msg; msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ")."; g_game.addAnimatedText(this->getPosition(), 129, "Drink!"); for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){ if(dynamic_cast<Player*>(it->second)) (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str()); } Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/ Compartilhar em outros sites More sharing options...
0 deivisonamorim 1 Postado Novembro 16, 2015 Autor Share Postado Novembro 16, 2015 @up Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675764 Compartilhar em outros sites More sharing options...
0 TaaG 63 Postado Novembro 16, 2015 Share Postado Novembro 16, 2015 Tente agora: #ifdef __SKULLSYSTEM__ Skulls_t Player::getSkull() const { if(getAccessLevel() >= ACCESS_PROTECT) return SKULL_NONE; return skull; } Skulls_t Player::getSkullClient(const Player* player) const { if(!player){ return SKULL_NONE; } Skulls_t skull; skull = player->getSkull(); #ifdef __PARTYSYSTEM__ if(skull != SKULL_RED && player->party != NULL && player->party == this->party) return SKULL_GREEN; #endif if(skull == SKULL_NONE){ if(player->hasAttacked(this)){ skull = SKULL_YELLOW; } } return skull; } bool Player::hasAttacked(const Player* attacked) const { if(accessLevel >= ACCESS_PROTECT) return true; if(!attacked) return true; AttackedSet::const_iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it != attackedSet.end()){ return true; } else{ return false; } } void Player::addAttacked(const Player* attacked) { if(accessLevel >= ACCESS_PROTECT) return; if(!attacked || attacked == this) return; AttackedSet::iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it == attackedSet.end()){ attackedSet.insert(attacked_id); } } void Player::clearAttacked() { attackedSet.clear(); } void Player::addUnjustifiedDead(const Player* attacked) { if(getAccessLevel() >= ACCESS_PROTECT || attacked == this) return; std::stringstream msg; msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ")."; g_game.addAnimatedText(this->getPosition(), 129, "Drink!"); for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){ if(dynamic_cast<Player*>(it->second)) (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str()); } Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675766 Compartilhar em outros sites More sharing options...
0 deivisonamorim 1 Postado Novembro 16, 2015 Autor Share Postado Novembro 16, 2015 nao deu continuo msm jeito Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675772 Compartilhar em outros sites More sharing options...
0 ShinySprite 14 Postado Novembro 16, 2015 Share Postado Novembro 16, 2015 #ifdef __SKULLSYSTEM__ Skulls_t Player::getSkull() const { if(getAccessLevel() >= ACCESS_PROTECT) return SKULL_NONE; return skull; } Skulls_t Player::getSkullClient(const Player* player) const { if(!player){ return SKULL_NONE; } Skulls_t skull; skull = player->getSkull(); #ifdef __PARTYSYSTEM__ if(skull != SKULL_RED && player->party != NULL && player->party == this->party) return SKULL_GREEN; #endif if(skull == SKULL_NONE){ if(player->hasAttacked(this)){ skull = SKULL_YELLOW; } } return skull; } bool Player::hasAttacked(const Player* attacked) const { if(accessLevel >= ACCESS_PROTECT) return true; if(!attacked) return true; AttackedSet::const_iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it != attackedSet.end()){ return true; } else{ return false; } } void Player::addAttacked(const Player* attacked) { if(accessLevel >= ACCESS_PROTECT) return; if(!attacked || attacked == this) return; AttackedSet::iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it == attackedSet.end()){ attackedSet.insert(attacked_id); } } void Player::clearAttacked() { attackedSet.clear(); } void Player::addUnjustifiedDead(const Player* attacked) { if(getAccessLevel() >= ACCESS_PROTECT || attacked == this) return; doBroadcastMessage("PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ") } Tenta isso Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675775 Compartilhar em outros sites More sharing options...
0 deivisonamorim 1 Postado Novembro 16, 2015 Autor Share Postado Novembro 16, 2015 Tbm Nao Deu Deu Erro E nei Compilo Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675777 Compartilhar em outros sites More sharing options...
0 TaaG 63 Postado Novembro 16, 2015 Share Postado Novembro 16, 2015 Tente agora: #ifdef __SKULLSYSTEM__ Skulls_t Player::getSkull() const { if(getAccessLevel() >= ACCESS_PROTECT) return SKULL_NONE; return skull; } Skulls_t Player::getSkullClient(const Player* player) const { if(!player){ return SKULL_NONE; } Skulls_t skull; skull = player->getSkull(); #ifdef __PARTYSYSTEM__ if(skull != SKULL_RED && player->party != NULL && player->party == this->party) return SKULL_GREEN; #endif if(skull == SKULL_NONE){ if(player->hasAttacked(this)){ skull = SKULL_YELLOW; } } return skull; } bool Player::hasAttacked(const Player* attacked) const { if(accessLevel >= ACCESS_PROTECT) return SKULL_YELLOW; if(!attacked) return SKULL_YELLOW; AttackedSet::const_iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it != attackedSet.end()){ return true; } else{ return false; } } void Player::addAttacked(const Player* attacked) { if(accessLevel >= ACCESS_PROTECT) return; if(!attacked || attacked == this) return; AttackedSet::iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it == attackedSet.end()){ attackedSet.insert(attacked_id); } } void Player::clearAttacked() { attackedSet.clear(); } void Player::addUnjustifiedDead(const Player* attacked) { if(getAccessLevel() >= ACCESS_PROTECT || attacked == this) return; std::stringstream msg; msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ")."; g_game.addAnimatedText(this->getPosition(), 129, "Drink!"); for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){ if(dynamic_cast<Player*>(it->second)) (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str()); } Se continuar dando erro, me desculpe, não mexo com 7.91. Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675779 Compartilhar em outros sites More sharing options...
0 deivisonamorim 1 Postado Novembro 16, 2015 Autor Share Postado Novembro 16, 2015 e Nao deu So aparace guando player q pego PK mata guando mata o q ta pk n aparece Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675783 Compartilhar em outros sites More sharing options...
0 TaaG 63 Postado Novembro 16, 2015 Share Postado Novembro 16, 2015 Tente novamente: #ifdef __SKULLSYSTEM__ Skulls_t Player::getSkull() const { if(getAccessLevel() >= ACCESS_PROTECT) return SKULL_NONE; return skull; } Skulls_t Player::getSkullClient(const Player* player) const { if(!player){ return SKULL_NONE; } Skulls_t skull; skull = player->getSkull(); #ifdef __PARTYSYSTEM__ if(skull != SKULL_RED && player->party != NULL && player->party == this->party) return SKULL_GREEN; #endif if(skull == SKULL_NONE){ if(player->hasAttacked(this)){ skull = SKULL_YELLOW; } } return skull; } bool Player::hasAttacked(const Player* attacked) const { if(accessLevel >= ACCESS_PROTECT) return SKULL_YELLOW; if(!attacked) return SKULL_YELLOW; AttackedSet::const_iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it != attackedSet.end()){ return true; } else{ return SKULL_YELLOW; } } void Player::addAttacked(const Player* attacked) { if(accessLevel >= ACCESS_PROTECT) return; if(!attacked || attacked == this) return; AttackedSet::iterator it; unsigned long attacked_id = attacked->getID(); it = attackedSet.find(attacked_id); if(it == attackedSet.end()){ attackedSet.insert(attacked_id); } } void Player::clearAttacked() { attackedSet.clear(); } void Player::addUnjustifiedDead(const Player* attacked) { if(getAccessLevel() >= ACCESS_PROTECT || attacked == this) return; std::stringstream msg; msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ")."; g_game.addAnimatedText(this->getPosition(), 129, "Drink!"); for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){ if(dynamic_cast<Player*>(it->second)) (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str()); } Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675784 Compartilhar em outros sites More sharing options...
0 deivisonamorim 1 Postado Novembro 16, 2015 Autor Share Postado Novembro 16, 2015 agr tudso player ta yellow e nao aparece pvp Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1675786 Compartilhar em outros sites More sharing options...
0 deivisonamorim 1 Postado Novembro 20, 2015 Autor Share Postado Novembro 20, 2015 @up Link para o comentário https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/#findComment-1676108 Compartilhar em outros sites More sharing options...
Pergunta
deivisonamorim 1
Link para o comentário
https://xtibia.com/forum/topic/237749-nao-ta-aparecendo-pvp-para-o-ot-todo-guando-mata-um-pk/Compartilhar em outros sites
10 respostass a esta questão
Posts Recomendados