示例#1
0
bool SpellHistory::IsReady(SpellInfo const* spellInfo) const
{
    if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
        if (IsSchoolLocked(spellInfo->GetSchoolMask()))
            return false;

    if (HasCooldown(spellInfo->Id))
        return false;

    if (!HasCharge(spellInfo->ChargeCategoryEntry))
        return false;

    return true;
}
示例#2
0
bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const
{
    if (spellInfo->PreventionType & SPELL_PREVENTION_TYPE_SILENCE)
        if (IsSchoolLocked(spellInfo->GetSchoolMask()))
            return false;

    if (HasCooldown(spellInfo->Id, itemId, ignoreCategoryCooldown))
        return false;

    if (!HasCharge(spellInfo->ChargeCategoryId))
        return false;

    return true;
}
示例#3
0
float AMWBattery::GetCurrentPower() const
{ 
	return HasCharge() ? CurrentPower : 0.f;
}