diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 9ac7521dd28..fb78807d15f 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -577,7 +577,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex) // We are in Shadow Form if (m_caster->GetShapeshiftForm() == FORM_SHADOW) // We have Improved Mind Blast - if (AuraEffect * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST,95,0)) + if (AuraEffect * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 95, 0)) // Chance has been successfully rolled if (roll_chance_i(aurEff->GetAmount())) m_caster->CastSpell(unitTarget, 48301, true); @@ -809,7 +809,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) case 12850: damage *= 0.32f; break; // Rank 2 case 12868: damage *= 0.48f; break; // Rank 3 default: - sLog->outError("Spell::EffectDummy: Spell %u not handled in DW",m_spellInfo->Id); + sLog->outError("Spell::EffectDummy: Spell %u not handled in DW", m_spellInfo->Id); return; }; @@ -838,7 +838,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) m_caster->CastCustomSpell(unitTarget, 26470, &damage, NULL, NULL, true); break; default: - sLog->outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u",m_triggeredByAuraSpell->Id); + sLog->outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u", m_triggeredByAuraSpell->Id); break; } return; @@ -942,13 +942,13 @@ void Spell::EffectDummy(SpellEffIndex effIndex) ? 29277 // Summon Purified Helboar Meat : 29278; // Summon Toxic Helboar Meat - m_caster->CastSpell(m_caster,spell_id,true,NULL); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 29858: // Soulshatter if (unitTarget && unitTarget->CanHaveThreatList() && unitTarget->getThreatManager().getThreat(m_caster) > 0.0f) - m_caster->CastSpell(unitTarget,32835,true); + m_caster->CastSpell(unitTarget, 32835, true); return; case 30458: // Nigh Invulnerability if (!m_CastItem) return; @@ -1196,10 +1196,10 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } case 64385: // Unusual Compass { - m_caster->SetOrientation(float(urand(0,62832)) / 10000.0f); + m_caster->SetOrientation(float(urand(0, 62832)) / 10000.0f); WorldPacket data; m_caster->BuildHeartBeatMsg(&data); - m_caster->SendMessageToSet(&data,true); + m_caster->SendMessageToSet(&data, true); return; } case 53808: // Pygmy Oil @@ -1542,7 +1542,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } // pet auras - if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id,effIndex)) + if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id, effIndex)) { m_caster->AddPetAura(petSpell); return; @@ -1571,14 +1571,14 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } int32 bp = damage; Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget); - caster->CastCustomSpell(unitTarget,triggered_spell_id,&bp,&bp,&bp,true); + caster->CastCustomSpell(unitTarget, triggered_spell_id, &bp, &bp, &bp, true); } void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex) @@ -1588,13 +1588,13 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } finish(); - m_caster->CastSpell(unitTarget,spellInfo,false); + m_caster->CastSpell(unitTarget, spellInfo, false); } void Spell::EffectForceCast(SpellEffIndex effIndex) @@ -1609,7 +1609,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } @@ -1649,7 +1649,7 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } int32 bp = damage; @@ -1664,7 +1664,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) if (!unitTarget) { if (gameObjTarget || itemTarget) - sLog->outError("Spell::EffectTriggerSpell (Spell: %u): Unsupported non-unit case!",m_spellInfo->Id); + sLog->outError("Spell::EffectTriggerSpell (Spell: %u): Unsupported non-unit case!", m_spellInfo->Id); return; } @@ -1793,7 +1793,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) SpellEntry const *spellInfo = sSpellStore.LookupEntry(triggered_spell_id); if (!spellInfo) { - sLog->outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } @@ -1807,7 +1807,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) // so this just for speedup places in else Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget); - caster->CastSpell(unitTarget,spellInfo,true, 0, 0, (originalCaster ? originalCaster->GetGUID() : 0)); + caster->CastSpell(unitTarget, spellInfo, true, 0, 0, (originalCaster ? originalCaster->GetGUID() : 0)); } void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) @@ -1820,7 +1820,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) if (!spellInfo) { sLog->outError("EffectTriggerMissileSpell of spell %u (eff: %u): triggering unknown spell id %u", - m_spellInfo->Id,effIndex,triggered_spell_id); + m_spellInfo->Id, effIndex, triggered_spell_id); return; } @@ -1843,15 +1843,15 @@ void Spell::EffectJump(SpellEffIndex effIndex) if (m_caster->isInFlight()) return; - float x,y,z,o; + float x, y, z, o; if (m_targets.getUnitTarget()) { - m_targets.getUnitTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE); + m_targets.getUnitTarget()->GetContactPoint(m_caster, x, y, z, CONTACT_DISTANCE); o = m_caster->GetOrientation(); } else if (m_targets.getGOTarget()) { - m_targets.getGOTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE); + m_targets.getGOTarget()->GetContactPoint(m_caster, x, y, z, CONTACT_DISTANCE); o = m_caster->GetOrientation(); } else @@ -1871,7 +1871,7 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex) return; // Init dest coordinates - float x,y,z,o; + float x, y, z, o; if (m_targets.HasDst()) { m_targets.m_dstPos.GetPosition(x, y, z); @@ -1935,7 +1935,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) if (unitTarget->getLevel() > uiMaxSafeLevel) { - unitTarget->AddAura(60444,unitTarget); //Apply Lost! Aura + unitTarget->AddAura(60444, unitTarget); //Apply Lost! Aura return; } break; @@ -1943,18 +1943,18 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) if (Player* pTarget = unitTarget->ToPlayer()) { if (pTarget->GetTeamId() == TEAM_ALLIANCE) - m_targets.setDst(442.24f,-835.25f,44.30f,0.06f,628); + m_targets.setDst(442.24f, -835.25f, 44.30f, 0.06f, 628); else - m_targets.setDst(1120.43f,-762.11f,47.92f,2.94f,628); + m_targets.setDst(1120.43f, -762.11f, 47.92f, 2.94f, 628); } break; case 66551: // teleports inside (Isle of Conquest) if (Player* pTarget = unitTarget->ToPlayer()) { if (pTarget->GetTeamId() == TEAM_ALLIANCE) - m_targets.setDst(389.57f,-832.38f,48.65f,3.00f,628); + m_targets.setDst(389.57f, -832.38f, 48.65f, 3.00f, 628); else - m_targets.setDst(1174.85f,-763.24f,48.72f,6.26f,628); + m_targets.setDst(1174.85f, -763.24f, 48.72f, 6.26f, 628); } break; } @@ -2276,7 +2276,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/) unitTarget->RemoveAura(targetAura->GetId(), targetAura->GetCasterGUID()); //addhealth += tickheal * tickcount; - //addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget); + //addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth, HEAL, unitTarget); } // Glyph of Nourish else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x2000000) @@ -2482,7 +2482,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype) void Spell::EffectCreateItem(SpellEffIndex effIndex) { - DoCreateItem(effIndex,m_spellInfo->EffectItemType[effIndex]); + DoCreateItem(effIndex, m_spellInfo->EffectItemType[effIndex]); ExecuteLogEffectCreateItem(effIndex, m_spellInfo->EffectItemType[effIndex]); } @@ -2660,10 +2660,10 @@ void Spell::EffectEnergize(SpellEffIndex effIndex) if (!avalibleElixirs.empty()) { // cast random elixir on target - uint32 rand_spell = urand(0,avalibleElixirs.size()-1); + uint32 rand_spell = urand(0, avalibleElixirs.size()-1); std::set<uint32>::iterator itr = avalibleElixirs.begin(); std::advance(itr, rand_spell); - m_caster->CastSpell(unitTarget,*itr,true,m_CastItem); + m_caster->CastSpell(unitTarget, *itr, true, m_CastItem); } } } @@ -2732,20 +2732,20 @@ void Spell::SendLoot(uint64 guid, LootType loottype) case GAMEOBJECT_TYPE_SPELL_FOCUS: // triggering linked GO if (uint32 trapEntry = gameObjTarget->GetGOInfo()->spellFocus.linkedTrapId) - gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); + gameObjTarget->TriggeringLinkedGameObject(trapEntry, m_caster); return; case GAMEOBJECT_TYPE_CHEST: // TODO: possible must be moved to loot release (in different from linked triggering) if (gameObjTarget->GetGOInfo()->chest.eventId) { - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId, gameObjTarget->GetDBTableGUIDLow()); player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget); } // triggering linked GO if (uint32 trapEntry = gameObjTarget->GetGOInfo()->chest.linkedTrapId) - gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); + gameObjTarget->TriggeringLinkedGameObject(trapEntry, m_caster); // Don't return, let loots been taken default: @@ -3351,7 +3351,7 @@ void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/) // victim have to be alive and humanoid or undead if (unitTarget->isAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0) - m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING); + m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(), LOOT_PICKPOCKETING); } void Spell::EffectAddFarsight(SpellEffIndex effIndex) @@ -3398,10 +3398,10 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex effIndex) float dis = (float)m_caster->GetSpellRadiusForTarget(unitTarget, sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[effIndex])); - float fx,fy,fz; - m_caster->GetClosePoint(fx,fy,fz,unitTarget->GetObjectSize(),dis); + float fx, fy, fz; + m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetObjectSize(), dis); - unitTarget->NearTeleportTo(fx,fy,fz,-m_caster->GetOrientation(),unitTarget == m_caster); + unitTarget->NearTeleportTo(fx, fy, fz, -m_caster->GetOrientation(), unitTarget == m_caster); } void Spell::EffectLearnSkill(SpellEffIndex effIndex) @@ -3426,7 +3426,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/) if (m_CastItem) { unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage/10); - sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),unitTarget->ToPlayer()->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUIDLow()); return; } @@ -3451,7 +3451,7 @@ void Spell::EffectTradeSkill(SpellEffIndex /*effIndex*/) return; // uint32 skillid = m_spellInfo->EffectMiscValue[i]; // uint16 skillmax = unitTarget->ToPlayer()->(skillid); - // unitTarget->ToPlayer()->SetSkill(skillid,skillval?skillval:1,skillmax+75); + // unitTarget->ToPlayer()->SetSkill(skillid, skillval?skillval:1, skillmax+75); } void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) @@ -3468,10 +3468,10 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) { // destroy one vellum from stack uint32 count = 1; - p_caster->DestroyItemCount(itemTarget,count,true); + p_caster->DestroyItemCount(itemTarget, count, true); unitTarget=p_caster; // and add a scroll - DoCreateItem(effIndex,m_spellInfo->EffectItemType[effIndex]); + DoCreateItem(effIndex, m_spellInfo->EffectItemType[effIndex]); itemTarget=NULL; m_targets.setItemTarget(NULL); } @@ -3496,19 +3496,19 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { - sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", - p_caster->GetName(),p_caster->GetSession()->GetAccountId(), + sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", + p_caster->GetName(), p_caster->GetSession()->GetAccountId(), itemTarget->GetTemplate()->Name1.c_str(), itemTarget->GetEntry(), - item_owner->GetName(),item_owner->GetSession()->GetAccountId()); + item_owner->GetName(), item_owner->GetSession()->GetAccountId()); } // remove old enchanting before applying new if equipped - item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,false); + item_owner->ApplyEnchantment(itemTarget, PERM_ENCHANTMENT_SLOT, false); itemTarget->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchant_id, 0, 0); // add new enchanting if equipped - item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,true); + item_owner->ApplyEnchantment(itemTarget, PERM_ENCHANTMENT_SLOT, true); itemTarget->SetSoulboundTradeable(NULL, item_owner, false); } @@ -3545,7 +3545,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) if (!add_socket) { sLog->outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.", - m_spellInfo->Id,SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC,ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET); + m_spellInfo->Id, SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC, ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET); return; } } @@ -3557,19 +3557,19 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { - sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", - p_caster->GetName(),p_caster->GetSession()->GetAccountId(), + sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", + p_caster->GetName(), p_caster->GetSession()->GetAccountId(), itemTarget->GetTemplate()->Name1.c_str(), itemTarget->GetEntry(), - item_owner->GetName(),item_owner->GetSession()->GetAccountId()); + item_owner->GetName(), item_owner->GetSession()->GetAccountId()); } // remove old enchanting before applying new if equipped - item_owner->ApplyEnchantment(itemTarget,PRISMATIC_ENCHANTMENT_SLOT,false); + item_owner->ApplyEnchantment(itemTarget, PRISMATIC_ENCHANTMENT_SLOT, false); itemTarget->SetEnchantment(PRISMATIC_ENCHANTMENT_SLOT, enchant_id, 0, 0); // add new enchanting if equipped - item_owner->ApplyEnchantment(itemTarget,PRISMATIC_ENCHANTMENT_SLOT,true); + item_owner->ApplyEnchantment(itemTarget, PRISMATIC_ENCHANTMENT_SLOT, true); itemTarget->SetSoulboundTradeable(NULL, item_owner, false); } @@ -3606,7 +3606,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) case 10: spell_id = 36758; break; // 14% case 11: spell_id = 36760; break; // 20% default: - sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW",damage); + sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage); return; } @@ -3640,14 +3640,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) if (!enchant_id) { - sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id",m_spellInfo->Id,effIndex); + sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex); return; } SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) { - sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ",m_spellInfo->Id,effIndex,enchant_id); + sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id); return; } @@ -3687,14 +3687,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { - sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)", + sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(), p_caster->GetSession()->GetAccountId(), itemTarget->GetTemplate()->Name1.c_str(), itemTarget->GetEntry(), item_owner->GetName(), item_owner->GetSession()->GetAccountId()); } // remove old enchanting before applying new if equipped - item_owner->ApplyEnchantment(itemTarget,TEMP_ENCHANTMENT_SLOT, false); + item_owner->ApplyEnchantment(itemTarget, TEMP_ENCHANTMENT_SLOT, false); itemTarget->SetEnchantment(TEMP_ENCHANTMENT_SLOT, enchant_id, duration * 1000, 0); @@ -3725,7 +3725,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/) //SendChannelUpdate(0); finish(); - Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget,m_spellInfo->Id); + Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget, m_spellInfo->Id); if (!pet) // in very specific state like near world end/etc. return; @@ -3789,7 +3789,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex) ASSERT(OldSummon->GetMap() == owner->GetMap()); - //OldSummon->GetMap()->Remove(OldSummon->ToCreature(),false); + //OldSummon->GetMap()->Remove(OldSummon->ToCreature(), false); float px, py, pz; owner->GetClosePoint(px, py, pz, OldSummon->GetObjectSize()); @@ -3806,7 +3806,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex) } if (owner->GetTypeId() == TYPEID_PLAYER) - owner->ToPlayer()->RemovePet(OldSummon,(OldSummon->getPetType() == HUNTER_PET ? PET_SAVE_AS_DELETED : PET_SAVE_NOT_IN_SLOT),false); + owner->ToPlayer()->RemovePet(OldSummon, (OldSummon->getPetType() == HUNTER_PET ? PET_SAVE_AS_DELETED : PET_SAVE_NOT_IN_SLOT), false); else return; } @@ -4318,7 +4318,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex) if (pl->GetTeam() == team) team = HORDE; - ((BattlegroundWS*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID(),team); + ((BattlegroundWS*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID(), team); } break; } @@ -4369,7 +4369,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) // Glyph of Backstab case 63975: { - if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE,SPELLFAMILY_ROGUE,0x00100000,0,0,m_caster->GetGUID())) + if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID())) { uint32 countMin = aurEff->GetBase()->GetMaxDuration(); uint32 countMax = 12000; @@ -4399,11 +4399,11 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) // check presence for (uint8 j = 0; j < 4; ++j) - if (unitTarget->HasAuraEffect(spells[j],0)) + if (unitTarget->HasAuraEffect(spells[j], 0)) return; // select spell - uint32 iTmpSpellId = spells[urand(0,3)]; + uint32 iTmpSpellId = spells[urand(0, 3)]; // cast unitTarget->CastSpell(unitTarget, iTmpSpellId, true); @@ -4422,7 +4422,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) default: spell_id = 8855; break; } - m_caster->CastSpell(m_caster,spell_id,true,NULL); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } // Brittle Armor - need remove one 24575 Brittle Armor aura @@ -4498,7 +4498,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) item = 23586; break; // Aerie Peak Pale Ale } if (item) - DoCreateItem(effIndex,item); + DoCreateItem(effIndex, item); break; } // Improved Sprint @@ -4642,8 +4642,8 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } if (bag) { - if (m_caster->ToPlayer()->GetItemByPos(bag,slot)->GetCount() == 1) m_caster->ToPlayer()->RemoveItem(bag,slot,true); - else m_caster->ToPlayer()->GetItemByPos(bag,slot)->SetCount(m_caster->ToPlayer()->GetItemByPos(bag,slot)->GetCount()-1); + if (m_caster->ToPlayer()->GetItemByPos(bag, slot)->GetCount() == 1) m_caster->ToPlayer()->RemoveItem(bag, slot, true); + else m_caster->ToPlayer()->GetItemByPos(bag, slot)->SetCount(m_caster->ToPlayer()->GetItemByPos(bag, slot)->GetCount()-1); // Spell 42518 (Braufest - Gratisprobe des Braufest herstellen) m_caster->CastSpell(m_caster, 42518, true); return; @@ -4678,7 +4678,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) unitTarget->CastSpell(unitTarget, spellId, true); break; } - // 5,000 Gold + // 5, 000 Gold case 46642: { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) @@ -4695,7 +4695,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) const char *gender = "his"; if (m_caster->getGender() > 0) gender = "her"; - sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName(), gender, gender, urand(1,10), urand(1,10)); + sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName(), gender, gender, urand(1, 10), urand(1, 10)); m_caster->MonsterTextEmote(buf, 0); break; } @@ -4706,7 +4706,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) const char *gender = "his"; if (m_caster->getGender() > 0) gender = "her"; - sprintf(buf, "%s causually tosses %s [Worn Troll Dice]. One %u and one %u.", m_caster->GetName(), gender, urand(1,6), urand(1,6)); + sprintf(buf, "%s causually tosses %s [Worn Troll Dice]. One %u and one %u.", m_caster->GetName(), gender, urand(1, 6), urand(1, 6)); m_caster->MonsterTextEmote(buf, 0); break; } @@ -5187,10 +5187,10 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } case 66545: //Summon Memory { - uint8 uiRandom = urand(0,25); - uint32 uiSpells[26] = {66704,66705,66706,66707,66709,66710,66711,66712,66713,66714,66715,66708,66708,66691,66692,66694,66695,66696,66697,66698,66699,66700,66701,66702,66703,66543}; + uint8 uiRandom = urand(0, 25); + uint32 uiSpells[26] = {66704, 66705, 66706, 66707, 66709, 66710, 66711, 66712, 66713, 66714, 66715, 66708, 66708, 66691, 66692, 66694, 66695, 66696, 66697, 66698, 66699, 66700, 66701, 66702, 66703, 66543}; - m_caster->CastSpell(m_caster,uiSpells[uiRandom],true); + m_caster->CastSpell(m_caster, uiSpells[uiRandom], true); break; } case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster @@ -5218,8 +5218,8 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) 45683 // Polymorph }; - m_caster->CastSpell(m_caster, spellPlayer[urand(0,4)], true); - unitTarget->CastSpell(unitTarget, spellTarget[urand(0,4)], true); + m_caster->CastSpell(m_caster, spellPlayer[urand(0, 4)], true); + unitTarget->CastSpell(unitTarget, spellTarget[urand(0, 4)], true); break; } case 64142: // Upper Deck - Create Foam Sword @@ -5231,7 +5231,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) for (uint32 const *itr = &itemId[0]; *itr; ++itr) if (plr->HasItemCount(*itr, 1, true)) return; - DoCreateItem(effIndex, itemId[urand(0,4)]); + DoCreateItem(effIndex, itemId[urand(0, 4)]); return; } break; @@ -5255,7 +5255,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case 57774: spellId1 = 20185; break; // Judgement of Light case 53408: spellId1 = 20186; break; // Judgement of Wisdom default: - sLog->outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id); + sLog->outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id); return; } // all seals have aura dummy in 2 effect @@ -5544,7 +5544,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/) pTarget->TeleportTo(pTarget->GetStartPosition(), unitTarget == m_caster ? TELE_TO_SPELL : 0); // homebind location is loaded always - // pTarget->TeleportTo(pTarget->m_homebindMapId,pTarget->m_homebindX,pTarget->m_homebindY,pTarget->m_homebindZ,pTarget->GetOrientation(), (unitTarget == m_caster ? TELE_TO_SPELL : 0)); + // pTarget->TeleportTo(pTarget->m_homebindMapId, pTarget->m_homebindX, pTarget->m_homebindY, pTarget->m_homebindZ, pTarget->GetOrientation(), (unitTarget == m_caster ? TELE_TO_SPELL : 0)); // Stuck spell trigger Hearthstone cooldown SpellEntry const *spellInfo = sSpellStore.LookupEntry(8690); @@ -5566,7 +5566,7 @@ void Spell::EffectSummonPlayer(SpellEffIndex /*effIndex*/) float x, y, z; m_caster->GetClosePoint(x, y, z, unitTarget->GetObjectSize()); - unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(),x,y,z); + unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(), x, y, z); WorldPacket data(SMSG_SUMMON_REQUEST, 8+4+4); data << uint64(m_caster->GetGUID()); // summoner guid @@ -5702,7 +5702,7 @@ void Spell::EffectDisEnchant(SpellEffIndex /*effIndex*/) p_caster->UpdateCraftSkill(m_spellInfo->Id); - m_caster->ToPlayer()->SendLoot(itemTarget->GetGUID(),LOOT_DISENCHANTING); + m_caster->ToPlayer()->SendLoot(itemTarget->GetGUID(), LOOT_DISENCHANTING); // item will be removed at disenchanting end } @@ -5817,7 +5817,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex) return; } - //pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL,m_caster->getLevel()); + //pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()); int32 duration = GetSpellDuration(m_spellInfo); pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0); pGameObj->SetSpellId(m_spellInfo->Id); @@ -6023,7 +6023,7 @@ void Spell::EffectSkinning(SpellEffIndex /*effIndex*/) uint32 skill = creature->GetCreatureInfo()->GetRequiredLootSkill(); - m_caster->ToPlayer()->SendLoot(creature->GetGUID(),LOOT_SKINNING); + m_caster->ToPlayer()->SendLoot(creature->GetGUID(), LOOT_SKINNING); creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); int32 reqValue = targetLevel < 10 ? 0 : targetLevel < 20 ? (targetLevel-10)*10 : targetLevel*5; @@ -6170,7 +6170,7 @@ void Spell::EffectSendTaxi(SpellEffIndex effIndex) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - unitTarget->ToPlayer()->ActivateTaxiPathTo(m_spellInfo->EffectMiscValue[effIndex],m_spellInfo->Id); + unitTarget->ToPlayer()->ActivateTaxiPathTo(m_spellInfo->EffectMiscValue[effIndex], m_spellInfo->Id); } void Spell::EffectPullTowards(SpellEffIndex effIndex) @@ -6236,7 +6236,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) if (damage < 0) return; - float x,y,z; + float x, y, z; _player->GetPosition(x, y, z); _player->GetMap()->CreatureRelocation(pet, x, y, z, _player->GetOrientation()); @@ -6344,7 +6344,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) if (!goinfo) { - sLog->outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast",name_id, m_spellInfo->Id); + sLog->outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id); return; } @@ -6404,7 +6404,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) { case GAMEOBJECT_TYPE_FISHINGNODE: { - m_caster->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT,pGameObj->GetGUID()); + m_caster->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, pGameObj->GetGUID()); m_caster->AddGameObject(pGameObj); // will removed at spell cancel // end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo)) @@ -6967,7 +6967,7 @@ void Spell::GetSummonPosition(uint32 i, Position &pos, float radius, uint32 coun else { float x, y, z; - m_caster->GetClosePoint(x,y,z,3.0f); + m_caster->GetClosePoint(x, y, z, 3.0f); pos.Relocate(x, y, z); } } @@ -6990,7 +6990,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex) if (!sSoundEntriesStore.LookupEntry(soundid)) { - sLog->outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.",soundid,m_spellInfo->Id); + sLog->outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id); return; } @@ -7105,8 +7105,8 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/) if (Item* pItem = player->GetItemByEntry(item_id)) { for (int x = 0; x < MAX_ITEM_PROTO_SPELLS; ++x) - pItem->SetSpellCharges(x,pProto->Spells[x].SpellCharges); - pItem->SetState(ITEM_CHANGED,player); + pItem->SetSpellCharges(x, pProto->Spells[x].SpellCharges); + pItem->SetState(ITEM_CHANGED, player); } } |