Pesquisar na Comunidade
Mostrando resultados para as tags ''ajuda player.cpp''.
Encontrado 1 registro
-
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()); }