Core/Conditions: Implemented new condition type CONDITION_BATTLE_PET_COUNT to check how many copies of a battle pet are collected
Port From (https://github.com/TrinityCore/TrinityCore/commit/b5a67cf17dbf18369a2a3370d9d45ca6c56e8cc7)
This commit is contained in:
@@ -393,6 +393,12 @@ namespace Game.Conditions
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ConditionTypes.BattlePetCount:
|
||||
{
|
||||
if (player != null)
|
||||
condMeets = MathFunctions.CompareValues((ComparisionType)ConditionValue3, player.GetSession().GetBattlePetMgr().GetPetCount(CliDB.BattlePetSpeciesStorage.LookupByKey(ConditionValue1), player.GetGUID()), ConditionValue2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
condMeets = false;
|
||||
break;
|
||||
@@ -503,6 +509,7 @@ namespace Game.Conditions
|
||||
break;
|
||||
case ConditionTypes.DailyQuestDone:
|
||||
case ConditionTypes.ObjectiveProgress:
|
||||
case ConditionTypes.BattlePetCount:
|
||||
mask |= GridMapTypeMask.Player;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user