Пример #1
0
bool CHARACTER::DragonSoul_ActivateDeck(int deck_idx)
{
	if (deck_idx < DRAGON_SOUL_DECK_0 || deck_idx >= DRAGON_SOUL_DECK_MAX_NUM)
	{
		return false;
	}
	
	if (DragonSoul_GetActiveDeck() == deck_idx)
		return true;

	DragonSoul_DeactivateAll();

	if (!DragonSoul_IsQualified())
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("їлИҐј® »уАЪ°Ў И°јєИ­µЗБц ѕКѕТЅАґПґЩ."));
		return false;
	}

	AddAffect(AFFECT_DRAGON_SOUL_DECK_0 + deck_idx, APPLY_NONE, 0, 0, INFINITE_AFFECT_DURATION, 0, false);

	m_pointsInstant.iDragonSoulActiveDeck = deck_idx;

	for (int i = DRAGON_SOUL_EQUIP_SLOT_START + DS_SLOT_MAX * deck_idx; 
		i < DRAGON_SOUL_EQUIP_SLOT_START + DS_SLOT_MAX * (deck_idx + 1); i++)
	{
		LPITEM pItem = GetInventoryItem(i);
		if (NULL != pItem)
			DSManager::instance().ActivateDragonSoul(pItem);
	}
}
Пример #2
0
void CHARACTER::DragonSoul_GiveQualification()
{
	if(NULL == FindAffect(AFFECT_DRAGON_SOUL_QUALIFIED))
	{
		LogManager::instance().CharLog(this, 0, "DS_QUALIFIED", "");
	}
	AddAffect(AFFECT_DRAGON_SOUL_QUALIFIED, APPLY_NONE, 0, AFF_NONE, INFINITE_AFFECT_DURATION, 0, false, false);
	//SetQuestFlag("dragon_soul.is_qualified", 1);
	//// АЪ°ЭАЦґЩёй POINT_DRAGON_SOUL_IS_QUALIFIEDґВ №«Б¶°З 1
	//PointChange(POINT_DRAGON_SOUL_IS_QUALIFIED, 1 - GetPoint(POINT_DRAGON_SOUL_IS_QUALIFIED));
}
Пример #3
0
//-----------------------------------------------------------------------------
void Unit::ApplyModifier(const Modifier *mod, bool apply, Affect* parent)
{
	//Player * player;
	Creature * creature;
	Unit * unit;
	WorldPacket data;

	Unit * caster = WorldGetUnit (parent->GetCasterGUID());
	if (caster != NULL && Call_Aura_ApplyModifier (mod->GetType(), caster, this, 
		apply, mod->GetAmount(), mod->GetMiscValue(), mod->GetMiscValue2()))
	{
		sLog.outDebug ("ApplyModifier->SCRIPT: Type=%d Amount=%d V1=%d V2=%d",
			mod->GetType(), mod->GetAmount(), mod->GetMiscValue(), mod->GetMiscValue2());
		return;
	}

	sLog.outDebug ("ApplyModifier: Type=%d Amount=%d V1=%d V2=%d",
		mod->GetType(), mod->GetAmount(), mod->GetMiscValue(), mod->GetMiscValue2());

	switch(mod->GetType())
	{
	case SPELL_AURA_NONE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_NONE");
		break; }

	case SPELL_AURA_BIND_SIGHT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_BIND_SIGHT");
		break; }

	case SPELL_AURA_MOD_THREAT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_THREAT");
		break; }

	case SPELL_AURA_AURAS_VISIBLE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_AURAS_VISIBLE");
		break; }

	case SPELL_AURA_MOD_RESISTANCE_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RESISTANCE_PCT");
		break; }

	case SPELL_AURA_MOD_CREATURE_ATTACK_POWER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_CREATURE_ATTACK_POWER");
		break; }

	case SPELL_AURA_MOD_TOTAL_THREAT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_TOTAL_THREAT");
		break; }

	case SPELL_AURA_WATER_WALK: {
		apply ?
			data.Initialize(SMSG_MOVE_WATER_WALK)
			: data.Initialize(SMSG_MOVE_LAND_WALK);
		data << GetGUID();
		SendMessageToSet(&data,true);
		break; }

	case SPELL_AURA_FEATHER_FALL: {
		apply ?
			data.Initialize(SMSG_MOVE_FEATHER_FALL)
			: data.Initialize(SMSG_MOVE_NORMAL_FALL);
		data << GetGUID();
		SendMessageToSet(&data,true);
		break; }

	case SPELL_AURA_HOVER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_HOVER");
		break; }

	case SPELL_AURA_ADD_FLAT_MODIFIER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_ADD_FLAT_MODIFIER");
		break; }

	case SPELL_AURA_ADD_PCT_MODIFIER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_ADD_PCT_MODIFIER");
		break; }

	case SPELL_AURA_ADD_TARGET_TRIGGER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_ADD_TARGET_TRIGGER");
		break; }

	case SPELL_AURA_MOD_TAUNT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_TAUNT");
		break; }

	case SPELL_AURA_MOD_POWER_REGEN_PERCENT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POWER_REGEN_PERCENT");
		break; }

	case SPELL_AURA_ADD_CASTER_HIT_TRIGGER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_ADD_CASTER_HIT_TRIGGER");
		break; }

	case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_OVERRIDE_CLASS_SCRIPTS");
		break; }

	case SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN");
		break; }

	case SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT");
		break; }

	case SPELL_AURA_MOD_HEALING: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_HEALING");
		break; }

	case SPELL_AURA_IGNORE_REGEN_INTERRUPT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_IGNORE_REGEN_INTERRUPT");
		break; }

	case SPELL_AURA_MOD_MECHANIC_RESISTANCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_MECHANIC_RESISTANCE");
		break; }

	case SPELL_AURA_MOD_HEALING_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_HEALING_PCT");
		break; }

	case SPELL_AURA_SHARE_PET_TRACKING: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_SHARE_PET_TRACKING");
		break; }

	case SPELL_AURA_MOD_CONFUSE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_CONFUSE");
		break; }

	case SPELL_AURA_MOD_STUN: {
		//sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_STUN");
		if (apply)
			SetTarget (0);
		break; } 

	case SPELL_AURA_UNTRACKABLE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_UNTRACKABLE");
		break; }

	case SPELL_AURA_EMPATHY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_EMPATHY");
		break; }

	case SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT");
		break; }

	case SPELL_AURA_MOD_POWER_COST_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POWER_COST_PCT");
		break; }

	case SPELL_AURA_MOD_RANGED_ATTACK_POWER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RANGED_ATTACK_POWER");
		break; }

	case SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN");
		break; }

	case SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT");
		break; }

	case SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS");
		break; }

	case SPELL_AURA_MOD_POSSESS_PET: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POSSESS_PET");
		break; }

	case SPELL_AURA_MOD_INCREASE_SPEED_ALWAYS: {
		unit = WorldGetUnit (GetGUID());
		if (unit != NULL) {
			if (apply)	unit->ModifySpeedMod (mod->GetAmount() / 100.0f);
			else {
				if (mod->GetAmount() != 0)
					unit->ModifySpeedMod (100.0f / mod->GetAmount());
				else
					unit->SetSpeedMod (1.0f);
			}
		} else {
			sLog.outDebug ("ApplyModifier SPELL_AURA_MOD_INCREASE_SPEED_ALWAYS: Unit %X not found", GetGUIDLow());
		}
		break; }

	case SPELL_AURA_MOD_DAMAGE_DONE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DAMAGE_DONE");
		break; }

	case SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS");
		break; }

	case SPELL_AURA_MOD_CREATURE_RANGED_ATTACK_POWER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_CREATURE_RANGED_ATTACK_POWER");
		break; }

	case SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT: {
		uint32 percent = mod->GetAmount();
		uint32 current = GetUInt32Value(UNIT_FIELD_POWER4);
		apply ?
			SetUInt32Value(UNIT_FIELD_POWER4,current+current/100*percent)
		:	SetUInt32Value(UNIT_FIELD_POWER4,current-current/(100+percent)*100);
		break; }

	case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT: {
		uint32 percent = mod->GetAmount();
		uint32 current = GetUInt32Value(UNIT_FIELD_MAXHEALTH);
		apply ?
			SetUInt32Value(UNIT_FIELD_MAXHEALTH,current+current/100*percent)
		:	SetUInt32Value(UNIT_FIELD_MAXHEALTH,current-current/(100+percent)*100);
		break; }

	case SPELL_AURA_MOD_MANA_REGEN_INTERRUPT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_MANA_REGEN_INTERRUPT");
		break; }

	case SPELL_AURA_MOD_HEALING_DONE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_HEALING_DONE");
		break; }

	case SPELL_AURA_MOD_HEALING_DONE_PERCENT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_HEALING_DONE_PERCENT");
		break; }

	case SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE");
		break; }

	case SPELL_AURA_MOD_HASTE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_HASTE");
		break; }

	case SPELL_AURA_FORCE_REACTION: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_FORCE_REACTION");
		break; }

	case SPELL_AURA_MOD_DAMAGE_TAKEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DAMAGE_TAKEN");
		break; }

	case SPELL_AURA_MOD_RANGED_HASTE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RANGED_HASTE");
		break; }

	case SPELL_AURA_MOD_RANGED_AMMO_HASTE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RANGED_AMMO_HASTE");
		break; }

	case SPELL_AURA_MOD_BASE_RESISTANCE_PCT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_BASE_RESISTANCE_PCT");
		break; }

	case SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE");
		break; }

	case SPELL_AURA_SAFE_FALL: {
		apply ? data.Initialize(SMSG_MOVE_FEATHER_FALL) : data.Initialize(SMSG_MOVE_NORMAL_FALL);
		data << GetGUID();
		SendMessageToSet(&data,true);
		break; }

	case SPELL_AURA_CHARISMA: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_CHARISMA");
		break; }

	case SPELL_AURA_PERSUADED: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERSUADED");
		break; }

	case SPELL_AURA_ADD_CREATURE_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_ADD_CREATURE_IMMUNITY");
		break; }

	case SPELL_AURA_RETAIN_COMBO_POINTS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_RETAIN_COMBO_POINTS");
		break; }

	case SPELL_AURA_DAMAGE_SHIELD: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_DAMAGE_SHIELD");
		break; }

	case SPELL_AURA_MOD_STEALTH: {
		//sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_STEALTH");
		
		// Convert float stored into integer field to normal view
		float amountf;
		*((int *)&amountf) = mod->GetAmount();

		// Clip effective stealth level by spell level
		int amount = min (GetLevel() * 5, (int)amountf + 95);

		if (apply)	m_stealthLevel += amount;
		else		m_stealthLevel -= amount;
		
		sLog.outDebug ("ApplyModifier: STEALTH value set to %d", m_stealthLevel);
		break; }

	case SPELL_AURA_MOD_DETECT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DETECT");
		break; }

	case SPELL_AURA_MOD_INVISIBILITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_INVISIBILITY");
		break; }

	case SPELL_AURA_MOD_INVISIBILITY_DETECTION: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_INVISIBILITY_DETECTION");
		break; }

	case SPELL_AURA_MOD_POSSESS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POSSESS");
		break; }

	case SPELL_AURA_MOD_RESISTANCE: {
		uint16 index = 0;
		uint16 index2 = 0;
		switch(mod->GetMiscValue())
		{
		case DMG_PHYSICAL: {
			index = UNIT_FIELD_RESISTANCES;
			mod->GetMiscValue2() == 0 ? index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE : index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE;
			break; }
		case DMG_HOLY: {
			index = UNIT_FIELD_RESISTANCES + DMG_HOLY;
			mod->GetMiscValue2() == 0 ?
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE + DMG_HOLY :
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE + DMG_HOLY;
			break; }
		case DMG_FIRE: {
			index = UNIT_FIELD_RESISTANCES + DMG_FIRE;
			mod->GetMiscValue2() == 0 ?
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE + DMG_FIRE :
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE + DMG_FIRE;
			break; }
		case DMG_NATURE: {
			index = UNIT_FIELD_RESISTANCES + DMG_NATURE;
			mod->GetMiscValue2() == 0 ?
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE + DMG_NATURE :
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE + DMG_NATURE;
			break; }
		case DMG_FROST: {
			index = UNIT_FIELD_RESISTANCES + DMG_FROST;
			mod->GetMiscValue2() == 0 ?
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE + DMG_FROST :
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE + DMG_FROST;
			break; }
		case DMG_SHADOW:{
			index = UNIT_FIELD_RESISTANCES + DMG_SHADOW;
			mod->GetMiscValue2() == 0 ?
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE + DMG_SHADOW :
			index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE + DMG_SHADOW;
			break; }
		case DMG_ARCANE:{
			index = UNIT_FIELD_RESISTANCES + DMG_ARCANE;
			mod->GetMiscValue2() == 0 ?
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE + DMG_ARCANE :
				index2 = PLAYER_FIELD_RESISTANCEBUFFMODSNEGATIVE + DMG_ARCANE;
			break; }
		default:{
			sLog.outDetail ("WARNING: Misc Value for SPELL_AURA_MOD_STAT not valid\n");
			return;
			break; }
		}

		if(apply){
			SetUInt32Value(index,GetUInt32Value(index)+mod->GetAmount());
			if (isPlayer())
				SetUInt32Value(index2,GetUInt32Value(index2)+mod->GetAmount());
		}else{
			SetUInt32Value(index,GetUInt32Value(index)-mod->GetAmount());
			if (isPlayer())
				SetUInt32Value(index2,GetUInt32Value(index2)-mod->GetAmount());
		}
		break; }

	case SPELL_AURA_PERIODIC_TRIGGER_SPELL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_TRIGGER_SPELL");
		break; }

	case SPELL_AURA_PERIODIC_ENERGIZE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_ENERGIZE");
		break; }

	case SPELL_AURA_MOD_PACIFY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_PACIFY");
		break; }

	case SPELL_AURA_MOD_ROOT: {
		apply ? data.Initialize(MSG_MOVE_ROOT) 
			: data.Initialize(MSG_MOVE_UNROOT);
		data << GetGUID();
		SendMessageToSet(&data,true);
		break; }

	case SPELL_AURA_MOD_SILENCE: {
		apply ? m_silenced = true 
			: m_silenced = false;
		break; }

	case SPELL_AURA_REFLECT_SPELLS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_REFLECT_SPELLS");
		break; }

	case SPELL_AURA_MOD_STAT: {
		uint16 index = 0;
		uint16 index2 = 0;
		int32 v = mod->GetAmount();

		switch(mod->GetMiscValue())
		{
		case 0:{
			//index = UNIT_FIELD_STAT0;
			ModifyStrength (apply ? v : -v);
			mod->GetMiscValue2() == 0 ? index2 = PLAYER_FIELD_POSSTAT0 : index2 = PLAYER_FIELD_NEGSTAT0;
			break; }
		case 1:{
			//index = UNIT_FIELD_STAT1;
			ModifyAgility (apply ? v : -v);
			mod->GetMiscValue2() == 0 ? index2 = PLAYER_FIELD_POSSTAT1 : index2 = PLAYER_FIELD_NEGSTAT1;
			break; }
		case 2:{
			//index = UNIT_FIELD_STAT2;
			ModifyStamina (apply ? v : -v);
			mod->GetMiscValue2() == 0 ? index2 = PLAYER_FIELD_POSSTAT2 : index2 = PLAYER_FIELD_NEGSTAT2;
			break; }
		case 3:{
			//index = UNIT_FIELD_STAT3;
			ModifyIntellect (apply ? v : -v);
			mod->GetMiscValue2() == 0 ? index2 = PLAYER_FIELD_POSSTAT3 : index2 = PLAYER_FIELD_NEGSTAT3;
			break; }
		case 4:{
			//index = UNIT_FIELD_STAT4;
			ModifySpirit (apply ? v : -v);
			mod->GetMiscValue2() == 0 ? index2 = PLAYER_FIELD_POSSTAT4 : index2 = PLAYER_FIELD_NEGSTAT4;
			break; }
		default:{
			printf("WARNING: Misc Value for SPELL_AURA_MOD_STAT not valid\n");
			return;
			break; }
		}
		if(apply){
			if (isPlayer())
				SetUInt32Value(index2,GetUInt32Value(index2) + v);
		}else{
			if (isPlayer())
				SetUInt32Value(index2,GetUInt32Value(index2) - v);
		}
		break; }

	case SPELL_AURA_PERIODIC_DAMAGE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_DAMAGE");
		break; }

	case SPELL_AURA_MOD_SKILL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_SKILL");
		break; }

	case SPELL_AURA_MOD_INCREASE_SPEED: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_INCREASE_SPEED");
		break; }

	case SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED: {
		if (GetUInt32Value(UNIT_FIELD_FLAGS) & UNIT_FLAG_MOUNTED ) {
			float newspeed = (float)mod->GetAmount() / 100.0f;
			newspeed = newspeed + 1.0f;
			sLog.outDebug("New Speed (With mount): %.1f", newspeed);
			unit = WorldGetUnit (GetGUID());
			if (unit != NULL)
				unit->SetSpeedMod(newspeed);
		} else {
			unit = WorldGetUnit (GetGUID());
			if (unit != NULL)
				unit->SetSpeedMod(1.0f);
		}
		sLog.outDebug ("ApplyModifier: SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED");
		break; }

	case SPELL_AURA_MOD_DECREASE_SPEED: {
		unit = WorldGetUnit (GetGUID());
		if (unit != NULL) {
			if (apply)	unit->ModifySpeedMod (mod->GetAmount() / 100.0f);
			else {
				if (mod->GetAmount() != 0)
					unit->ModifySpeedMod (100.0f / mod->GetAmount());
				else
					unit->SetSpeedMod (1.0f);
			}
		}
		break; }

	case SPELL_AURA_MOD_INCREASE_HEALTH: {
		uint32 newValue;
		newValue = GetUInt32Value(UNIT_FIELD_MAXHEALTH);
		apply ? newValue += mod->GetAmount() : newValue -= mod->GetAmount();
		SetUInt32Value(UNIT_FIELD_MAXHEALTH,newValue);
		break; }

	case SPELL_AURA_MOD_INCREASE_ENERGY: {
		uint32 powerField = 23;
		uint8 powerType = (uint8)(GetUInt32Value(UNIT_FIELD_BYTES_0) >> 24);
		if(powerType == 0) // Mana
			powerField = UNIT_FIELD_POWER1;
		else if(powerType == 1) // Rage
			powerField = UNIT_FIELD_POWER2;
		else if(powerType == 3) // Energy
			powerField = UNIT_FIELD_POWER4;

		uint32 newValue = GetUInt32Value(powerType);
		apply ? newValue += mod->GetAmount() : newValue -= mod->GetAmount();
		SetUInt32Value(powerType,newValue);
		break; }

	case SPELL_AURA_MOD_SHAPESHIFT: {
		Affect* tmpAff;
		uint32 spellId;
		switch(mod->GetMiscValue())
		{
		case FORM_CAT: {
			spellId = 3025;
			break; }
		case FORM_TREE:{
			spellId = 3122;
			break; }
		case FORM_TRAVEL:{
			spellId = 5419;
			break; }
		case FORM_AQUA:{
			spellId = 5421;
			break; }
		case FORM_BEAR:{
			spellId = 1178;
			break; }
		case FORM_AMBIENT:{
			spellId = 0;
			break; }
		case FORM_GHOUL:{
			spellId = 0;
			break; }
		case FORM_DIREBEAR:{
			spellId = 9635;
			break; }
		case FORM_CREATUREBEAR:{
			spellId = 2882;
			break; }
		case FORM_GHOSTWOLF:{
			spellId = 0;
			break; }
		case FORM_BATTLESTANCE:{
			spellId = 2457;
			break; }
		case FORM_DEFENSIVESTANCE:{
			spellId = 7376;
			break; }
		case FORM_BERSERKERSTANCE:{
			spellId = 7381;
			break; }
		case FORM_SHADOW:{
			spellId = 0;
			break; }
		case FORM_STEALTH:{
			//spellId = 0;
			// Turn on Sneaky Stance, Switch stealth button to unstealth and switch spellbar
			SetUInt32Value (UNIT_FIELD_BYTES_1, apply? 0x021E0000: 0);
			if (apply == false && isPlayer())
			{
				data.Initialize (SMSG_COOLDOWN_EVENT);
				data << (uint32)1784 << GetGUID();
				((Player*)this)->GetSession()->SendPacket (&data);
			}
			return; }

		default:{
			printf("Unknown Shapeshift Type\n");
			break; }
		}
		// check for spell id
		SpellEntry *spellInfo = sSpellStore.LookupEntry( spellId );

		if(!spellInfo)
		{
			sLog.outError("WORLD: unknown spell id %i\n", spellId);
			break;
		}
		tmpAff = new Affect(spellInfo,parent->GetDuration(),parent->GetCasterGUID());
		for(uint8 i=0; i<3; ++i){
			if(spellInfo->Effect[i] == 6){
				uint32 value = 0;
				uint32 type = 0;
				uint32 damage = 0;
				
				if(spellInfo->EffectBasePoints[i] < 0){
					tmpAff->SetNegative();
					type = 1;
				}

				uint32 sBasePoints = (uint32)sqrt((float)(spellInfo->EffectBasePoints[i]*spellInfo->EffectBasePoints[i]));
				if(spellInfo->EffectApplyAuraName[i] == 3){       // Periodic Trigger Damage
					damage = spellInfo->EffectBasePoints[i]+rand()%spellInfo->EffectDieSides[i]+1;
					//TODO: why the hell it takes uint16?
					tmpAff->SetDamagePerTick((uint16)damage, spellInfo->EffectAmplitude[i]);
					tmpAff->SetNegative();
				}else if(spellInfo->EffectApplyAuraName[i] == 23)// Periodic Trigger Spell
					tmpAff->SetPeriodicTriggerSpell(spellInfo->EffectTriggerSpell[i],spellInfo->EffectAmplitude[i]);
				else{
					if(spellInfo->EffectDieSides[i] != 0)
						value = sBasePoints+rand()%spellInfo->EffectDieSides[i];
					else
						value = sBasePoints;
					if(spellInfo->EffectDieSides[i] <= 1)
						value += 1;
					//TODO: why the hell it takes uint8? 
					tmpAff->AddMod((uint8)spellInfo->EffectApplyAuraName[i],value,spellInfo->EffectMiscValue[i],type);
				}
			}
		}
		if(tmpAff){
			parent->SetCoAffect(tmpAff);
			AddAffect(tmpAff);
		}

		break; }

	case SPELL_AURA_EFFECT_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_EFFECT_IMMUNITY");
		break; }

	case SPELL_AURA_STATE_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_STATE_IMMUNITY");
		break; }

	case SPELL_AURA_SCHOOL_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_SCHOOL_IMMUNITY");
		break; }

	case SPELL_AURA_DAMAGE_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_DAMAGE_IMMUNITY");
		break; }

	case SPELL_AURA_DISPEL_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_DISPEL_IMMUNITY");
		break; }

	case SPELL_AURA_PROC_TRIGGER_SPELL: {
		apply ? m_triggerSpell = mod->GetAmount() : m_triggerSpell = 0;
		break; }

	case SPELL_AURA_PROC_TRIGGER_DAMAGE: {
		apply ? m_triggerDamage = mod->GetAmount() : m_triggerDamage = 0;
		break; }

	case SPELL_AURA_TRACK_CREATURES: {
		apply ? SetUInt32Value(PLAYER_TRACK_CREATURES,mod->GetMiscValue()) : SetUInt32Value(PLAYER_TRACK_CREATURES,0);
		break; }

	case SPELL_AURA_TRACK_RESOURCES: {
		apply ? SetUInt32Value(PLAYER_TRACK_RESOURCES,mod->GetMiscValue()) : SetUInt32Value(PLAYER_TRACK_RESOURCES,0);
		break; }

	case SPELL_AURA_MOD_PARRY_SKILL: {
		break; }

	case SPELL_AURA_MOD_PARRY_PERCENT: {
		//uint32 current = GetUInt32Value(PLAYER_PARRY_PERCENTAGE);
		//apply ? SetUInt32Value(PLAYER_PARRY_PERCENTAGE,current+mod->GetAmount()) : SetUInt32Value(PLAYER_PARRY_PERCENTAGE,current-mod->GetAmount());
		ModifyParryChance (apply ? mod->GetAmount() : -mod->GetAmount());
		break; }

	case SPELL_AURA_MOD_DODGE_SKILL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DODGE_SKILL");
		break; }

	case SPELL_AURA_MOD_DODGE_PERCENT: {
		//uint32 current = GetUInt32Value(PLAYER_DODGE_PERCENTAGE);
		//apply ? SetUInt32Value(PLAYER_DODGE_PERCENTAGE,current+mod->GetAmount()) : SetUInt32Value(PLAYER_DODGE_PERCENTAGE,current-mod->GetAmount());
		ModifyDodgeChance (apply ? mod->GetAmount() : -mod->GetAmount());
		break; }

	case SPELL_AURA_MOD_BLOCK_SKILL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_BLOCK_SKILL");
		break; }

	case SPELL_AURA_MOD_BLOCK_PERCENT: {
		//uint32 current = GetUInt32Value(PLAYER_BLOCK_PERCENTAGE);
		//apply ? SetUInt32Value(PLAYER_BLOCK_PERCENTAGE,current+mod->GetAmount()) : SetUInt32Value(PLAYER_BLOCK_PERCENTAGE,current-mod->GetAmount());
		ModifyBlockChance (apply ? mod->GetAmount() : -mod->GetAmount());
		break; }

	case SPELL_AURA_MOD_CRIT_PERCENT: {
		//uint32 current = GetUInt32Value(PLAYER_CRIT_PERCENTAGE);
		//apply ? SetUInt32Value(PLAYER_CRIT_PERCENTAGE,current+mod->GetAmount()) : SetUInt32Value(PLAYER_CRIT_PERCENTAGE,current-mod->GetAmount());
		ModifyCritChance (apply ? mod->GetAmount() : -mod->GetAmount());
		break; }

	case SPELL_AURA_PERIODIC_LEECH: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_LEECH");
		break; }

	case SPELL_AURA_MOD_HIT_CHANCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_HIT_CHANCE");
		break; }

	case SPELL_AURA_MOD_SPELL_HIT_CHANCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_SPELL_HIT_CHANCE");
		break; }

	case SPELL_AURA_TRANSFORM: {
		if (parent->GetId() == 118) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 228) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 304);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 851) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 4060) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 131);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 5254) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 12824) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 12825) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 12826) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 13323) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 15534) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 856);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		if (parent->GetId() == 17738) {
			if (apply) {
				//((Modifier *)mod)->SetValue1 (GetUInt32Value (UNIT_FIELD_DISPLAYID));
				SetUInt32Value (UNIT_FIELD_DISPLAYID, 1141);
			} else {
				SetUInt32Value (UNIT_FIELD_DISPLAYID, GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
				if (caster != NULL)
					AddHate (caster, 1.0f);
			}
		}
		break; }

	case SPELL_AURA_MOD_SPELL_CRIT_CHANCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_SPELL_CRIT_CHANCE");
		break; }

	case SPELL_AURA_MOD_INCREASE_SWIM_SPEED: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_INCREASE_SWIM_SPEED");
		break; }

	case SPELL_AURA_MOD_DAMAGE_DONE_CREATURE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DAMAGE_DONE_CREATURE");
		break; }

	case SPELL_AURA_MOD_CHARM: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_CHARM");
		break; }

	case SPELL_AURA_MOD_PACIFY_SILENCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_PACIFY_SILENCE");
		break; }

	case SPELL_AURA_MOD_SCALE: {
			float current = GetFloatValue(OBJECT_FIELD_SCALE_X);
			apply ? SetFloatValue(OBJECT_FIELD_SCALE_X,current+current/100*10) : SetFloatValue(OBJECT_FIELD_SCALE_X,current-current/110*100);
			break; }

	case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_HEALTH_FUNNEL");
		break; }

	case SPELL_AURA_PERIODIC_MANA_FUNNEL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_MANA_FUNNEL");
		break; }

	case SPELL_AURA_PERIODIC_MANA_LEECH: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_MANA_LEECH");
		break; }

	case SPELL_AURA_MOD_CASTING_SPEED: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_CASTING_SPEED");
		break; }

	case SPELL_AURA_FEIGN_DEATH: {
			sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_FEIGN_DEATH");
			break; }

	case SPELL_AURA_MOD_DISARM: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DISARM");
		break; }

	case SPELL_AURA_MOD_STALKED: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_STALKED");
		break; }

	case SPELL_AURA_SCHOOL_ABSORB: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_SCHOOL_ABSORB");
		break; }

	case SPELL_AURA_MOD_FEAR: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_FEAR");
		break; }

	case SPELL_AURA_EXTRA_ATTACKS: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_EXTRA_ATTACKS");
		break; }

	case SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL");
		break; }

	case SPELL_AURA_MOD_POWER_COST: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POWER_COST");
		break; }

	case SPELL_AURA_MOD_POWER_COST_SCHOOL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POWER_COST_SCHOOL");
		break; }

	case SPELL_AURA_REFLECT_SPELLS_SCHOOL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_REFLECT_SPELLS_SCHOOL");
		break; }

	case SPELL_AURA_MOD_LANGUAGE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_LANGUAGE");
		break; }

	case SPELL_AURA_FAR_SIGHT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_FAR_SIGHT");
		break; }

	case SPELL_AURA_MECHANIC_IMMUNITY: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MECHANIC_IMMUNITY");
		break; }

	case SPELL_AURA_MOUNTED: {
		sLog.outDebug ("ApplyModifier: SPELL_AURA_MOUNTED");
		if (GetUInt32Value(UNIT_FIELD_FLAGS) & UNIT_FLAG_MOUNTED )
		{
			SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID , 0);
			RemoveFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNTED );
			// Remove the "player locked" flag, to allow movement
			if (GetUInt32Value(UNIT_FIELD_FLAGS) & UNIT_FLAG_LOCKED )
				RemoveFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_LOCKED );
			// Make sure we're standing ;)
			SetUInt32Value(UNIT_FIELD_BYTES_1, STANDSTATE_STAND);
		} else {
			// Set mount ID from creatures_templ
			CreatureTemplate *ptempl = objmgr.GetCreatureTemplate(mod->GetMiscValue(), true);
			SetUInt32Value( UNIT_FIELD_MOUNTDISPLAYID , ptempl->Model);
			//SetUInt32Value( UNIT_FIELD_FLAGS , UNIT_FLAG_MOUNTED );
			SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNTED );
		}
		break; }

	case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DAMAGE_PERCENT_DONE");
		break; }

	case SPELL_AURA_PERIODIC_HEAL: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_HEAL");
		break; }

	case SPELL_AURA_MOD_PERCENT_STAT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_PERCENT_STAT");
		break; }

	case SPELL_AURA_SPLIT_DAMAGE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_SPLIT_DAMAGE");
		break; }

	case SPELL_AURA_WATER_BREATHING: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_WATER_BREATHING");
		break; }

	case SPELL_AURA_MOD_BASE_RESISTANCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_BASE_RESISTANCE");
		break; }

	case SPELL_AURA_MOD_REGEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_REGEN");
		break; }

	case SPELL_AURA_MOD_POWER_REGEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_POWER_REGEN");
		break; }

	case SPELL_AURA_CHANNEL_DEATH_ITEM: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_CHANNEL_DEATH_ITEM");
		break; }

	case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN");
		break; }

	case SPELL_AURA_MOD_PERCENT_REGEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_PERCENT_REGEN");
		break; }

	case SPELL_AURA_PERIODIC_DAMAGE_PERCENT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PERIODIC_DAMAGE_PERCENT");
		break; }

	case SPELL_AURA_MOD_ATTACKSPEED: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_ATTACKSPEED");
		break; }

	case SPELL_AURA_MOD_RESIST_CHANCE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_RESIST_CHANCE");
		break; }

	case SPELL_AURA_MOD_DETECT_RANGE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_DETECT_RANGE");
		break; }

	case SPELL_AURA_PREVENTS_FLEEING: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_PREVENTS_FLEEING");
		break; }

	case SPELL_AURA_MOD_UNATTACKABLE: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_UNATTACKABLE");
		break; }

	case SPELL_AURA_INTERRUPT_REGEN: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_INTERRUPT_REGEN");
		break; }

	case SPELL_AURA_GHOST: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_GHOST");
		break; }

	case SPELL_AURA_SPELL_MAGNET: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_SPELL_MAGNET");
		break; }

	case SPELL_AURA_MANA_SHIELD: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MANA_SHIELD");
		break; }

	case SPELL_AURA_MOD_SKILL_TALENT: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_SKILL_TALENT");
		break; }

	case SPELL_AURA_MOD_ATTACK_POWER: {
		sLog.outDebug ("ApplyModifier: Unsupported SPELL_AURA_MOD_ATTACK_POWER");
		break; }

	default: {
		sLog.outError("Unknown affect id %u", (uint32)mod->GetType());
			 }
	}
}