示例#1
0
//Checks whether the Dragonkin racial should proc.
void PetHelper::CheckRacialsProc(PetStage *petStage, quint8 teamIndex)
{
	Pet *currentPet = petStage->GetTeam(teamIndex)->GetActivePet();

	//Check if active pet is Dragonkin type and has brought the other team's pet below 50%.
	if (currentPet->GetType() == PetType::Dragonkin
                && petStage->GetTeam((teamIndex%2)+1)->GetActivePet()->GetHealthPercentage() < 0.50
                && !currentPet->RacialUsed())
	{
		currentPet->RacialUsed(true);			//Racial now used.
		currentPet->AddAura(245, 1, true);		//Will replace persisting racial.
    }
}