Пример #1
0
bool Player::hasLordSkill(const QString &skill_name) const {
    if(acquired_skills.contains(skill_name))
        return true;

    QString mode = getGameMode();
    if(mode == "06_3v3" || mode == "02_1v1")
        return false;

    if(isLord() || ServerInfo.EnableHegemony)
        return hasInnateSkill(skill_name);

    if(hasSkill("weidi")) {
        foreach(const Player *player, getSiblings()) {
            if(player->isLord())
                return player->hasLordSkill(skill_name);
        }
    }
Пример #2
0
bool Player::hasLordSkill(const QString &skill_name) const{
    if(acquired_skills.contains(skill_name))
        return true;

    QString mode = getGameMode();
    if(mode == "06_3v3" || mode == "02_1v1" || mode == "02p")
        return false;

    if(isLord())
        return hasInnateSkill(skill_name);

    if(hasSkill("weidi")){
        foreach(const Player *player, parent()->findChildren<const Player *>()){
            if(player->isLord())
                return player->hasLordSkill(skill_name);
        }
    }
Пример #3
0
bool Player::hasSkill(const QString &skill_name) const {
    return hasInnateSkill(skill_name)
           || acquired_skills.contains(skill_name);
}