Exemplo n.º 1
0
void Item::RemoveRelatedEnchants(EnchantEntry* newEnchant)
{
    for (EnchantmentMap::iterator itr = Enchantments.begin(); itr != Enchantments.end(); ++itr)
    {
        if (itr->second.Enchantment->Id == newEnchant->Id || (itr->second.Enchantment->EnchantGroups > 1 && newEnchant->EnchantGroups > 1))
            RemoveEnchantment(itr->first);
    }
}
Exemplo n.º 2
0
void Item::RemoveAllEnchantments(bool OnlyTemporary)
{
    for (EnchantmentMap::iterator itr = Enchantments.begin(); itr != Enchantments.end(); ++itr)
    {
        if (OnlyTemporary && !itr->second.Duration)
            continue;

        RemoveEnchantment(itr->first);
    }
}
Exemplo n.º 3
0
void Item::RemoveSocketBonusEnchant()
{
    for (EnchantmentMap::iterator itr = Enchantments.begin(); itr != Enchantments.end(); ++itr)
    {
        if (itr->second.Enchantment->Id == GetProto()->SocketBonus)
        {
            RemoveEnchantment(itr->first);
            return;
        }
    }
}
Exemplo n.º 4
0
void Item::RemoveRelatedEnchants( EnchantEntry* newEnchant )
{
    EnchantmentMap::iterator itr,itr2;
    for( itr = Enchantments.begin(); itr != Enchantments.end(); )
    {
        itr2 = itr++;
        if( itr2->second.Enchantment->Id == newEnchant->Id || ( itr2->second.Enchantment->EnchantGroups > 1 && newEnchant->EnchantGroups > 1 ) )
        {
            RemoveEnchantment( itr2->first );
        }
    }
}
Exemplo n.º 5
0
void Item::RemoveAllEnchantments( bool OnlyTemporary )
{
    EnchantmentMap::iterator itr, it2;
    for( itr = Enchantments.begin(); itr != Enchantments.end(); )
    {
        it2 = itr++;
        if( OnlyTemporary && it2->second.Duration == 0 )
            continue;

        RemoveEnchantment( it2->first );
    }
}
Exemplo n.º 6
0
void Item::RemoveProfessionEnchant()
{
	EnchantmentMap::iterator itr;
	for( itr = Enchantments.begin(); itr != Enchantments.end(); itr++ )
	{
		if( itr->second.Duration != 0 )// not perm
			continue;
		if( IsGemRelated( itr->second.Enchantment ) )
			continue;

		RemoveEnchantment( itr->first );
		return;
	}
}
Exemplo n.º 7
0
void Item::EventRemoveEnchantment( uint32 Slot )
{
	// Remove the enchantment.
	RemoveEnchantment( Slot );
}