* Added CONDITION_CLASS / CONDITION_RACE / CONDITION_ACHIEVEMENT for

* gossip / loot conditions

--HG--
branch : trunk
This commit is contained in:
Brian
2010-03-14 11:45:34 -06:00
parent 8d51d23cc5
commit 8ba7885cc8
2 changed files with 13 additions and 1 deletions
+9
View File
@@ -7725,8 +7725,17 @@ bool PlayerCondition::Meets(Player const * player) const
FactionEntry const* faction = sFactionStore.LookupEntry(value1);
return faction && uint32(player->GetReputationMgr().GetRank(faction)) >= int32(value2);
}
case CONDITION_ACHIEVEMENT:
{
AchievementEntry const* achievement = GetAchievementStore()->LookupEntry(value1);
return (achievement,1);
}
case CONDITION_TEAM:
return player->GetTeam() == value1;
case CONDITION_CLASS:
return player->getClass() == value1;
case CONDITION_RACE:
return player->getRace() == value1;
case CONDITION_SKILL:
return player->HasSkill(value1) && player->GetBaseSkillValue(value1) >= value2;
case CONDITION_QUESTREWARDED: